PageSourceSearch

https://ses-hereford-hub.lovable.app/assets/index-1qn3F5mx.js

js ses-hereford-hub.lovable.app collected 2026-10-03 03:44:05 UTC 825,799 bytes, 265 lines download raw bytes

vendor: 6,922 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Renewables-CjHnmzwx.js","assets/thermometer-wBYOGTGp.js","assets/plug-zap-CJrxLJK0.js","assets/Landlords-CyUZWOnc.js","assets/real-consumer-unit-17way-D4LZ3ZTI.js","assets/Electrical-wimny46Y.js","assets/Plumbing-BBzYianu.js","assets/Compliance-C6-vRCfP.js","assets/clipboard-check-BViwycA9.js","assets/CaseStudy-BrIo4Pui.js","assets/NotFound-BajZo1Op.js","assets/circle-check-D4gXGyBb.js","assets/quote-BCgFR9k7.js","assets/Contact-BwWEXDpJ.js","assets/Unsubscribe-D64mnC_1.js","assets/Reviews--idcNrOQ.js","assets/Insights-BoDoFbwJ.js","assets/insights-BotmFuHo.js","assets/InsightPost-CA2R3ZQK.js"])))=>i.map(i=>d[i]);
2var MT=Object.defineProperty;var Xg=t=>{throw TypeError(t)};var $T=(t,e,n)=>e in t?MT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var qn=(t,e,n)=>$T(t,typeof e!="symbol"?e+"":e,n),Td=(t,e,n)=>e.has(t)||Xg("Cannot "+n);var R=(t,e,n)=>(Td(t,e,"read from private field"),n?n.call(t):e.get(t)),fe=(t,e,n)=>e.has(t)?Xg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ne=(t,e,n,r)=>(Td(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),lt=(t,e,n)=>(Td(t,e,"access private method"),n);var Cl=(t,e,n,r)=>({set _(s){ne(t,e,s,n)},get _(){return R(t,e,r)}});function VT(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function ll(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ox={exports:{}},Ru={},Ix={exports:{}},le={};/**
3 * @license React
4 * react.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var cl=Symbol.for("react.element"),FT=Symbol.for("react.portal"),UT=Symbol.for("react.fragment"),BT=Symbol.for("react.strict_mode"),zT=Symbol.for("react.profiler"),HT=Symbol.for("react.provider"),WT=Symbol.for("react.context"),qT=Symbol.for("react.forward_ref"),KT=Symbol.for("react.suspense"),GT=Symbol.for("react.memo"),ZT=Symbol.for("react.lazy"),ey=Symbol.iterator;function JT(t){return t===null||typeof t!="object"?null:(t=ey&&t[ey]||t["@@iterator"],typeof t=="function"?t:null)}var Lx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dx=Object.assign,Mx={};function wo(t,e,n){this.props=t,this.context=e,this.refs=Mx,this.updater=n||Lx}wo.prototype.isReactComponent={};wo.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};wo.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function $x(){}$x.prototype=wo.prototype;function Dp(t,e,n){this.props=t,this.context=e,this.refs=Mx,this.updater=n||Lx}var Mp=Dp.prototype=new $x;Mp.constructor=Dp;Dx(Mp,wo.prototype);Mp.isPureReactComponent=!0;var ty=Array.isArray,Vx=Object.prototype.hasOwnProperty,$p={current:null},Fx={key:!0,ref:!0,__self:!0,__source:!0};function Ux(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)Vx.call(e,r)&&!Fx.hasOwnProperty(r)&&(s[r]=e[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:cl,type:t,key:i,ref:o,props:s,_owner:$p.current}}function QT(t,e){return{$$typeof:cl,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Vp(t){return typeof t=="object"&&t!==null&&t.$$typeof===cl}function YT(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var ny=/\/+/g;function Cd(t,e){return typeof t=="object"&&t!==null&&t.key!=null?YT(""+t.key):e.toString(36)}function uc(t,e,n,r,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case cl:case FT:o=!0}}if(o)return o=t,s=s(o),t=r===""?"."+Cd(o,0):r,ty(s)?(n="",t!=null&&(n=t.replace(ny,"$&/")+"/"),uc(s,e,n,"",function(c){return c})):s!=null&&(Vp(s)&&(s=QT(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(ny,"$&/")+"/")+t)),e.push(s)),1;if(o=0,r=r===""?".":r+":",ty(t))for(var a=0;a<t.length;a++){i=t[a];var l=r+Cd(i,a);o+=uc(i,e,n,l,s)}else if(l=JT(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=r+Cd(i,a++),o+=uc(i,e,n,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Al(t,e,n){if(t==null)return t;var r=[],s=0;return uc(t,r,"","",function(i){return e.call(n,i,s++)}),r}function XT(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var xt={current:null},dc={transition:null},eC={ReactCurrentDispatcher:xt,ReactCurrentBatchConfig:dc,ReactCurrentOwner:$p};function Bx(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:Al,forEach:function(t,e,n){Al(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Al(t,function(){e++}),e},toArray:function(t){return Al(t,function(e){return e})||[]},only:function(t){if(!Vp(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};le.Component=wo;le.Fragment=UT;le.Profiler=zT;
vendor: 5,116 bytes, lines 10-26
10le.PureComponent=Dp;le.StrictMode=BT;le.Suspense=KT;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eC;le.act=Bx;le.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=Dx({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=$p.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)Vx.call(e,l)&&!Fx.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:cl,type:t.type,key:s,ref:i,props:r,_owner:o}};le.createContext=function(t){return t={$$typeof:WT,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:HT,_context:t},t.Consumer=t};le.createElement=Ux;le.createFactory=function(t){var e=Ux.bind(null,t);return e.type=t,e};le.createRef=function(){return{current:null}};le.forwardRef=function(t){return{$$typeof:qT,render:t}};le.isValidElement=Vp;le.lazy=function(t){return{$$typeof:ZT,_payload:{_status:-1,_result:t},_init:XT}};le.memo=function(t,e){return{$$typeof:GT,type:t,compare:e===void 0?null:e}};le.startTransition=function(t){var e=dc.transition;dc.transition={};try{t()}finally{dc.transition=e}};le.unstable_act=Bx;le.useCallback=function(t,e){return xt.current.useCallback(t,e)};le.useContext=function(t){return xt.current.useContext(t)};le.useDebugValue=function(){};le.useDeferredValue=function(t){return xt.current.useDeferredValue(t)};le.useEffect=function(t,e){return xt.current.useEffect(t,e)};le.useId=function(){return xt.current.useId()};le.useImperativeHandle=function(t,e,n){return xt.current.useImperativeHandle(t,e,n)};le.useInsertionEffect=function(t,e){return xt.current.useInsertionEffect(t,e)};le.useLayoutEffect=function(t,e){return xt.current.useLayoutEffect(t,e)};le.useMemo=function(t,e){return xt.current.useMemo(t,e)};le.useReducer=function(t,e,n){return xt.current.useReducer(t,e,n)};le.useRef=function(t){return xt.current.useRef(t)};le.useState=function(t){return xt.current.useState(t)};le.useSyncExternalStore=function(t,e,n){return xt.current.useSyncExternalStore(t,e,n)};le.useTransition=function(){return xt.current.useTransition()};le.version="18.3.1";Ix.exports=le;var x=Ix.exports;const P=ll(x),Fp=VT({__proto__:null,default:P},[x]);/**
11 * @license React
12 * react-jsx-runtime.production.min.js
13 *
14 * Copyright (c) Facebook, Inc. and its affiliates.
15 *
16 * This source code is licensed under the MIT license found in the
17 * LICENSE file in the root directory of this source tree.
18 */var tC=x,nC=Symbol.for("react.element"),rC=Symbol.for("react.fragment"),sC=Object.prototype.hasOwnProperty,iC=tC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,oC={key:!0,ref:!0,__self:!0,__source:!0};function zx(t,e,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)sC.call(e,r)&&!oC.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:nC,type:t,key:i,ref:o,props:s,_owner:iC.current}}Ru.Fragment=rC;Ru.jsx=zx;Ru.jsxs=zx;Ox.exports=Ru;var h=Ox.exports,Hx={exports:{}},Vt={},Wx={exports:{}},qx={};/**
19 * @license React
20 * scheduler.production.min.js
21 *
22 * Copyright (c) Facebook, Inc. and its affiliates.
23 *
24 * This source code is licensed under the MIT license found in the
25 * LICENSE file in the root directory of this source tree.
26 */(function(t){function e(A,j){var M=A.length;A.push(j);e:for(;0<M;){var Q=M-1>>>1,G=A[Q];if(0<s(G,j))A[Q]=j,A[M]=G,M=Q;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var j=A[0],M=A.pop();if(M!==j){A[0]=M;e:for(var Q=0,G=A.length,ie=G>>>1;Q<ie;){var oe=2*(Q+1)-1,ye=A[oe],Me=oe+1,ce=A[Me];if(0>s(ye,M))Me<G&&0>s(ce,ye)?(A[Q]=ce,A[Me]=M,Q=Me):(A[Q]=ye,A[oe]=M,Q=oe);else if(Me<G&&0>s(ce,M))A[Q]=ce,A[Me]=M,Q=Me;else break e}}return j}function s(A,j){var M=A.sortIndex-j.sortIndex;return M!==0?M:A.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,f=3,p=!1,v=!1,w=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(A){for(var j=n(c);j!==null;){if(j.callback===null)r(c);else if(j.startTime<=A)r(c),j.sortIndex=j.expirationTime,e(l,j);else break;j=n(c)}}function S(A){if(w=!1,g(A),!v)if(n(l)!==null)v=!0,Z(_);else{var j=n(c);j!==null&&F(S,j.startTime-A)}}function _(A,j){v=!1,w&&(w=!1,y(T),T=-1),p=!0;var M=f;try{for(g(j),d=n(l);d!==null&&(!(d.expirationTime>j)||A&&!V());){var Q=d.callback;
vendor: 9,160 bytes, lines 26-35
26if(typeof Q=="function"){d.callback=null,f=d.priorityLevel;var G=Q(d.expirationTime<=j);j=t.unstable_now(),typeof G=="function"?d.callback=G:d===n(l)&&r(l),g(j)}else r(l);d=n(l)}if(d!==null)var ie=!0;else{var oe=n(c);oe!==null&&F(S,oe.startTime-j),ie=!1}return ie}finally{d=null,f=M,p=!1}}var k=!1,E=null,T=-1,C=5,N=-1;function V(){return!(t.unstable_now()-N<C)}function L(){if(E!==null){var A=t.unstable_now();N=A;var j=!0;try{j=E(!0,A)}finally{j?K():(k=!1,E=null)}}else k=!1}var K;if(typeof m=="function")K=function(){m(L)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,re=D.port2;D.port1.onmessage=L,K=function(){re.postMessage(null)}}else K=function(){b(L,0)};function Z(A){E=A,k||(k=!0,K())}function F(A,j){T=b(function(){A(t.unstable_now())},j)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(A){A.callback=null},t.unstable_continueExecution=function(){v||p||(v=!0,Z(_))},t.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<A?Math.floor(1e3/A):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(A){switch(f){case 1:case 2:case 3:var j=3;break;default:j=f}var M=f;f=j;try{return A()}finally{f=M}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(A,j){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var M=f;f=A;try{return j()}finally{f=M}},t.unstable_scheduleCallback=function(A,j,M){var Q=t.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?Q+M:Q):M=Q,A){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=M+G,A={id:u++,callback:j,priorityLevel:A,startTime:M,expirationTime:G,sortIndex:-1},M>Q?(A.sortIndex=M,e(c,A),n(l)===null&&A===n(c)&&(w?(y(T),T=-1):w=!0,F(S,M-Q))):(A.sortIndex=G,e(l,A),v||p||(v=!0,Z(_))),A},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(A){var j=f;return function(){var M=f;f=j;try{return A.apply(this,arguments)}finally{f=M}}}})(qx);Wx.exports=qx;var aC=Wx.exports;/**
27 * @license React
28 * react-dom.production.min.js
29 *
30 * Copyright (c) Facebook, Inc. and its affiliates.
31 *
32 * This source code is licensed under the MIT license found in the
33 * LICENSE file in the root directory of this source tree.
34 */var lC=x,Dt=aC;function O(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Kx=new Set,xa={};function Ys(t,e){no(t,e),no(t+"Capture",e)}function no(t,e){for(xa[t]=e,t=0;t<e.length;t++)Kx.add(e[t])}var ir=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oh=Object.prototype.hasOwnProperty,cC=/^[: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]*$/,ry={},sy={};function uC(t){return Oh.call(sy,t)?!0:Oh.call(ry,t)?!1:cC.test(t)?sy[t]=!0:(ry[t]=!0,!1)}function dC(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function hC(t,e,n,r){if(e===null||typeof e>"u"||dC(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function bt(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var at={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){at[t]=new bt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];at[e]=new bt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){at[t]=new bt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){at[t]=new bt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){at[t]=new bt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){at[t]=new bt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){at[t]=new bt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){at[t]=new bt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){at[t]=new bt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Up=/[\-:]([a-z])/g;function Bp(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Up,Bp);at[e]=new bt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Up,Bp);at[e]=new bt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Up,Bp);at[e]=new bt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){at[t]=new bt(t,1,!1,t.toLowerCase(),null,!1,!1)});at.xlinkHref=new bt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){at[t]=new bt(t,1,!1,t.toLowerCase(),null,!0,!0)});function zp(t,e,n,r){var s=at.hasOwnProperty(e)?at[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(hC(e,n,s,r)&&(n=null),r||s===null?uC(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var pr=lC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pl=Symbol.for("react.element"),wi=Symbol.for("react.portal"),xi=Symbol.for("react.fragment"),Hp=Symbol.for("react.strict_mode"),Ih=Symbol.for("react.profiler"),Gx=Symbol.for("react.provider"),Zx=Symbol.for("react.context"),Wp=Symbol.for("react.forward_ref"),Lh=Symbol.for("react.suspense"),Dh=Symbol.for("react.suspense_list"),qp=Symbol.for("react.memo"),Cr=Symbol.for("react.lazy"),Jx=Symbol.for("react.offscreen"),iy=Symbol.iterator;function Io(t){return t===null||typeof t!="object"?null:(t=iy&&t[iy]||t["@@iterator"],typeof t=="function"?t:null)}var Ne=Object.assign,Ad;function Go(t){if(Ad===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Ad=e&&e[1]||""}return`
35`+Ad+t}var Pd=!1;function Rd(t,e){if(!t||Pd)return"";Pd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}
vendor: 16,752 bytes, lines 35-38
35catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
36`),i=r.stack.split(`
37`),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=`
38`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Pd=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Go(t):""}function fC(t){switch(t.tag){case 5:return Go(t.type);case 16:return Go("Lazy");case 13:return Go("Suspense");case 19:return Go("SuspenseList");case 0:case 2:case 15:return t=Rd(t.type,!1),t;case 11:return t=Rd(t.type.render,!1),t;case 1:return t=Rd(t.type,!0),t;default:return""}}function Mh(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case xi:return"Fragment";case wi:return"Portal";case Ih:return"Profiler";case Hp:return"StrictMode";case Lh:return"Suspense";case Dh:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Zx:return(t.displayName||"Context")+".Consumer";case Gx:return(t._context.displayName||"Context")+".Provider";case Wp:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case qp:return e=t.displayName||null,e!==null?e:Mh(t.type)||"Memo";case Cr:e=t._payload,t=t._init;try{return Mh(t(e))}catch{}}return null}function pC(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Mh(e);case 8:return e===Hp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function es(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Qx(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function mC(t){var e=Qx(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Rl(t){t._valueTracker||(t._valueTracker=mC(t))}function Yx(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Qx(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Ic(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function $h(t,e){var n=e.checked;return Ne({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function oy(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=es(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Xx(t,e){e=e.checked,e!=null&&zp(t,"checked",e,!1)}function Vh(t,e){Xx(t,e);var n=es(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Fh(t,e.type,n):e.hasOwnProperty("defaultValue")&&Fh(t,e.type,es(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ay(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Fh(t,e,n){(e!=="number"||Ic(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Zo=Array.isArray;function Di(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+es(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function Uh(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(O(91));return Ne({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function ly(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(O(92));if(Zo(n)){if(1<n.length)throw Error(O(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:es(n)}}function eb(t,e){var n=es(e.value),r=es(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function cy(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function tb(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Bh(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?tb(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var jl,nb=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(jl=jl||document.createElement("div"),jl.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=jl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function ba(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ra={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},gC=["Webkit","ms","Moz","O"];Object.keys(ra).forEach(function(t){gC.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ra[e]=ra[t]})});function rb(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ra.hasOwnProperty(t)&&ra[t]?(""+e).trim():e+"px"}function sb(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=rb(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var yC=Ne({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 zh(t,e){if(e){if(yC[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(O(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(O(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(O(61))}if(e.style!=null&&typeof e.style!="object")throw Error(O(62))}}function Hh(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Wh=null;function Kp(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var qh=null,Mi=null,$i=null;function uy(t){if(t=hl(t)){if(typeof qh!="function")throw Error(O(280));var e=t.stateNode;e&&(e=Lu(e),qh(t.stateNode,t.type,e))}}function ib(t){Mi?$i?$i.push(t):$i=[t]:Mi=t}function ob(){if(Mi){var t=Mi,e=$i;if($i=Mi=null,uy(t),e)for(t=0;t<e.length;t++)uy(e[t])}}function ab(t,e){return t(e)}function lb(){}var jd=!1;function cb(t,e,n){if(jd)return t(e,n);jd=!0;try{return ab(t,e,n)}finally{jd=!1,(Mi!==null||$i!==null)&&(lb(),ob())}}function Sa(t,e){var n=t.stateNode;if(n===null)return null;var r=Lu(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(O(231,e,typeof n));return n}var Kh=!1;if(ir)try{var Lo={};Object.defineProperty(Lo,"passive",{get:function(){Kh=!0}}),window.addEventListener("test",Lo,Lo),window.removeEventListener("test",Lo,Lo)}catch{Kh=!1}function vC(t,e,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var sa=!1,Lc=null,Dc=!1,Gh=null,wC={onError:function(t){sa=!0,Lc=t}};function xC(t,e,n,r,s,i,o,a,l){sa=!1,Lc=null,vC.apply(wC,arguments)}function bC(t,e,n,r,s,i,o,a,l){if(xC.apply(this,arguments),sa){if(sa){var c=Lc;sa=!1,Lc=null}else throw Error(O(198));Dc||(Dc=!0,Gh=c)}}function Xs(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function ub(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function dy(t){if(Xs(t)!==t)throw Error(O(188))}function SC(t){var e=t.alternate;if(!e){if(e=Xs(t),e===null)throw Error(O(188));return e!==t?null:t}for(var n=t,r=e;;){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 dy(s),t;if(i===r)return dy(s),e;i=i.sibling}throw Error(O(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(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?t:e}function db(t){return t=SC(t),t!==null?hb(t):null}function hb(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=hb(t);if(e!==null)return e;t=t.sibling}return null}var fb=Dt.unstable_scheduleCallback,hy=Dt.unstable_cancelCallback,_C=Dt.unstable_shouldYield,kC=Dt.unstable_requestPaint,Ve=Dt.unstable_now,EC=Dt.unstable_getCurrentPriorityLevel,Gp=Dt.unstable_ImmediatePriority,pb=Dt.unstable_UserBlockingPriority,Mc=Dt.unstable_NormalPriority,TC=Dt.unstable_LowPriority,mb=Dt.unstable_IdlePriority,ju=null,Mn=null;function CC(t){if(Mn&&typeof Mn.onCommitFiberRoot=="function")try{Mn.onCommitFiberRoot(ju,t,void 0,(t.current.flags&128)===128)}catch{}}var xn=Math.clz32?Math.clz32:RC,AC=Math.log,PC=Math.LN2;function RC(t){return t>>>=0,t===0?32:31-(AC(t)/PC|0)|0}var Nl=64,Ol=4194304;function Jo(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function $c(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Jo(a):(i&=o,i!==0&&(r=Jo(i)))}else o=n&~s,o!==0?r=Jo(o):i!==0&&(r=Jo(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-xn(e),s=1<<n,r|=t[n],e&=~s;return r}function jC(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function NC(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-xn(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=jC(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function Zh(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function gb(){var t=Nl;return Nl<<=1,!(Nl&4194240)&&(Nl=64),t}function Nd(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ul(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-xn(e),t[e]=n}function OC(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-xn(n),i=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~i}}function Zp(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-xn(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var me=0;function yb(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var vb,Jp,wb,xb,bb,Jh=!1,Il=[],Hr=null,Wr=null,qr=null,_a=new Map,ka=new Map,Rr=[],IC="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 fy(t,e){switch(t){case"focusin":case"focusout":Hr=null;break;case"dragenter":case"dragleave":Wr=null;break;case"mouseover":case"mouseout":qr=null;break;case"pointerover":case"pointerout":_a.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ka.delete(e.pointerId)}}function Do(t,e,n,r,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},e!==null&&(e=hl(e),e!==null&&Jp(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function LC(t,e,n,r,s){switch(e){case"focusin":return Hr=Do(Hr,t,e,n,r,s),!0;case"dragenter":return Wr=Do(Wr,t,e,n,r,s),!0;case"mouseover":return qr=Do(qr,t,e,n,r,s),!0;case"pointerover":var i=s.pointerId;return _a.set(i,Do(_a.get(i)||null,t,e,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,ka.set(i,Do(ka.get(i)||null,t,e,n,r,s)),!0}return!1}function Sb(t){var e=As(t.target);if(e!==null){var n=Xs(e);if(n!==null){if(e=n.tag,e===13){if(e=ub(n),e!==null){t.blockedOn=e,bb(t.priority,function(){wb(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function hc(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Qh(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Wh=r,n.target.dispatchEvent(r),Wh=null}else return e=hl(n),e!==null&&Jp(e),t.blockedOn=n,!1;e.shift()}return!0}function py(t,e,n){hc(t)&&n.delete(e)}function DC(){Jh=!1,Hr!==null&&hc(Hr)&&(Hr=null),Wr!==null&&hc(Wr)&&(Wr=null),qr!==null&&hc(qr)&&(qr=null),_a.forEach(py),ka.forEac
vendor: 12,723 bytes, line 38
38h(py)}function Mo(t,e){t.blockedOn===e&&(t.blockedOn=null,Jh||(Jh=!0,Dt.unstable_scheduleCallback(Dt.unstable_NormalPriority,DC)))}function Ea(t){function e(s){return Mo(s,t)}if(0<Il.length){Mo(Il[0],t);for(var n=1;n<Il.length;n++){var r=Il[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Hr!==null&&Mo(Hr,t),Wr!==null&&Mo(Wr,t),qr!==null&&Mo(qr,t),_a.forEach(e),ka.forEach(e),n=0;n<Rr.length;n++)r=Rr[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Rr.length&&(n=Rr[0],n.blockedOn===null);)Sb(n),n.blockedOn===null&&Rr.shift()}var Vi=pr.ReactCurrentBatchConfig,Vc=!0;function MC(t,e,n,r){var s=me,i=Vi.transition;Vi.transition=null;try{me=1,Qp(t,e,n,r)}finally{me=s,Vi.transition=i}}function $C(t,e,n,r){var s=me,i=Vi.transition;Vi.transition=null;try{me=4,Qp(t,e,n,r)}finally{me=s,Vi.transition=i}}function Qp(t,e,n,r){if(Vc){var s=Qh(t,e,n,r);if(s===null)Bd(t,e,r,Fc,n),fy(t,r);else if(LC(s,t,e,n,r))r.stopPropagation();else if(fy(t,r),e&4&&-1<IC.indexOf(t)){for(;s!==null;){var i=hl(s);if(i!==null&&vb(i),i=Qh(t,e,n,r),i===null&&Bd(t,e,r,Fc,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Bd(t,e,r,null,n)}}var Fc=null;function Qh(t,e,n,r){if(Fc=null,t=Kp(r),t=As(t),t!==null)if(e=Xs(t),e===null)t=null;else if(n=e.tag,n===13){if(t=ub(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Fc=t,null}function _b(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(EC()){case Gp:return 1;case pb:return 4;case Mc:case TC:return 16;case mb:return 536870912;default:return 16}default:return 16}}var Vr=null,Yp=null,fc=null;function kb(){if(fc)return fc;var t,e=Yp,n=e.length,r,s="value"in Vr?Vr.value:Vr.textContent,i=s.length;for(t=0;t<n&&e[t]===s[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===s[i-r];r++);return fc=s.slice(t,1<r?1-r:void 0)}function pc(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ll(){return!0}function my(){return!1}function Ft(t){function e(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 t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ll:my,this.isPropagationStopped=my,this}return Ne(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ll)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ll)},persist:function(){},isPersistent:Ll}),e}var xo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xp=Ft(xo),dl=Ne({},xo,{view:0,detail:0}),VC=Ft(dl),Od,Id,$o,Nu=Ne({},dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:em,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==$o&&($o&&t.type==="mousemove"?(Od=t.screenX-$o.screenX,Id=t.screenY-$o.screenY):Id=Od=0,$o=t),Od)},movementY:function(t){return"movementY"in t?t.movementY:Id}}),gy=Ft(Nu),FC=Ne({},Nu,{dataTransfer:0}),UC=Ft(FC),BC=Ne({},dl,{relatedTarget:0}),Ld=Ft(BC),zC=Ne({},xo,{animationName:0,elapsedTime:0,pseudoElement:0}),HC=Ft(zC),WC=Ne({},xo,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),qC=Ft(WC),KC=Ne({},xo,{data:0}),yy=Ft(KC),GC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZC={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"},JC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function QC(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=JC[t])?!!e[t]:!1}function em(){return QC}var YC=Ne({},dl,{key:function(t){if(t.key){var e=GC[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=pc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?ZC[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:em,charCode:function(t){return t.type==="keypress"?pc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?pc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),XC=Ft(YC),eA=Ne({},Nu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vy=Ft(eA),tA=Ne({},dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:em}),nA=Ft(tA),rA=Ne({},xo,{propertyName:0,elapsedTime:0,pseudoElement:0}),sA=Ft(rA),iA=Ne({},Nu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),oA=Ft(iA),aA=[9,13,27,32],tm=ir&&"CompositionEvent"in window,ia=null;ir&&"documentMode"in document&&(ia=document.documentMode);var lA=ir&&"TextEvent"in window&&!ia,Eb=ir&&(!tm||ia&&8<ia&&11>=ia),wy=" ",xy=!1;function Tb(t,e){switch(t){case"keyup":return aA.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cb(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var bi=!1;function cA(t,e){switch(t){case"compositionend":return Cb(e);case"keypress":return e.which!==32?null:(xy=!0,wy);case"textInput":return t=e.data,t===wy&&xy?null:t;default:return null}}function uA(t,e){if(bi)return t==="compositionend"||!tm&&Tb(t,e)?(t=kb(),fc=Yp=Vr=null,bi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Eb&&e.locale!=="ko"?null:e.data;default:return null}}var dA={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 by(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!dA[t.type]:e==="textarea"}function Ab(t,e,n,r){ib(r),e=Uc(e,"onChange"),0<e.length&&(n=new Xp("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var oa=null,Ta=null;function hA(t){Vb(t,0)}function Ou(t){var e=ki(t);if(Yx(e))return t}function fA(t,e){if(t==="change")return e}var Pb=!1;if(ir){var Dd;if(ir){var Md="oninput"in document;if(!Md){var Sy=document.createElement("div");Sy.setAttribute("oninput","return;"),Md=typeof Sy.oninput=="function"}Dd=Md}else Dd=!1;Pb=Dd&&(!document.documentMode||9<document.documentMode)}function _y(){oa&&(oa.detachEvent("onpropertychange",Rb),Ta=oa=null)}function Rb(t){if(t.propertyName==="value"&&Ou(Ta)){var e=[];Ab(e,Ta,t,Kp(t)),cb(hA,e)}}function pA(t,e,n){t==="focusin"?(_y(),oa=e,Ta=n,oa.attachEvent("onpropertychange",Rb)):t==="focusout"&&_y()}function mA(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ou(Ta)}function gA(t,e){if(t==="click")return Ou(e)}function yA(t,e){if(t==="input"||t==="change")return Ou(e)}function vA(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var _n=typeof Object.is=="function"?Object.is:vA;function Ca(t,e){if(_n(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Oh.call(e,s)||!_n(t[s],e[s]))return!1}return!0}function ky(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ey(t,e){var n=ky(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ky(n)}}function jb(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?jb(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Nb(){for(var t=window,e=Ic();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Ic(t.document)}return e}function nm(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function wA(t){var e=Nb(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&jb(n.ownerDocument.documentElement,n)){if(r!==null&&nm(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=Ey(n,i);var o=Ey(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var xA=ir&&"documentMode"in document&&11>=document.documentMode,Si=null,Yh=null,aa=null,Xh=!1;function Ty(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xh||Si==null||Si!==Ic(r)||(r=Si,"selectionStart"in r&&nm(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}),aa&&Ca(aa,r)||(aa=r,r=Uc(Yh,"onSelect"),0<r.length&&(e=new Xp("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Si)))}function Dl(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var _i={animationend:Dl("Animation","AnimationEnd"),animationiteration:Dl("Animation","AnimationIteration"),animationstart:Dl("Animation","AnimationStart"),transitionend:Dl("Transition","TransitionEnd")},$d={},Ob={};ir&&(Ob=document.createElement("div").style,"AnimationEvent"in window||(delete _i.animationend.animation,delete _i.animationiteration.animation,delete _i.animationstart.animation),"TransitionEvent"in window||delete _i.transitionend.transition);function Iu(t){if($d[t])return $d[t];if(!_i[t])return t;var e=_i[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Ob)return $d[t]=e[n];return t}
vendor: 5,588 bytes, line 38
38var Ib=Iu("animationend"),Lb=Iu("animationiteration"),Db=Iu("animationstart"),Mb=Iu("transitionend"),$b=new Map,Cy="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 us(t,e){$b.set(t,e),Ys(e,[t])}for(var Vd=0;Vd<Cy.length;Vd++){var Fd=Cy[Vd],bA=Fd.toLowerCase(),SA=Fd[0].toUpperCase()+Fd.slice(1);us(bA,"on"+SA)}us(Ib,"onAnimationEnd");us(Lb,"onAnimationIteration");us(Db,"onAnimationStart");us("dblclick","onDoubleClick");us("focusin","onFocus");us("focusout","onBlur");us(Mb,"onTransitionEnd");no("onMouseEnter",["mouseout","mouseover"]);no("onMouseLeave",["mouseout","mouseover"]);no("onPointerEnter",["pointerout","pointerover"]);no("onPointerLeave",["pointerout","pointerover"]);Ys("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ys("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ys("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ys("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ys("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ys("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qo="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(" "),_A=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qo));function Ay(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,bC(r,e,void 0,t),t.currentTarget=null}function Vb(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Ay(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Ay(s,a,c),i=l}}}if(Dc)throw t=Gh,Dc=!1,Gh=null,t}function Se(t,e){var n=e[sf];n===void 0&&(n=e[sf]=new Set);var r=t+"__bubble";n.has(r)||(Fb(e,t,2,!1),n.add(r))}function Ud(t,e,n){var r=0;e&&(r|=4),Fb(n,t,r,e)}var Ml="_reactListening"+Math.random().toString(36).slice(2);function Aa(t){if(!t[Ml]){t[Ml]=!0,Kx.forEach(function(n){n!=="selectionchange"&&(_A.has(n)||Ud(n,!1,t),Ud(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Ml]||(e[Ml]=!0,Ud("selectionchange",!1,e))}}function Fb(t,e,n,r){switch(_b(e)){case 1:var s=MC;break;case 4:s=$C;break;default:s=Qp}n=s.bind(null,e,n,t),s=void 0,!Kh||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function Bd(t,e,n,r,s){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===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=As(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}cb(function(){var c=i,u=Kp(n),d=[];e:{var f=$b.get(t);if(f!==void 0){var p=Xp,v=t;switch(t){case"keypress":if(pc(n)===0)break e;case"keydown":case"keyup":p=XC;break;case"focusin":v="focus",p=Ld;break;case"focusout":v="blur",p=Ld;break;case"beforeblur":case"afterblur":p=Ld;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=gy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=UC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=nA;break;case Ib:case Lb:case Db:p=HC;break;case Mb:p=sA;break;case"scroll":p=VC;break;case"wheel":p=oA;break;case"copy":case"cut":case"paste":p=qC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=vy}var w=(e&4)!==0,b=!w&&t==="scroll",y=w?f!==null?f+"Capture":null:f;w=[];for(var m=c,g;m!==null;){g=m;var S=g.stateNode;if(g.tag===5&&S!==null&&(g=S,y!==null&&(S=Sa(m,y),S!=null&&w.push(Pa(m,S,g)))),b)break;m=m.return}0<w.length&&(f=new p(f,v,null,n,u),d.push({event:f,listeners:w}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",p=t==="mouseout"||t==="pointerout",f&&n!==Wh&&(v=n.relatedTarget||n.fromElement)&&(As(v)||v[or]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=c,v=v?As(v):null,v!==null&&(b=Xs(v),v!==b||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=c),p!==v)){if(w=gy,S="onMouseLeave",y="onMouseEnter",m="mou
38se",(t==="pointerout"||t==="pointerover")&&(w=vy,S="onPointerLeave",y="onPointerEnter",m="pointer"),b=p==null?f:ki(p),g=v==null?f:ki(v),f=new w(S,m+"leave",p,n,u),f.target=b,f.relatedTarget=g,S=null,As(u)===c&&(w=new w(y,m+"enter",v,n,u),w.target=g,w.relatedTarget=b,S=w),b=S,p&&v)t:{for(w=p,y=v,m=0,g=w;g;g=oi(g))m++;for(g=0,S=y;S;S=oi(S))g++;for(;0<m-g;)w=oi(w),m--;for(;0<g-m;)y=oi(y),g--;for(;m--;){if(w===y||y!==null&&w===y.alternate)break t;w=oi(w),y=oi(y)}w=null}else w=null;p!==null&&Py(d,f,p,w,!1),v!==null&&b!==null&&Py(d,b,v,w,!0)}}e:{if(f=c?ki(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var _=fA;else if(by(f))if(Pb)_=yA;else{_=mA;var k=pA}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=gA);if(_&&(_=_(t,c))){Ab(d,_,n,u);break e}k&&k(t,f,c),t==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Fh(f,"number",f.value)}switch(k=c?ki(c):window,t){case"focusin":(by(k)||k.contentEditable==="true")&&(Si=k,Yh=c,aa=null);break;case"focusout":aa=Yh=Si=null;break;case"mousedown":Xh=!0;break;case"contextmenu":case"mouseup":case"dragend":Xh=!1,Ty(d,n,u);break;case"selectionchange":if(xA)break;case"keydown":case"keyup":Ty(d,n,u)}var E;if(tm)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else bi?Tb(t,n)&&(T="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Eb&&n.locale!=="ko"&&(bi||T!=="onCompositionStart"?T==="onCompositionEnd"&&bi&&(E=kb()):(Vr=u,Yp="value"in Vr?Vr.value:Vr.textContent,bi=!0)),k=Uc(c,T),0<k.length&&(T=new yy(T,t,null,n,u),d.push({event:T,listeners:k}),E?T.data=E:(E=Cb(n),E!==null&&(T.data=E)))),(E=lA?cA(t,n):uA(t,n))&&(c=Uc(c,"onBeforeInput"),0<c.length&&(u=new yy("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=E))}Vb(d,e)})}function Pa(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Uc(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Sa(t,n),i!=null&&r.unshift(Pa(t,i,s)),i=Sa(t,e),i!=null&&r.push(Pa(t,i,s))),t=t.return}return r}function oi(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Py(t,e,n,r,s){for(var i=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Sa(n,i),l!=null&&o.unshift(Pa(n,l,a))):s||(l=Sa(n,i),l!=null&&o.push(Pa(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var kA=/\r\n?/g,EA=/\u0000|\uFFFD/g;function Ry(t){return(typeof t=="string"?t:""+t).replace(kA,`
39`).replace(EA,"")}function $l(t,e,n){if(e=Ry(e),Ry(t)!==e&&n)throw Error(O(425))}function Bc(){}var ef=null,tf=null;function nf(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var rf=typeof setTimeout=="function"?setTimeout:void 0,TA=typeof clearTimeout=="function"?clearTimeout:void 0,jy=typeof Promise=="function"?Promise:void 0,CA=typeof queueMicrotask=="function"?queueMicrotask:typeof jy<"u"?function(t){return jy.resolve(null).then(t).catch(AA)}:rf;function AA(t){setTimeout(function(){throw t})}function zd(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),Ea(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Ea(e)}function Kr(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Ny(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var bo=Math.random().toString(36).slice(2),Ln="__reactFiber$"+bo,Ra="__reactProps$"+bo,or="__reactContainer$"+bo,sf="__reactEvents$"+bo,PA="__reactListeners$"+bo,RA="__reactHandles$"+bo;function As(t){var e=t[Ln];if(e)return e;for(var n=t.parentNode;n;){if(e=n[or]||n[Ln]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Ny(t);t!==null;){if(n=t[Ln])return n;t=Ny(t)}return e}t=n,n=t.parentNode}return null}function hl(t){return t=t[Ln]||t[or],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ki(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(O(33))}function Lu(t){return t[Ra]||null}var of=[],Ei=-1;function ds(t){return{current:t}}function _e(t){0>Ei||(t.current=of[Ei],of[Ei]=null,Ei--)}function xe(t,e){Ei++,of[Ei]=t.current,t.current=e}var ts={},ft=ds(ts),Ct=ds(!1),Hs=ts;function ro(t,e){var n=t.type.contextTypes;if(!n)return ts;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function At(t){return t=t.childContextTypes,t!=null}function zc(){_e(Ct),_e(ft)}function Oy(t,e,n){if(ft.current!==ts)throw Error(O(168));xe(ft,e),xe(Ct,n)}function Ub(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(O(108,pC(t)||"Unknown",s));return Ne({},n,r)}function Hc(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ts,Hs=ft.current,xe(ft,t),xe(Ct,Ct.current),!0}function Iy(t,e,n){var r=t.stateNode;if(!r)throw Error(O(169));n?(t=Ub(t,e,Hs),r.__reactInternalMemoizedMergedChildContext=t,_e(Ct),_e(ft),xe(ft,t)):_e(Ct),xe(Ct,n)}var Xn=null,Du=!1,Hd=!1;function Bb(t){Xn===null?Xn=[t]:Xn.push(t)}function jA(t){Du=!0,Bb(t)}function hs(){if(!Hd&&Xn!==null){Hd=!0;var t=0,e=me;try{var n=Xn;for(me=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Xn=null,Du=!1}catch(s){throw Xn!==null&&(Xn=Xn.slice(t+1)),fb(Gp,hs),s}finally{me=e,Hd=!1}}return null}var Ti=[],Ci=0,Wc=null,qc=0,Kt=[],Gt=0,Ws=null,tr=1,nr="";function _s(t,e){Ti[Ci++]=qc,Ti[Ci++]=Wc,Wc=t,qc=e}function zb(t,e,n){Kt[Gt++]=tr,Kt[Gt++]=nr,Kt[Gt++]=Ws,Ws=t;var r=tr;t=nr;var s=32-xn(r)-1;r&=~(1<<s),n+=1;var i=32-xn(e)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,tr=1<<32-xn(e)+s|n<<s|r,nr=i+t}else tr=1<<i|n<<s|r,nr=t}function rm(t){t.return!==null&&(_s(t,1),zb(t,1,0))}function sm(t){for(;t===Wc;)Wc=Ti[--Ci],Ti[Ci]=null,qc=Ti[--Ci],Ti[Ci]=null;for(;t===Ws;)Ws=Kt[--Gt],Kt[Gt]=null,nr=Kt[--Gt],Kt[Gt]=null,tr=Kt[--Gt],Kt[Gt]=null}var It=null,Ot=null,Ce=!1,yn=null;function Hb(t,e){var n=Zt(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function Ly(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,It=t,Ot=Kr(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,It=t,Ot=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Ws!==null?{id:tr,overflow:nr}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Zt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,It=t,Ot=null,!0):!1;default:return!1}}function af(t){return(t.mode&1)!==0&&(t.flags&128)===0}function lf(t){if(Ce){var e=Ot;if(e){var n=e;if(!Ly(t,e)){if(af(t))throw Error(O(418));e=Kr(n.nextSibling);var r=It;e&&Ly(t,e)?Hb(r,n):(t.flags=t.flags&-4097|2,Ce=!1,It=t)}}else{if(af(t))throw Error(O(418));t.flags=t.flags&-4097|2,Ce=!1,It=t}}}function Dy(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;It=t}function Vl(t){if(t!==It)return!1;if(!Ce)return Dy(t),Ce=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!nf(t.type,t.memoizedProps)),e&&(e=Ot)){if(af(t))throw Wb(),Error(O(418));for(;e;)Hb(t,e),e=Kr(e.nextSibling)}if(Dy(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(O(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 23,255 bytes, lines 39-41
39){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Ot=Kr(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Ot=null}}else Ot=It?Kr(t.stateNode.nextSibling):null;return!0}function Wb(){for(var t=Ot;t;)t=Kr(t.nextSibling)}function so(){Ot=It=null,Ce=!1}function im(t){yn===null?yn=[t]:yn.push(t)}var NA=pr.ReactCurrentBatchConfig;function Vo(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,t));var s=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,t))}return t}function Fl(t,e){throw t=Object.prototype.toString.call(e),Error(O(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function My(t){var e=t._init;return e(t._payload)}function qb(t){function e(y,m){if(t){var g=y.deletions;g===null?(y.deletions=[m],y.flags|=16):g.push(m)}}function n(y,m){if(!t)return null;for(;m!==null;)e(y,m),m=m.sibling;return null}function r(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function s(y,m){return y=Qr(y,m),y.index=0,y.sibling=null,y}function i(y,m,g){return y.index=g,t?(g=y.alternate,g!==null?(g=g.index,g<m?(y.flags|=2,m):g):(y.flags|=2,m)):(y.flags|=1048576,m)}function o(y){return t&&y.alternate===null&&(y.flags|=2),y}function a(y,m,g,S){return m===null||m.tag!==6?(m=Qd(g,y.mode,S),m.return=y,m):(m=s(m,g),m.return=y,m)}function l(y,m,g,S){var _=g.type;return _===xi?u(y,m,g.props.children,S,g.key):m!==null&&(m.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Cr&&My(_)===m.type)?(S=s(m,g.props),S.ref=Vo(y,m,g),S.return=y,S):(S=bc(g.type,g.key,g.props,null,y.mode,S),S.ref=Vo(y,m,g),S.return=y,S)}function c(y,m,g,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==g.containerInfo||m.stateNode.implementation!==g.implementation?(m=Yd(g,y.mode,S),m.return=y,m):(m=s(m,g.children||[]),m.return=y,m)}function u(y,m,g,S,_){return m===null||m.tag!==7?(m=Bs(g,y.mode,S,_),m.return=y,m):(m=s(m,g),m.return=y,m)}function d(y,m,g){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Qd(""+m,y.mode,g),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Pl:return g=bc(m.type,m.key,m.props,null,y.mode,g),g.ref=Vo(y,null,m),g.return=y,g;case wi:return m=Yd(m,y.mode,g),m.return=y,m;case Cr:var S=m._init;return d(y,S(m._payload),g)}if(Zo(m)||Io(m))return m=Bs(m,y.mode,g,null),m.return=y,m;Fl(y,m)}return null}function f(y,m,g,S){var _=m!==null?m.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return _!==null?null:a(y,m,""+g,S);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Pl:return g.key===_?l(y,m,g,S):null;case wi:return g.key===_?c(y,m,g,S):null;case Cr:return _=g._init,f(y,m,_(g._payload),S)}if(Zo(g)||Io(g))return _!==null?null:u(y,m,g,S,null);Fl(y,g)}return null}function p(y,m,g,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(g)||null,a(m,y,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Pl:return y=y.get(S.key===null?g:S.key)||null,l(m,y,S,_);case wi:return y=y.get(S.key===null?g:S.key)||null,c(m,y,S,_);case Cr:var k=S._init;return p(y,m,g,k(S._payload),_)}if(Zo(S)||Io(S))return y=y.get(g)||null,u(m,y,S,_,null);Fl(m,S)}return null}function v(y,m,g,S){for(var _=null,k=null,E=m,T=m=0,C=null;E!==null&&T<g.length;T++){E.index>T?(C=E,E=null):C=E.sibling;var N=f(y,E,g[T],S);if(N===null){E===null&&(E=C);break}t&&E&&N.alternate===null&&e(y,E),m=i(N,m,T),k===null?_=N:k.sibling=N,k=N,E=C}if(T===g.length)return n(y,E),Ce&&_s(y,T),_;if(E===null){for(;T<g.length;T++)E=d(y,g[T],S),E!==null&&(m=i(E,m,T),k===null?_=E:k.sibling=E,k=E);return Ce&&_s(y,T),_}for(E=r(y,E);T<g.length;T++)C=p(E,y,T,g[T],S),C!==null&&(t&&C.alternate!==null&&E.delete(C.key===null?T:C.key),m=i(C,m,T),k===null?_=C:k.sibling=C,k=C);return t&&E.forEach(function(V){return e(y,V)}),Ce&&_s(y,T),_}function w(y,m,g,S){var _=Io(g);if(typeof _!="function")throw Error(O(150));if(g=_.call(g),g==null)throw Error(O(151));for(var k=_=null,E=m,T=m=0,C=null,N=g.next();E!==null&&!N.done;T++,N=g.next()){E.index>T?(C=E,E=null):C=E.sibling;var V=f(y,E,N.value,S);if(V===null){E===null&&(E=C);break}t&&E&&V.alternate===null&&e(y,E),m=i(V,m,T),k===null?_=V:k.sibling=V,k=V,E=C}if(N.done)return n(y,E),Ce&&_s(y,T),_;if(E===null){for(;!N.done;T++,N=g.next())N=d(y,N.value,S),N!==null&&(m=i(N,m,T),k===null?_=N:k.sibling=N,k=N);return Ce&&_s(y,T),_}for(E=r(y,E);!N.done;T++,N=g.next())N=p(E,y,T,N.value,S),N!==null&&(t&&N.alternate!==null&&E.delete(N.key===null?T:N.key),m=i(N,m,T),k===null?_=N:k.sibling=N,k=N);return t&&E.forEach(function(L){return e(y,L)}),Ce&&_s(y,T),_}function b(y,m,g,S){if(typeof g=="object"&&g!==null&&g.type===xi&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Pl:e:{for(var _=g.key,k=m;k!==null;){if(k.key===_){if(_=g.type,_===xi){if(k.tag===7){n(y,k.sibling),m=s(k,g.props.children),m.return=y,y=m;break e}}else if(k.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Cr&&My(_)===k.type){n(y,k.sibling),m=s(k,g.props),m.ref=Vo(y,k,g),m.return=y,y=m;break e}n(y,k);break}else e(y,k);k=k.sibling}g.type===xi?(m=Bs(g.props.children,y.mode,S,g.key),m.return=y,y=m):(S=bc(g.type,g.key,g.props,null,y.mode,S),S.ref=Vo(y,m,g),S.return=y,y=S)}return o(y);case wi:e:{for(k=g.key;m!==null;){if(m.key===k)if(m.tag===4&&m.stateNode.containerInfo===g.containerInfo&&m.stateNode.implementation===g.implementation){n(y,m.sibling),m=s(m,g.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else e(y,m);m=m.sibling}m=Yd(g,y.mode,S),m.return=y,y=m}return o(y);case Cr:return k=g._init,b(y,m,k(g._payload),S)}if(Zo(g))return v(y,m,g,S);if(Io(g))return w(y,m,g,S);Fl(y,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(n(y,m.sibling),m=s(m,g),m.return=y,y=m):(n(y,m),m=Qd(g,y.mode,S),m.return=y,y=m),o(y)):n(y,m)}return b}var io=qb(!0),Kb=qb(!1),Kc=ds(null),Gc=null,Ai=null,om=null;function am(){om=Ai=Gc=null}function lm(t){var e=Kc.current;_e(Kc),t._currentValue=e}function cf(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Fi(t,e){Gc=t,om=Ai=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Tt=!0),t.firstContext=null)}function Xt(t){var e=t._currentValue;if(om!==t)if(t={context:t,memoizedValue:e,next:null},Ai===null){if(Gc===null)throw Error(O(308));Ai=t,Gc.dependencies={lanes:0,firstContext:t}}else Ai=Ai.next=t;return e}var Ps=null;function cm(t){Ps===null?Ps=[t]:Ps.push(t)}function Gb(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,cm(e)):(n.next=s.next,s.next=n),e.interleaved=n,ar(t,r)}function ar(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Ar=!1;function um(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zb(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function rr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Gr(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,de&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,ar(t,n)}return s=r.interleaved,s===null?(e.next=e,cm(r)):(e.next=s.next,s.next=e),r.interleaved=e,ar(t,n)}function mc(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Zp(t,n)}}function $y(t,e){var n=t.updateQueue,r=t.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=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Zc(t,e,n,r){var s=t.updateQueue;Ar=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,u=c=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,w=a;switch(f=e,p=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){d=v.call(p,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,f=typeof v=="function"?v.call(p,d,f):v,f==null)break e;d=Ne({},d,f);break e;case 2:Ar=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,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(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);Ks|=o,t.lanes=o,t.memoizedState=d}}function Vy(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(O(191,s));s.call(r)}}}var fl={},$n=ds(fl),ja=ds(fl),Na=ds(fl);function Rs(t){if(t===fl)throw Error(O(174));return t}function dm(t,e){switch(xe(Na,e),xe(ja,t),xe($n,fl),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Bh(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Bh(e,t)}_e($n),xe($n,e)}function oo(){_e($n),_e(ja),_e(Na)}function Jb(t){Rs(Na.current);var e=Rs($n.current),n=Bh(e,t.type);e!==n&&(xe(ja,t),xe($n,n))}function hm(t){ja.current===t&&(_e($n),_e(ja))}var Re=ds(0);function Jc(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Wd=[];function fm(){for(var t=0;t<Wd.length;t++)Wd[t]._workInProgressVersionPrimary=null;Wd.length=0}var gc=pr.ReactCurrentDispatcher,qd=pr.ReactCurrentBatchConfig,qs=0,je=null,Ge=null,Xe=null,Qc=!1,la=!1,Oa=0,OA=0;function ct(){throw Error(O(321))}function pm(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!_n(t[n],e[n]))return!1;return!0}function mm(t,e,n,r,s,i){if(qs=i,je=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,gc.current=t===null||t.memoizedState===null?MA:$A,t=n(r,s),la){i=0;do{if(la=!1,Oa=0,25<=i)throw Error(O(301));i+=1,Xe=Ge=null,e.updateQueue=null,gc.current=VA,t=n(r,s)}while(la)}if(gc.current=Yc,e=Ge!==null&&Ge.next!==null,qs=0,Xe=Ge=je=null,Qc=!1,e)throw Error(O(300));return t}function gm(){var t=Oa!==0;return Oa=0,t}function Pn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?je.memoizedState=Xe=t:Xe=Xe.next=t,Xe}function en(){if(Ge===null){var t=je.alternate;t=t!==null?t.memoizedState:null}else t=Ge.next;var e=Xe===null?je.memoizedState:Xe.next;if(e!==null)Xe=e,Ge=t;else{if(t===null)throw Error(O(310));Ge=t,t={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},Xe===null?je.memoizedState=Xe=t:Xe=Xe.next=t}return Xe}function Ia(t,e){return typeof e=="function"?e(t):e}function Kd(t){var e=en(),n=e.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=t;var r=Ge,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((qs&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,je.lanes|=u,Ks|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,_n(r,e.memoizedState)||(Tt=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do i=s.lane,je.lanes|=i,Ks|=i,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Gd(t){var e=en(),n=e.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,i=e.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);_n(i,e.memoizedState)||(Tt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function Qb(){}function Yb(t,e){var n=je,r=en(),s=e(),i=!_n(r.memoizedState,s);if(i&&(r.memoizedState=s,Tt=!0),r=r.queue,ym(tS.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||Xe!==null&&Xe.memoizedState.tag&1){if(n.flags|=2048,La(9,eS.bind(null,n,r,s,e),void 0,null),tt===null)throw Error(O(349));qs&30||Xb(n,e,s)}return s}function Xb(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=je.updateQueue,e===null?(e={lastEffect:null,stores:null},je.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function eS(t,e,n,r){e.value=n,e.getSnapshot=r,nS(e)&&rS(t)}function tS(t,e,n){return n(function(){nS(e)&&rS(t)})}function nS(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!_n(t,n)}catch{return!0}}function rS(t){var e=ar(t,1);e!==null&&bn(e,t,1,-1)}function Fy(t){var e=Pn();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ia,lastRenderedState:t},e.queue=t,t=t.dispatch=DA.bind(null,je,t),[e.memoizedState,t]}function La(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=je.updateQueue,e===null?(e={lastEffect:null,stores:null},je.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function sS(){return en().memoizedState}function yc(t,e,n,r){var s=Pn();je.flags|=t,s.memoizedState=La(1|e,n,void 0,r===void 0?null:r)}function Mu(t,e,n,r){var s=en();r=r===void 0?null:r;var i=void 0;if(Ge!==null){var o=Ge.memoizedState;if(i=o.destroy,r!==null&&pm(r,o.deps)){s.memoizedState=La(e,n,i,r);return}}je.flags|=t,s.memoizedState=La(1|e,n,i,r)}function Uy(t,e){return yc(8390656,8,t,e)}function ym(t,e){return Mu(2048,8,t,e)}function iS(t,e){return Mu(4,2,t,e)}function oS(t,e){return Mu(4,4,t,e)}function aS(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function lS(t,e,n){return n=n!=null?n.concat([t]):null,Mu(4,4,aS.bind(null,e,t),n)}function vm(){}function cS(t,e){var n=en();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&pm(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function uS(t,e){var n=en();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&pm(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function dS(t,e,n){return qs&21?(_n(n,e)||(n=gb(),je.lanes|=n,Ks|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Tt=!0),t.memoizedState=n)}function IA(t,e){var n=me;me=n!==0&&4>n?n:4,t(!0);var r=qd.transition;qd.transition={};try{t(!1),e()}finally{me=n,qd.transition=r}}function hS(){return en().memoizedState}function LA(t,e,n){var r=Jr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fS(t))pS(e,n);else if(n=Gb(t,e,n,r),n!==null){var s=wt();bn(n,t,r,s),mS(n,e,r)}}function DA(t,e,n){var r=Jr(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fS(t))pS(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,_n(a,o)){var l=e.interleaved;l===null?(s.next=s,cm(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}n=Gb(t,e,s,r),n!==null&&(s=wt(),bn(n,t,r,s),mS(n,e,r))}}function fS(t){var e=t.alternate;return t===je||e!==null&&e===je}function pS(t,e){la=Qc=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function mS(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Zp(t,n)}}var Yc={readContext:Xt,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},MA={readContext:Xt,useCallback:function(t,e){return Pn().memoizedState=[t,e===void 0?null:e],t},useContext:Xt,useEffect:Uy,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,yc(4194308,4,aS.bind(null,e,t),n)},useLayoutEffect:function(t,e){return yc(4194308,4,t,e)},useInsertionEffect:function(t,e){return yc(4,2,t,e)},useMemo:function(t,e){var n=Pn();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Pn();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=LA.bind(null,je,t),[r.memoizedState,t]},useRef:function(t){var e=Pn();return t={current:t},e.memoizedState=t},useState:Fy,useDebugValue:vm,useDeferredValue:function(t){return Pn().memoizedState=t},useTransition:function(){var t=Fy(!1),e=t[0];return t=IA.bind(null,t[1]),Pn().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=je,s=Pn();if(Ce){if(n===void 0)throw Error(O(407));n=n()}else{if(n=e(),tt===null)throw Error(O(349));qs&30||Xb(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,Uy(tS.bind(null,r,i,t),[t]),r.flags|=2048,La(9,eS.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=Pn(),e=tt.identifierPrefix;if(Ce){var n=nr,r=tr;n=(r&~(1<<32-xn(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Oa++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=OA++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},$A={readContext:Xt,useCallback:cS,useContext:Xt,useEffect:ym,useImperativeHandle:lS,useInsertionEffect:iS,useLayoutEffect:oS,useMemo:uS,useReducer:Kd,useRef:sS,useState:function(){return Kd(Ia)},useDebugValue:vm,useDeferredValue:function(t){var e=en();return dS(e,Ge.memoizedState,t)},useTransition:function(){var t=Kd(Ia)[0],e=en().memoizedState;return[t,e]},useMutableSource:Qb,useSyncExternalStore:Yb,useId:hS,unstable_isNewReconciler:!1},VA={readContext:Xt,useCallback:cS,useContext:Xt,useEffect:ym,useImperativeHandle:lS,useInsertionEffect:iS,useLayoutEffect:oS,useMemo:uS,useReducer:Gd,useRef:sS,useState:function(){return Gd(Ia)},useDebugValue:vm,useDeferredValue:function(t){var e=en();return Ge===null?e.memoizedState=t:dS(e,Ge.memoizedState,t)},useTransition:function(){var t=Gd(Ia)[0],e=en().memoizedState;return[t,e]},useMutableSource:Qb,useSyncExternalStore:Yb,useId:hS,unstable_isNewReconciler:!1};function dn(t,e){if(t&&t.defaultProps){e=Ne({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function uf(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Ne({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var $u={isMounted:function(t){return(t=t._reactInternals)?Xs(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=wt(),s=Jr(t),i=rr(r,s);i.payload=e,n!=null&&(i.callback=n),e=Gr(t,i,s),e!==null&&(bn(e,t,s,r),mc(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=wt(),s=Jr(t),i=rr(r,s);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=Gr(t,i,s),e!==null&&(bn(e,t,s,r),mc(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=wt(),r=Jr(t),s=rr(n,r);s.tag=2,e!=null&&(s.callback=e),e=Gr(t,s,r),e!==null&&(bn(e,t,r,n),mc(e,t,r))}};function By(t,e,n,r,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!Ca(n,r)||!Ca(s,i):!0}function gS(t,e,n){var r=!1,s=ts,i=e.contextType;return typeof i=="object"&&i!==null?i=Xt(i):(s=At(e)?Hs:ft.current,r=e.contextTypes,i=(r=r!=null)?ro(t,s):ts),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=$u,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function zy(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&$u.enqueueReplaceState(e,e.state,null)}function df(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},um(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Xt(i):(i=At(e)?Hs:ft.current,s.context=ro(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(uf(t,e,i,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&$u.enqueueReplaceState(s,s.state,null),Zc(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function ao(t,e){try{var n="",r=e;do n+=fC(r),r=r.return;while(r);var s=n}catch(i){s=`
40Error generating stack: `+i.message+`
41`+i.stack}return{value:t,source:e,stack:s,digest:null}}function Zd(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function hf(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var FA=typeof WeakMap=="function"?WeakMap:Map;function yS(t,e,n){n=rr(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){eu||(eu=!0,Sf=r),hf(t,e)},n}function vS(t,e,n){n=rr(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){hf(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){hf(t,e),typeof r!="function"&&(Zr===null?Zr=ne
vendor: 7,585 bytes, line 41
41w Set([this]):Zr.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Hy(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new FA;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=eP.bind(null,t,e,n),e.then(t,t))}function Wy(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function qy(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=rr(-1,1),e.tag=2,Gr(n,e,1))),n.lanes|=1),t)}var UA=pr.ReactCurrentOwner,Tt=!1;function mt(t,e,n,r){e.child=t===null?Kb(e,null,n,r):io(e,t.child,n,r)}function Ky(t,e,n,r,s){n=n.render;var i=e.ref;return Fi(e,s),r=mm(t,e,n,r,i,s),n=gm(),t!==null&&!Tt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,lr(t,e,s)):(Ce&&n&&rm(e),e.flags|=1,mt(t,e,r,s),e.child)}function Gy(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!Tm(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,wS(t,e,i,r,s)):(t=bc(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ca,n(o,r)&&t.ref===e.ref)return lr(t,e,s)}return e.flags|=1,t=Qr(i,r),t.ref=e.ref,t.return=e,e.child=t}function wS(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(Ca(i,r)&&t.ref===e.ref)if(Tt=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(Tt=!0);else return e.lanes=t.lanes,lr(t,e,s)}return ff(t,e,n,r,s)}function xS(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(Ri,Rt),Rt|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,xe(Ri,Rt),Rt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,xe(Ri,Rt),Rt|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,xe(Ri,Rt),Rt|=r;return mt(t,e,s,n),e.child}function bS(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function ff(t,e,n,r,s){var i=At(n)?Hs:ft.current;return i=ro(e,i),Fi(e,s),n=mm(t,e,n,r,i,s),r=gm(),t!==null&&!Tt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,lr(t,e,s)):(Ce&&r&&rm(e),e.flags|=1,mt(t,e,n,s),e.child)}function Zy(t,e,n,r,s){if(At(n)){var i=!0;Hc(e)}else i=!1;if(Fi(e,s),e.stateNode===null)vc(t,e),gS(e,n,r),df(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Xt(c):(c=At(n)?Hs:ft.current,c=ro(e,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&zy(e,o,r,c),Ar=!1;var f=e.memoizedState;o.state=f,Zc(e,r,o,s),l=e.memoizedState,a!==r||f!==l||Ct.current||Ar?(typeof u=="function"&&(uf(e,n,u,r),l=e.memoizedState),(a=Ar||By(e,n,a,r,f,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,Zb(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:dn(e.type,a),o.props=c,d=e.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Xt(l):(l=At(n)?Hs:ft.current,l=ro(e,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&zy(e,o,r,l),Ar=!1,f=e.memoizedState,o.state=f,Zc(e,r,o,s);var v=e.memoizedState;a!==d||f!==v||Ct.current||Ar?(typeof p=="function"&&(uf(e,n,p,r),v=e.memoizedState),(c=Ar||By(e,n,c,r,f,v,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=v),o.props=r,o.state=v,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return pf(t,e,n,r,i,s)}function pf(t,e,n,r,s,i){bS(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&Iy(e,n,!1),lr(t,e,i);r=e.stateNode,UA.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=io(e,t.child,null,i),e.child=io(e,null,a,i)):mt(t,e,a,i),e.memoizedState=r.state,s&&Iy(e,n,!0),e.child}function SS(t){var e=t.stateNode;e.pendingContext?Oy(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Oy(t,e.context,!1),dm(t,e.containerInfo)}function Jy(t,e,n,r,s){return so(),im(s),e.flags|=256,mt(t,e,n,r),e.child}var mf={dehydrated:null,treeContext:null,retryLane:0};function gf(t){return{baseLanes:t,cachePool:null,transitions:null}}function _S(t,e,n){var r=e.pendingProps,s=Re.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),xe(Re,s&1),t===null)return lf(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Uu(o,r,0,null),t=Bs(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=gf(n),e.memoizedState=mf,t):wm(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return BA(t,e,o,r,a,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Qr(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Qr(a,i):(i=Bs(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?gf(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=mf,r}return i=t.child,t=i.sibling,r=Qr(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function wm(t,e){return e=Uu({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Ul(t,e,n,r){return r!==null&&im(r),io(e,t.child,null,n),t=wm(e,e.pen
vendor: 4,400 bytes, line 41
41dingProps.children),t.flags|=2,e.memoizedState=null,t}function BA(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=Zd(Error(O(422))),Ul(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=Uu({mode:"visible",children:r.children},s,0,null),i=Bs(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&io(e,t.child,null,o),e.child.memoizedState=gf(o),e.memoizedState=mf,i);if(!(e.mode&1))return Ul(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(O(419)),r=Zd(i,r,void 0),Ul(t,e,o,r)}if(a=(o&t.childLanes)!==0,Tt||a){if(r=tt,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,ar(t,s),bn(r,t,s,-1))}return Em(),r=Zd(Error(O(421))),Ul(t,e,o,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=tP.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,Ot=Kr(s.nextSibling),It=e,Ce=!0,yn=null,t!==null&&(Kt[Gt++]=tr,Kt[Gt++]=nr,Kt[Gt++]=Ws,tr=t.id,nr=t.overflow,Ws=e),e=wm(e,r.children),e.flags|=4096,e)}function Qy(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),cf(t.return,e,n)}function Jd(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function kS(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(mt(t,e,r.children,n),r=Re.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Qy(t,n,e);else if(t.tag===19)Qy(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(xe(Re,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&Jc(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),Jd(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Jc(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}Jd(e,!0,n,null,i);break;case"together":Jd(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function vc(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function lr(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Ks|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(O(153));if(e.child!==null){for(t=e.child,n=Qr(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Qr(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function zA(t,e,n){switch(e.tag){case 3:SS(e),so();break;case 5:Jb(e);break;case 1:At(e.type)&&Hc(e);break;case 4:dm(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;xe(Kc,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(xe(Re,Re.current&1),e.flags|=128,null):n&e.child.childLanes?_S(t,e,n):(xe(Re,Re.current&1),t=lr(t,e,n),t!==null?t.sibling:null);xe(Re,Re.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return kS(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),xe(Re,Re.current),r)break;return null;case 22:case 23:return e.lanes=0,xS(t,e,n)}return lr(t,e,n)}var ES,yf,TS,CS;ES=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yf=function(){};TS=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Rs($n.current);var i=null;switch(n){case"input":s=$h(t,s),r=$h(t,r),i=[];break;case"select":s=Ne({},s,{value:void 0}),r=Ne({},r,{value:void 0}),i=[];break;
vendor: 5,781 bytes, line 41
41case"textarea":s=Uh(t,s),r=Uh(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Bc)}zh(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(xa.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(xa.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Se("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};CS=function(t,e,n,r){n!==r&&(e.flags|=4)};function Fo(t,e){if(!Ce)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function ut(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function HA(t,e,n){var r=e.pendingProps;switch(sm(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(e),null;case 1:return At(e.type)&&zc(),ut(e),null;case 3:return r=e.stateNode,oo(),_e(Ct),_e(ft),fm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Vl(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,yn!==null&&(Ef(yn),yn=null))),yf(t,e),ut(e),null;case 5:hm(e);var s=Rs(Na.current);if(n=e.type,t!==null&&e.stateNode!=null)TS(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(O(166));return ut(e),null}if(t=Rs($n.current),Vl(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[Ln]=e,r[Ra]=i,t=(e.mode&1)!==0,n){case"dialog":Se("cancel",r),Se("close",r);break;case"iframe":case"object":case"embed":Se("load",r);break;case"video":case"audio":for(s=0;s<Qo.length;s++)Se(Qo[s],r);break;case"source":Se("error",r);break;case"img":case"image":case"link":Se("error",r),Se("load",r);break;case"details":Se("toggle",r);break;case"input":oy(r,i),Se("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Se("invalid",r);break;case"textarea":ly(r,i),Se("invalid",r)}zh(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&&$l(r.textContent,a,t),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&$l(r.textContent,a,t),s=["children",""+a]):xa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Se("scroll",r)}switch(n){case"input":Rl(r),ay(r,i,!0);break;case"textarea":Rl(r),cy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Bc)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=tb(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Ln]=e,t[Ra]=r,ES(t,e,!1,!1),e.stateNode=t;e:{switch(o=Hh(n,r),n){case"dialog":Se("cancel",t),Se("close",t),s=r;break;case"iframe":case"object":case"embed":Se("load",t),s=r;break;case"video":case"audio":for(s=0;s<Qo.length;s++)Se(Qo[s],t);s=r;break;case"source":Se("error",t),s=r;break;case"img":case"image":case"link":Se("error",t),Se("load",t),s=r;break;case"details":Se("toggle",t),s=r;break;case"input":oy(t,r),s=$h(t,r),Se("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=Ne({},r,{value:void 0}),Se("invalid",t);break;case"textarea":ly(t,r),s=Uh(t,r),Se("invalid",t);break;default:s=r}zh(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?sb(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&nb(t,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ba(t,l):typeof l=="number"&&ba(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(xa.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Se("scroll",t):l!=null&&zp(t,i,l,o))}switch(n){case"input":Rl(t),ay(t,r,!1);break;case"textarea":Rl(t),cy(t);break;case"option":r.value!=null&&t.setAttribute("value",""+es(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?Di(t,!!r.multiple,i,!1):r.defaultValue!=null&&Di(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Bc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}
vendor: 28,777 bytes, line 41
41return ut(e),null;case 6:if(t&&e.stateNode!=null)CS(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(O(166));if(n=Rs(Na.current),Rs($n.current),Vl(e)){if(r=e.stateNode,n=e.memoizedProps,r[Ln]=e,(i=r.nodeValue!==n)&&(t=It,t!==null))switch(t.tag){case 3:$l(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&$l(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ln]=e,e.stateNode=r}return ut(e),null;case 13:if(_e(Re),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Ce&&Ot!==null&&e.mode&1&&!(e.flags&128))Wb(),so(),e.flags|=98560,i=!1;else if(i=Vl(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(O(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(O(317));i[Ln]=e}else so(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;ut(e),i=!1}else yn!==null&&(Ef(yn),yn=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Re.current&1?Ze===0&&(Ze=3):Em())),e.updateQueue!==null&&(e.flags|=4),ut(e),null);case 4:return oo(),yf(t,e),t===null&&Aa(e.stateNode.containerInfo),ut(e),null;case 10:return lm(e.type._context),ut(e),null;case 17:return At(e.type)&&zc(),ut(e),null;case 19:if(_e(Re),i=e.memoizedState,i===null)return ut(e),null;if(r=(e.flags&128)!==0,o=i.rendering,o===null)if(r)Fo(i,!1);else{if(Ze!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Jc(t),o!==null){for(e.flags|=128,Fo(i,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,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,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return xe(Re,Re.current&1|2),e.child}t=t.sibling}i.tail!==null&&Ve()>lo&&(e.flags|=128,r=!0,Fo(i,!1),e.lanes=4194304)}else{if(!r)if(t=Jc(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Fo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ce)return ut(e),null}else 2*Ve()-i.renderingStartTime>lo&&n!==1073741824&&(e.flags|=128,r=!0,Fo(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ve(),e.sibling=null,n=Re.current,xe(Re,r?n&1|2:n&1),e):(ut(e),null);case 22:case 23:return km(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Rt&1073741824&&(ut(e),e.subtreeFlags&6&&(e.flags|=8192)):ut(e),null;case 24:return null;case 25:return null}throw Error(O(156,e.tag))}function WA(t,e){switch(sm(e),e.tag){case 1:return At(e.type)&&zc(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return oo(),_e(Ct),_e(ft),fm(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return hm(e),null;case 13:if(_e(Re),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(O(340));so()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return _e(Re),null;case 4:return oo(),null;case 10:return lm(e.type._context),null;case 22:case 23:return km(),null;case 24:return null;default:return null}}var Bl=!1,ht=!1,qA=typeof WeakSet=="function"?WeakSet:Set,B=null;function Pi(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){De(t,e,r)}else n.current=null}function vf(t,e,n){try{n()}catch(r){De(t,e,r)}}var Yy=!1;function KA(t,e){if(ef=Vc,t=Nb(),nm(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=t,f=null;t:for(;;){for(var p;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===t)break t;if(f===n&&++c===s&&(a=o),f===i&&++u===r&&(l=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(tf={focusedElem:t,selectionRange:n},Vc=!1,B=e;B!==null;)if(e=B,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,B=t;else for(;B!==null;){e=B;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,b=v.memoizedState,y=e.stateNode,m=y.getSnapshotBeforeUpdate(e.elementType===e.type?w:dn(e.type,w),b);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var g=e.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(S){De(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,B=t;break}B=e.return}return v=Yy,Yy=!1,v}function ca(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&vf(e,n,i)}s=s.next}while(s!==r)}}function Vu(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function wf(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function AS(t){var e=t.alternate;e!==null&&(t.alternate=null,AS(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Ln],delete e[Ra],delete e[sf],delete e[PA],delete e[RA])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function PS(t){return t.tag===5||t.tag===3||t.tag===4}function Xy(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||PS(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function xf(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Bc));else if(r!==4&&(t=t.child,t!==null))for(xf(t,e,n),t=t.sibling;t!==null;)xf(t,e,n),t=t.sibling}function bf(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(bf(t,e,n),t=t.sibling;t!==null;)bf(t,e,n),t=t.sibling}var st=null,gn=!1;function Sr(t,e,n){for(n=n.child;n!==null;)RS(t,e,n),n=n.sibling}function RS(t,e,n){if(Mn&&typeof Mn.onCommitFiberUnmount=="function")try{Mn.onCommitFiberUnmount(ju,n)}catch{}switch(n.tag){case 5:ht||Pi(n,e);case 6:var r=st,s=gn;st=null,Sr(t,e,n),st=r,gn=s,st!==null&&(gn?(t=st,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):st.removeChild(n.stateNode));break;case 18:st!==null&&(gn?(t=st,n=n.stateNode,t.nodeType===8?zd(t.parentNode,n):t.nodeType===1&&zd(t,n),Ea(t)):zd(st,n.stateNode));break;case 4:r=st,s=gn,st=n.stateNode.containerInfo,gn=!0,Sr(t,e,n),st=r,gn=s;break;case 0:case 11:case 14:case 15:if(!ht&&(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)&&vf(n,e,o),s=s.next}while(s!==r)}Sr(t,e,n);break;case 1:if(!ht&&(Pi(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){De(n,e,a)}Sr(t,e,n);break;case 21:Sr(t,e,n);break;case 22:n.mode&1?(ht=(r=ht)||n.memoizedState!==null,Sr(t,e,n),ht=r):Sr(t,e,n);break;default:Sr(t,e,n)}}function ev(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new qA),e.forEach(function(r){var s=nP.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function on(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:st=a.stateNode,gn=!1;break e;case 3:st=a.stateNode.containerInfo,gn=!0;break e;case 4:st=a.stateNode.containerInfo,gn=!0;break e}a=a.return}if(st===null)throw Error(O(160));RS(i,o,s),st=null,gn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){De(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)jS(e,t),e=e.sibling}function jS(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(on(e,t),Cn(t),r&4){try{ca(3,t,t.return),Vu(3,t)}catch(w){De(t,t.return,w)}try{ca(5,t,t.return)}catch(w){De(t,t.return,w)}}break;case 1:on(e,t),Cn(t),r&512&&n!==null&&Pi(n,n.return);break;case 5:if(on(e,t),Cn(t),r&512&&n!==null&&Pi(n,n.return),t.flags&32){var s=t.stateNode;try{ba(s,"")}catch(w){De(t,t.return,w)}}if(r&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=n!==null?n.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&Xx(s,i),Hh(a,o);var c=Hh(a,i);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?sb(s,d):u==="dangerouslySetInnerHTML"?nb(s,d):u==="children"?ba(s,d):zp(s,u,d,c)}switch(a){case"input":Vh(s,i);break;case"textarea":eb(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Di(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?Di(s,!!i.multiple,i.defaultValue,!0):Di(s,!!i.multiple,i.multiple?[]:"",!1))}s[Ra]=i}catch(w){De(t,t.return,w)}}break;case 6:if(on(e,t),Cn(t),r&4){if(t.stateNode===null)throw Error(O(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(w){De(t,t.return,w)}}break;case 3:if(on(e,t),Cn(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ea(e.containerInfo)}catch(w){De(t,t.return,w)}break;case 4:on(e,t),Cn(t);break;case 13:on(e,t),Cn(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Sm=Ve())),r&4&&ev(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(ht=(c=ht)||u,on(e,t),ht=c):on(e,t),Cn(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(B=t,u=t.child;u!==null;){for(d=B=u;B!==null;){switch(f=B,p=f.child,f.tag){case 0:case 11:case 14:case 15:ca(4,f,f.return);break;case 1:Pi(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(w){De(r,n,w)}}break;case 5:Pi(f,f.return);break;case 22:if(f.memoizedState!==null){nv(d);continue}}p!==null?(p.return=f,B=p):nv(d)}u=u.sibling}e:for(u=null,d=t;;){if(d.tag===5){if(u===null){u=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=rb("display",o))}catch(w){De(t,t.return,w)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(w){De(t,t.return,w)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:on(e,t),Cn(t),r&4&&ev(t);break;case 21:break;default:on(e,t),Cn(t)}}function Cn(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(PS(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ba(s,""),r.flags&=-33);var i=Xy(t);bf(t,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Xy(t);xf(t,a,o);break;default:throw Error(O(161))}}catch(l){De(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function GA(t,e,n){B=t,NS(t)}function NS(t,e,n){for(var r=(t.mode&1)!==0;B!==null;){var s=B,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Bl;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||ht;a=Bl;var c=ht;if(Bl=o,(ht=l)&&!c)for(B=s;B!==null;)o=B,l=o.child,o.tag===22&&o.memoizedState!==null?rv(s):l!==null?(l.return=o,B=l):rv(s);for(;i!==null;)B=i,NS(i),i=i.sibling;B=s,Bl=a,ht=c}tv(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,B=i):tv(t)}}function tv(t){for(;B!==null;){var e=B;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:ht||Vu(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!ht)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:dn(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&Vy(e,i,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}Vy(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Ea(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}ht||e.flags&512&&wf(e)}catch(f){De(e,e.return,f)}}if(e===t){B=null;break}if(n=e.sibling,n!==null){n.return=e.return,B=n;break}B=e.return}}function nv(t){for(;B!==null;){var e=B;if(e===t){B=null;break}var n=e.sibling;if(n!==null){n.return=e.return,B=n;break}B=e.return}}function rv(t){for(;B!==null;){var e=B;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Vu(4,e)}catch(l){De(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(l){De(e,s,l)}}var i=e.return;try{wf(e)}catch(l){De(e,i,l)}break;case 5:var o=e.return;try{wf(e)}catch(l){De(e,o,l)}}}catch(l){De(e,e.return,l)}if(e===t){B=null;break}var a=e.sibling;if(a!==null){a.return=e.return,B=a;break}B=e.return}}var ZA=Math.ceil,Xc=pr.ReactCurrentDispatcher,xm=pr.ReactCurrentOwner,Qt=pr.ReactCurrentBatchConfig,de=0,tt=null,qe=null,ot=0,Rt=0,Ri=ds(0),Ze=0,Da=null,Ks=0,Fu=0,bm=0,ua=null,Et=null,Sm=0,lo=1/0,Jn=null,eu=!1,Sf=null,Zr=null,zl=!1,Fr=null,tu=0,da=0,_f=null,wc=-1,xc=0;function wt(){return de&6?Ve():wc!==-1?wc:wc=Ve()}function Jr(t){return t.mode&1?de&2&&ot!==0?ot&-ot:NA.transition!==null?(xc===0&&(xc=gb()),xc):(t=me,t!==0||(t=window.event,t=t===void 0?16:_b(t.type)),t):1}function bn(t,e,n,r){if(50<da)throw da=0,_f=null,Error(O(185));ul(t,n,r),(!(de&2)||t!==tt)&&(t===tt&&(!(de&2)&&(Fu|=n),Ze===4&&jr(t,ot)),Pt(t,r),n===1&&de===0&&!(e.mode&1)&&(lo=Ve()+500,Du&&hs()))}function Pt(t,e){var n=t.callbackNode;NC(t,e);var r=$c(t,t===tt?ot:0);if(r===0)n!==null&&hy(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&hy(n),e===1)t.tag===0?jA(sv.bind(null,t)):Bb(sv.bind(null,t)),CA(function(){!(de&6)&&hs()}),n=null;else{switch(yb(r)){case 1:n=Gp;break;case 4:n=pb;break;case 16:n=Mc;break;case 536870912:n=mb;break;default:n=Mc}n=FS(n,OS.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function OS(t,e){if(wc=-1,xc=0,de&6)throw Error(O(327));var n=t.callbackNode;if(Ui()&&t.callbackNode!==n)return null;var r=$c(t,t===tt?ot:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=nu(t,r);else{e=r;var s=de;de|=2;var i=LS();(tt!==t||ot!==e)&&(Jn=null,lo=Ve()+500,Us(t,e));do try{YA();break}catch(a){IS(t,a)}while(!0);am(),Xc.current=i,de=s,qe!==null?e=0:(tt=null,ot=0,e=Ze)}if(e!==0){if(e===2&&(s=Zh(t),s!==0&&(r=s,e=kf(t,s))),e===1)throw n=Da,Us(t,0),jr(t,r),Pt(t,Ve()),n;if(e===6)jr(t,r);else{if(s=t.current.alternate,!(r&30)&&!JA(s)&&(e=nu(t,r),e===2&&(i=Zh(t),i!==0&&(r=i,e=kf(t,i))),e===1))throw n=Da,Us(t,0),jr(t,r),Pt(t,Ve()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(O(345));case 2:ks(t,Et,Jn);break;case 3:if(jr(t,r),(r&130023424)===r&&(e=Sm+500-Ve(),10<e)){if($c(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){wt(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=rf(ks.bind(null,t,Et,Jn),e);break}ks(t,Et,Jn);break;case 4:if(jr(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var o=31-xn(r);i=1<<o,o=e[o],o>s&&(s=o),r&=~i}if(r=s,r=Ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZA(r/1960))-r,10<r){t.timeoutHandle=rf(ks.bind(null,t,Et,Jn),r);break}ks(t,Et,Jn);break;case 5:ks(t,Et,Jn);break;default:throw Error(O(329))}}}return Pt(t,Ve()),t.callbackNode===n?OS.bind(null,t):null}function kf(t,e){var n=ua;return t.current.memoizedState.isDehydrated&&(Us(t,e).flags|=256),t=nu(t,e),t!==2&&(e=Et,Et=n,e!==null&&Ef(e)),t}function Ef(t){Et===null?Et=t:Et.push.apply(Et,t)}function JA(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!_n(i(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function jr(t,e){for(e&=~bm,e&=~Fu,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-xn(e),r=1<<n;t[n]=-1,e&=~r}}function sv(t){if(de&6)throw Error(O(327));Ui();var e=$c(t,0);if(!(e&1))return Pt(t,Ve()),null;var n=nu(t,e);if(t.tag!==0&&n===2){var r=Zh(t);r!==0&&(e=r,n=kf(t,r))}if(n===1)throw n=Da,Us(t,0),jr(t,e),Pt(t,Ve()),n;if(n===6)throw Error(O(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,ks(t,Et,Jn),Pt(t,Ve()),null}function _m(t,e){var n=de;de|=1;try{return t(e)}finally{de=n,de===0&&(lo=Ve()+500,Du&&hs())}}function Gs(t){Fr!==null&&Fr.tag===0&&!(de&6)&&Ui();var e=de;de|=1;var n=Qt.transition,r=me;try{if(Qt.transition=null,me=1,t)return t()}finally{me=r,Qt.transition=n,de=e,!(de&6)&&hs()}}function km(){Rt=Ri.current,_e(Ri)}function Us(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,TA(n)),qe!==null)for(n=qe.return;n!==null;){var r=n;switch(sm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zc();break;case 3:oo(),_e(Ct),_e(ft),fm();break;case 5:hm(r);break;case 4:oo();break;case 13:_e(Re);break;case 19:_e(Re);break;case 10:lm(r.type._context);break;case 22:case 23:km()}n=n.return}if(tt=t,qe=t=Qr(t.current,null),ot=Rt=e,Ze=0,Da=null,bm=Fu=Ks=0,Et=ua=null,Ps!==null){for(e=0;e<Ps.length;e++)if(n=Ps[e],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}Ps=null}return t}function IS(t,e){do{var n=qe;try{if(am(),gc.current=Yc,Qc){for(var r=je.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Qc=!1}if(qs=0,Xe=Ge=je=null,la=!1,Oa=0,xm.current=null,n===null||n.return===null){Ze=1,Da=e,qe=null;break}e:{var i=t,o=n.return,a=n,l=e;if(e=ot,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Wy(o);if(p!==null){p.flags&=-257,qy(p,o,a,i,e),p.mode&1&&Hy(i,c,e),e=p,l=c;var v=e.updateQueue;if(v===null){var w=new Set;w.add(l),e.updateQueue=w}else v.add(l);break e}else{if(!(e&1)){Hy(i,c,e),Em();break e}l=Error(O(426))}}else if(Ce&&a.mode&1){var b=Wy(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),qy(b,o,a,i,e),im(ao(l,a));break e}}i=l=ao(l,a),Ze!==4&&(Ze=2),ua===null?ua=[i]:ua.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var y=yS(i,l,e);$y(i,y);break e;case 1:a=l;var m=i.type,g=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Zr===null||!Zr.has(g)))){i.flags|=65536,e&=-e,i.lanes|=e;var S=vS(i,a,e);$y(i,S);break e}}i=i.return}while(i!==null)}MS(n)}catch(_){e=_,qe===n&&n!==null&&(qe=n=n.return);continue}break}while(!0)}function LS(){var t=Xc.current;return Xc.current=Yc,t===null?Yc:t}function Em(){(Ze===0||Ze===3||Ze===2)&&(Ze=4),tt===null||!(Ks&268435455)&&!(Fu&268435455)||jr(tt,ot)}function nu(t,e){var n=de;de|=2;var r=LS();(tt!==t||ot!==e)&&(Jn=null,Us(t,e));do try{QA();break}catch(s){IS(t,s)}while(!0);if(am(),de=n,Xc.current=r,qe!==null)throw Error(O(261));return tt=null,ot=0,Ze}function QA(){for(;qe!==null;)DS(qe)}function YA(){for(;qe!==null&&!_C();)DS(qe)}function DS(t){var e=VS(t.alternate,t,Rt);t.memoizedProps=t.pendingProps,e===null?MS(t):qe=e,xm.current=null}function MS(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=WA(n,e),n!==null){n.flags&=32767,qe=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ze=6,qe=null;return}}else if(n=HA(n,e,Rt),n!==null){qe=n;return}if(e=e.sibling,e!==null){qe=e;return}qe=e=t}while(e!==null);Ze===0&&(Ze=5)}function ks(t,e,n){var r=me,s=Qt.transition;try{Qt.transition=null,me=1,XA(t,e,n,r)}finally{Qt.transition=s,me=r}return null}function XA(t,e,n,r){do Ui();while(Fr!==null);if(de&6)throw Error(O(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(O(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if(OC(t,i),t===tt&&(qe=tt=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||zl||(zl=!0,FS(Mc,function(){return Ui(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Qt.transition,Qt.transition=null;var o=me;me=1;var a=de;de|=4,xm.current=null,KA(t,n),jS(n,t),wA(tf),Vc=!!ef,tf=ef=null,t.current=n,GA(n),kC(),de=a,me=o,Qt.transition=i}else t.current=n;if(zl&&(zl=!1,Fr=t,tu=s),i=t.pendingLanes,i===0&&(Zr=null),CC(n.stateNode),Pt(t,Ve()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(eu)throw eu=!1,t=Sf,Sf=null,t;return tu&1&&t.tag!==0&&Ui(),i=t.pendingLanes,i&1?t===_f?da++:(da=0,_f=t):da=0,hs(),null}function Ui(){if(Fr!==null){var t=yb(tu),e=Qt.transition,n=me;try{if(Qt.transition=null,me=16>t?16:t,Fr===null)var r=!1;else{if(t=Fr,Fr=null,tu=0,de&6)throw Error(O(331));var s=de;for(de|=4,B=t.current;B!==null;){var i=B,o=i.child;if(B.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(B=c;B!==null;){var u=B;switch(u.tag){case 0:case 11:case 15:ca(8,u,i)}var d=u.child;if(d!==null)d.return=u,B=d;else for(;B!==null;){u=B;var f=u.sibling,p=u.return;if(AS(u),u===c){B=null;break}if(f!==null){f.return=p,B=f;break}B=p}}}var v=i.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var b=w.sibling;w.sibling=null,w=b}while(w!==null)}}B=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,B=o;else e:for(;B!==null;){if(i=B,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ca(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,B=y;break e}B=i.return}}var m=t.current;for(B=m;B!==null;){o=B;var g=o.child;if(o.subtreeFlags&2064&&g!==null)g.return=o,B=g;else e:for(o=m;B!==null;){if(a=B,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Vu(9,a)}}catch(_){De(a,a.return,_)}if(a===o){B=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,B=S;break e}B=a.return}}if(de=s,hs(),Mn&&typeof Mn.onPostCommitFiberRoot=="function")try{Mn.onPostCommitFiberRoot(ju,t)}catch{}r=!0}return r}finally{me=n,Qt.transition=e}}return!1}function iv(t,e,n){e=ao(n,e),e=yS(t,e,1),t=Gr(t,e,1),e=wt(),t!==null&&(ul(t,1,e),Pt(t,e))}function De(t,e,n){if(t.tag===3)iv(t,t,n);else for(;e!==null;){if(e.tag===3){iv(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Zr===null||!Zr.has(r))){t=ao(n,t),t=vS(e,t,1),e=Gr(e,t,1),t=wt(),e!==null&&(ul(e,1,t),Pt(e,t));break}}e=e.return}}function eP(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=wt(),t.pingedLanes|=t.suspendedLanes&n,tt===t&&(ot&n)===n&&(Ze===4||Ze===3&&(ot&130023424)===ot&&500>Ve()-Sm?Us(t,0):bm|=n),Pt(t,e)}function $S(t,e){e===0&&(t.mode&1?(e=Ol,Ol<<=1,!(Ol&130023424)&&(Ol=4194304)):e=1);var n=wt();t=ar(t,e),t!==null&&(ul(t,e,n),Pt(t,n))}function tP(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),$S(t,n)}function nP(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(e),$S(t,n)}var VS;VS=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Ct.current)Tt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Tt=!1,zA(t,e,n);Tt=!!(t.flags&131072)}else Tt=!1,Ce&&e.flags&1048576&&zb(e,qc,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;vc(t,e),t=e.pendingProps;var s=ro(e,ft.current);Fi(e,n),s=mm(null,e,r,t,s,n);var i=gm();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,At(r)?(i=!0,Hc(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,um(e),s.updater=$u,e.stateNode=s,s._reactInternals=e,df(e,r,t,n),e=pf(null,e,r,!0,i,n)):(e.tag=0,Ce&&i&&rm(e),mt(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(vc(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=sP(r),t=dn(r,t),s){case 0:e=ff(null,e,r,t,n);break e;case 1:e=Zy(null,e,r,t,n);break e;case 11:e=Ky(null,e,r,t,n);break e;case 14:e=Gy(null,e,r,dn(r.type,t),n);break e}throw Error(O(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:dn(r,s),ff(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:dn(r,s),Zy(t,e,r,s,n);case 3:e:{if(SS(e),t===null)throw Error(O(387));r=e.pendingProps,i=e.memoizedState,s=i.element,Zb(t,e),Zc(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=ao(Error(O(423)),e),e=Jy(t,e,r,n,s);break e}else if(r!==s){s=ao(Error(O(424)),e),e=Jy(t,e,r,n,s);break e}else for(Ot=Kr(e.stateNode.containerInfo.firstChild),It=e,Ce=!0,yn=null,n=Kb(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(so(),r===s){e=lr(t,e,n);break e}mt(t,e,r,n)}e=e.child}return e;case 5:return Jb(e),t===null&&lf(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,nf(r,s)?o=null:i!==null&&nf(r,i)&&(e.flags|=32),bS(t,e),mt(t,e,o,n),e.child;case 6:return t===null&&lf(e),null;case 13:return _S(t,e,n);case 4:return dm(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=io(e,null,r,n):mt(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:dn(r,s),Ky(t,e,r,s,n);case 7:return mt(t,e,e.pendingProps,n),e.child;case 8:return mt(t,e,e.pendingProps.children,n),e.child;case 12:return mt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,xe(Kc,r._currentValue),r._currentValue=o,i!==null)if(_n(i.value,o)){if(i.children===s.children&&!Ct.current){e=lr(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);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=rr(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),cf(i.return,n,e),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(O(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),cf(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}mt(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,Fi(e,n),s=Xt(s),r=r(s),e.flags|=1,mt(t,e,r,n),e.child;case 14:return r=e.type,s=dn(r,e.pendingProps),s=dn(r.type,s),Gy(t,e,r,s,n);
vendor: 7,983 bytes, line 41
41case 15:return wS(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:dn(r,s),vc(t,e),e.tag=1,At(r)?(t=!0,Hc(e)):t=!1,Fi(e,n),gS(e,r,s),df(e,r,s,n),pf(null,e,r,!0,t,n);case 19:return kS(t,e,n);case 22:return xS(t,e,n)}throw Error(O(156,e.tag))};function FS(t,e){return fb(t,e)}function rP(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(t,e,n,r){return new rP(t,e,n,r)}function Tm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function sP(t){if(typeof t=="function")return Tm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Wp)return 11;if(t===qp)return 14}return 2}function Qr(t,e){var n=t.alternate;return n===null?(n=Zt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function bc(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")Tm(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case xi:return Bs(n.children,s,i,e);case Hp:o=8,s|=8;break;case Ih:return t=Zt(12,n,e,s|2),t.elementType=Ih,t.lanes=i,t;case Lh:return t=Zt(13,n,e,s),t.elementType=Lh,t.lanes=i,t;case Dh:return t=Zt(19,n,e,s),t.elementType=Dh,t.lanes=i,t;case Jx:return Uu(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Gx:o=10;break e;case Zx:o=9;break e;case Wp:o=11;break e;case qp:o=14;break e;case Cr:o=16,r=null;break e}throw Error(O(130,t==null?t:typeof t,""))}return e=Zt(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Bs(t,e,n,r){return t=Zt(7,t,r,e),t.lanes=n,t}function Uu(t,e,n,r){return t=Zt(22,t,r,e),t.elementType=Jx,t.lanes=n,t.stateNode={isHidden:!1},t}function Qd(t,e,n){return t=Zt(6,t,null,e),t.lanes=n,t}function Yd(t,e,n){return e=Zt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function iP(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Nd(0),this.expirationTimes=Nd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nd(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Cm(t,e,n,r,s,i,o,a,l){return t=new iP(t,e,n,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Zt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},um(i),t}function oP(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wi,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function US(t){if(!t)return ts;t=t._reactInternals;e:{if(Xs(t)!==t||t.tag!==1)throw Error(O(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(At(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(O(171))}if(t.tag===1){var n=t.type;if(At(n))return Ub(t,n,e)}return e}function BS(t,e,n,r,s,i,o,a,l){return t=Cm(n,r,!0,t,s,i,o,a,l),t.context=US(null),n=t.current,r=wt(),s=Jr(n),i=rr(r,s),i.callback=e??null,Gr(n,i,s),t.current.lanes=s,ul(t,s,r),Pt(t,r),t}function Bu(t,e,n,r){var s=e.current,i=wt(),o=Jr(s);return n=US(n),e.context===null?e.context=n:e.pendingContext=n,e=rr(i,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Gr(s,e,o),t!==null&&(bn(t,s,o,i),mc(t,s,o)),o}function ru(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function ov(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Am(t,e){ov(t,e),(t=t.alternate)&&ov(t,e)}function aP(){return null}var zS=typeof reportError=="function"?reportError:function(t){console.error(t)};function Pm(t){this._internalRoot=t}zu.prototype.render=Pm.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(O(409));Bu(t,e,null,null)};zu.prototype.unmount=Pm.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Gs(function(){Bu(null,t,null,null)}),e[or]=null}};function zu(t){this._internalRoot=t}zu.prototype.unstable_scheduleHydration=function(t){if(t){var e=xb();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Rr.length&&e!==0&&e<Rr[n].priority;n++);Rr.splice(n,0,t),n===0&&Sb(t)}};function Rm(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Hu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function av(){}function lP(t,e,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=ru(o);i.call(c)}}var o=BS(e,r,t,0,null,!1,!1,"",av);return t._reactRootContainer=o,t[or]=o.current,Aa(t.nodeType===8?t.parentNode:t),Gs(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=ru(l);a.call(c)}}var l=Cm(t,0,!1,null,null,!1,!1,"",av);return t._reactRootContainer=l,t[or]=l.current,Aa(t.nodeType===8?t.parentNode:t),Gs(function(){Bu(e,l,n,r)}),l}function Wu(t,e,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=ru(o);a.call(l)}}Bu(e,o,t,s)}else o=lP(n,e,t,s,r);return ru(o)}vb=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Jo(e.pendingLanes);n!==0&&(Zp(e,n|1),Pt(e,Ve()),!(de&6)&&(lo=Ve()+500,hs()))}break;case 13:Gs(function(){var r=ar(t,1);if(r!==null){var s=wt();bn(r,t,1,s)}}),Am(t,1)}};Jp=function(t){if(t.tag===13){var e=ar(t,134217728);if(e!==null){var n=wt();bn(e,t,134217728,n)}Am(t,134217728)}};wb=function(t){if(t.tag===13){var e=Jr(t),n=ar(t,e);if(n!==null){var r=wt();bn(n,t,e,r)}Am(t,e)}};xb=function(){return me};bb=function(t,e){var n=me;try{return me=t,e()}finally{me=n}};qh=function(t,e,n){switch(e){case"input":if(Vh(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=Lu(r);if(!s)throw Error(O(90));Yx(r),Vh(r,s)}}}break;case"textarea":eb(t,n);break;case"select":e=n.value,e!=null&&Di(t,!!n.multiple,e,!1)}};ab=_m;lb=Gs;var cP={usingClientEntryPoint:!1,Events:[hl,ki,Lu,ib,ob,_m]},Uo={findFiberByHostInstance:As,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uP={bundleType:Uo.bundleType,version:Uo.version,rendererPackageName:Uo.rendererPackageName,rendererConfig:Uo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=db(t),t===null?null:t.stateNode},findFiberByHostInstance:Uo.findFiberByHostInstance||aP,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
41if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hl.isDisabled&&Hl.supportsFiber)try{ju=Hl.inject(uP),Mn=Hl}catch{}}Vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cP;Vt.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rm(e))throw Error(O(200));return oP(t,e,null,n)};Vt.createRoot=function(t,e){if(!Rm(t))throw Error(O(299));var n=!1,r="",s=zS;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Cm(t,1,!1,null,null,n,!1,r,s),t[or]=e.current,Aa(t.nodeType===8?t.parentNode:t),new Pm(e)};Vt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(O(188)):(t=Object.keys(t).join(","),Error(O(268,t)));return t=db(e),t=t===null?null:t.stateNode,t};Vt.flushSync=function(t){return Gs(t)};Vt.hydrate=function(t,e,n){if(!Hu(e))throw Error(O(200));return Wu(null,t,e,!0,n)};Vt.hydrateRoot=function(t,e,n){if(!Rm(t))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=zS;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=BS(e,null,t,1,n??null,s,!1,i,o),t[or]=e.current,Aa(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new zu(e)};Vt.render=function(t,e,n){if(!Hu(e))throw Error(O(200));return Wu(null,t,e,!1,n)};Vt.unmountComponentAtNode=function(t){if(!Hu(t))throw Error(O(40));return t._reactRootContainer?(Gs(function(){Wu(null,null,t,!1,function(){t._reactRootContainer=null,t[or]=null})}),!0):!1};Vt.unstable_batchedUpdates=_m;Vt.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Hu(n))throw Error(O(200));if(t==null||t._reactInternals===void 0)throw Error(O(38));return Wu(t,e,n,!1,r)};Vt.version="18.3.1-next-f1338f8080-20240426";function HS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(HS)}catch(t){console.error(t)}}HS(),Hx.exports=Vt;var pl=Hx.exports;const WS=ll(pl);var qS,lv=pl;qS=lv.createRoot,lv.hydrateRoot;const dP="modulepreload",hP=function(t){return"/"+t},cv={},Qe=function(e,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=hP(l),l in cv)return;cv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":dP,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(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 e().catch(i)})},fP=1,pP=1e6;let Xd=0;function mP(){return Xd=(Xd+1)%Number.MAX_SAFE_INTEGER,Xd.toString()}const eh=new Map,uv=t=>{if(eh.has(t))return;const e=setTimeout(()=>{eh.delete(t),ha({type:"REMOVE_TOAST",toastId:t})},pP);eh.set(t,e)},gP=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,fP)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?uv(n):t.toasts.forEach(r=>{uv(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Sc=[];let _c={toasts:[]};
vendor: 13,720 bytes, line 41
41function ha(t){_c=gP(_c,t),Sc.forEach(e=>{e(_c)})}function yP({...t}){const e=mP(),n=s=>ha({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>ha({type:"DISMISS_TOAST",toastId:e});return ha({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function KS(){const[t,e]=x.useState(_c);return x.useEffect(()=>(Sc.push(e),()=>{const n=Sc.indexOf(e);n>-1&&Sc.splice(n,1)}),[t]),{...t,toast:yP,dismiss:n=>ha({type:"DISMISS_TOAST",toastId:n})}}function Fe(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function dv(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function GS(...t){return e=>{let n=!1;const r=t.map(s=>{const i=dv(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():dv(t[s],null)}}}}function Mt(...t){return x.useCallback(GS(...t),t)}function So(t,e=[]){let n=[];function r(i,o){const a=x.createContext(o),l=n.length;n=[...n,o];const c=d=>{var y;const{scope:f,children:p,...v}=d,w=((y=f==null?void 0:f[t])==null?void 0:y[l])||a,b=x.useMemo(()=>v,Object.values(v));return h.jsx(w.Provider,{value:b,children:p})};c.displayName=i+"Provider";function u(d,f){var w;const p=((w=f==null?void 0:f[t])==null?void 0:w[l])||a,v=x.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(o=>x.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return x.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,vP(s,...e)]}function vP(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function su(t){const e=xP(t),n=x.forwardRef((r,s)=>{const{children:i,...o}=r,a=x.Children.toArray(i),l=a.find(SP);if(l){const c=l.props.children,u=a.map(d=>d===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:d);return h.jsx(e,{...o,ref:s,children:x.isValidElement(c)?x.cloneElement(c,void 0,u):null})}return h.jsx(e,{...o,ref:s,children:i})});return n.displayName=`${t}.Slot`,n}var wP=su("Slot");function xP(t){const e=x.forwardRef((n,r)=>{const{children:s,...i}=n;if(x.isValidElement(s)){const o=kP(s),a=_P(i,s.props);return s.type!==x.Fragment&&(a.ref=r?GS(r,o):o),x.cloneElement(s,a)}return x.Children.count(s)>1?x.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var ZS=Symbol("radix.slottable");function bP(t){const e=({children:n})=>h.jsx(h.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=ZS,e}function SP(t){return x.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===ZS}function _P(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function kP(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function JS(t){const e=t+"CollectionProvider",[n,r]=So(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=w=>{const{scope:b,children:y}=w,m=P.useRef(null),g=P.useRef(new Map).current;return h.jsx(s,{scope:b,itemMap:g,collectionRef:m,children:y})};o.displayName=e;const a=t+"CollectionSlot",l=su(a),c=P.forwardRef((w,b)=>{const{scope:y,children:m}=w,g=i(a,y),S=Mt(b,g.collectionRef);return h.jsx(l,{ref:S,children:m})});c.displayName=a;const u=t+"CollectionItemSlot",d="data-radix-collection-item",f=su(u),p=P.forwardRef((w,b)=>{const{scope:y,children:m,...g}=w,S=P.useRef(null),_=Mt(b,S),k=i(u,y);return P.useEffect(()=>(k.itemMap.set(S,{ref:S,...g}),()=>void k.itemMap.delete(S))),h.jsx(f,{[d]:"",ref:_,children:m})});p.displayName=u;function v(w){const b=i(t+"CollectionConsumer",w);return P.useCallback(()=>{const m=b.collectionRef.current;if(!m)return[];const g=Array.from(m.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((k,E)=>g.indexOf(k.ref.current)-g.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:c,ItemSlot:p},v,r]}var EP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ke=EP.reduce((t,e)=>{const n=su(`Primitive.${e}`),r=x.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function QS(t,e){t&&pl.flushSync(()=>t.dispatchEvent(e))}function ns(t){const e=x.useRef(t);return x.useEffect(()=>{e.current=t}),x.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function TP(t,e=globalThis==null?void 0:globalThis.document){const n=ns(t);x.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var CP="DismissableLayer",Tf="dismissableLayer.update",AP="dismissableLayer.pointerDownOutside",PP="dismissableLayer.focusOutside",hv,YS=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jm=x.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,c=x.useContext(YS),[u,d]=x.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=x.useState({}),v=Mt(e,E=>d(E)),w=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(b),m=u?w.indexOf(u):-1,g=c.layersWithOutsidePointerEventsDisabled.size>0,S=m>=y,_=jP(E=>{const T=E.target,C=[...c.branches].some(N=>N.contains(T));!S||C||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},f),k=NP(E=>{const T=E.target;[...c.branches].some(N=>N.contains(T))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},f);return TP(E=>{m===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),x.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(hv=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),fv(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=hv)}},[u,f,n,c]),x.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),fv())},[u,c]),x.useEffect(()=>{const E=()=>p({});return document.addEventListener(Tf,E),()=>document.removeEventListener(Tf,E)},[]),h.jsx(Ke.div,{...l,ref:v,style:{pointerEvents:g?S?"auto":"none":void 0,...t.style},onFocusCapture:Fe(t.onFocusCapture,k.onFocusCapture),onBlurCapture:Fe(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Fe(t.onPointerDownCapture,_.onPointerDownCapture)})});jm.displayName=CP;var RP="DismissableLayerBranch",XS=x.forwardRef((t,e)=>{const n=x.useContext(YS),r=x.useRef(null),s=Mt(e,r);return x.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),h.jsx(Ke.div,{...t,ref:s})});XS.displayName=RP;function jP(t,e=globalThis==null?void 0:globalThis.document){const n=ns(t),r=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){e1(AP,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function NP(t,e=globalThis==null?void 0:globalThis.document){const n=ns(t),r=x.useRef(!1);return x.useEffect(()=>{const s=i=>{i.target&&!r.current&&e1(PP,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fv(){const t=new CustomEvent(Tf);document.dispatchEvent(t)}function e1(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?QS(s,i):s.dispatchEvent(i)}var OP=jm,IP=XS,Bn=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},LP="Portal",t1=x.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=x.useState(!1);Bn(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?WS.createPortal(h.jsx(Ke.div,{...r,ref:e}),o):null});t1.displayName=LP;function DP(t,e){return x.useReducer((n,r)=>e[n][r]??n,t)}var qu=t=>{const{present:e,children:n}=t,r=MP(e),s=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),i=Mt(r.ref,$P(s));return typeof n=="function"||r.isPresent?x.cloneElement(s,{ref:i}):null};qu.displayName="Presence";function MP(t){const[e,n]=x.useState(),r=x.useRef(null),s=x.useRef(t),i=x.useRef("none"),o=t?"mounted":"unmounted",[a,l]=DP(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=Wl(r.current);i.current=a==="mounted"?c:"none"},[a]),Bn(()=>{const c=r.current,u=s.current;if(u!==t){const f=i.current,p=Wl(c);t?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),Bn(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,d=p=>{const w=Wl(r.current).includes(p.animationName);if(p.target===e&&w&&(l("ANIMATION_END"),!s.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},f=p=>{p.target===e&&(i.current=Wl(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Wl(t){return(t==null?void 0:t.animationName)||"none"}function $P(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var VP=Fp[" useInsertionEffect ".trim().toString()]||Bn;function Ku({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,i,o]=FP({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:s;{const u=x.useRef(t!==void 0);x.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}const c=x.useCallback(u=>{var d;if(a){const f=UP(u)?u(t):u;f!==t&&((d=o.current)==null||d.call(o,f))}else i(u)},[a,t,i,o]);return[l,c]}function FP({defaultProp:t,onChange:e}){const[n,r]=x.useState(t),s=x.useRef(n),i=x.useRef(e);return VP(()=>{i.current=e},[e]),x.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function UP(t){return typeof t=="function"}var BP=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),zP="VisuallyHidden",Gu=x.forwardRef((t,e)=>h.jsx(Ke.span,{...t,ref:e,style:{...BP,...t.style}}));Gu.displayName=zP;var HP=Gu,Nm="ToastProvider",[Om,WP,qP]=JS("Toast"),[n1,M3]=So("Toast",[qP]),[KP,Zu]=n1(Nm),r1=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=x.useState(null),[c,u]=x.useState(0),d=x.useRef(!1),f=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Nm}\`. Expected non-empty \`string\`.`),h.jsx(Om.Provider,{scope:e,children:h.jsx(KP,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:x.useCallback(()=>u(p=>p+1),[]),onToastRemove:x.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};r1.displayName=Nm;var s1="ToastViewport",GP=["F8"],Cf="toast.viewportPause",Af="toast.viewportResume",i1=x.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=GP,label:s="Notifications ({hotkey})",...i}=t,o=Zu(s1,n),a=WP(n),l=x.useRef(null),c=x.useRef(null),u=x.useRef(null),d=x.useRef(null),f=Mt(e,d,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;x.useEffect(()=>{const b=y=>{var g;r.length!==0&&r.every(S=>
41y[S]||y.code===S)&&((g=d.current)==null||g.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),x.useEffect(()=>{const b=l.current,y=d.current;if(v&&b&&y){const m=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(Cf);y.dispatchEvent(k),o.isClosePausedRef.current=!0}},g=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(Af);y.dispatchEvent(k),o.isClosePausedRef.current=!1}},S=k=>{!b.contains(k.relatedTarget)&&g()},_=()=>{b.contains(document.activeElement)||g()};return b.addEventListener("focusin",m),b.addEventListener("focusout",S),b.addEventListener("pointermove",m),b.addEventListener("pointerleave",_),window.addEventListener("blur",m),window.addEventListener("focus",g),()=>{b.removeEventListener("focusin",m),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",m),b.removeEventListener("pointerleave",_),window.removeEventListener("blur",m),window.removeEventListener("focus",g)}}},[v,o.isClosePausedRef]);const w=x.useCallback(({tabbingDirection:b})=>{const m=a().map(g=>{const S=g.ref.current,_=[S,...aR(S)];return b==="forwards"?_:_.reverse()});return(b==="forwards"?m.reverse():m).flat()},[a]);return x.useEffect(()=>{const b=d.current;if(b){const y=m=>{var _,k,E;const g=m.altKey||m.ctrlKey||m.metaKey;if(m.key==="Tab"&&!g){const T=document.activeElement,C=m.shiftKey;if(m.target===b&&C){(_=c.current)==null||_.focus();return}const L=w({tabbingDirection:C?"backwards":"forwards"}),K=L.findIndex(D=>D===T);th(L.slice(K+1))?m.preventDefault():C?(k=c.current)==null||k.focus():(E=u.current)==null||E.focus()}};return b.addEventListener("keydown",y),()=>b.removeEventListener("keydown",y)}},[a,w]),h.jsxs(IP,{ref:l,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&h.jsx(Pf,{ref:c,onFocusFromOutsideViewport:()=>{const b=w({tabbingDirection:"forwards"});th(b)}}),h.jsx(Om.Slot,{scope:n,children:h.jsx(Ke.ol,{tabIndex:-1,...i,ref:f})}),v&&h.jsx(Pf,{ref:u,onFocusFromOutsideViewport:()=>{const b=w({tabbingDirection:"backwards"});th(b)}})]})});i1.displayName=s1;var o1="ToastFocusProxy",Pf=x.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=Zu(o1,n);return h.jsx(Gu,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});Pf.displayName=o1;var ml="Toast",ZP="toast.swipeStart",JP="toast.swipeMove",QP="toast.swipeCancel",YP="toast.swipeEnd",a1=x.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Ku({prop:r,defaultProp:s??!0,onChange:i,caller:ml});return h.jsx(qu,{present:n||a,children:h.jsx(tR,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:ns(t.onPause),onResume:ns(t.onResume),onSwipeStart:Fe(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Fe(t.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Fe(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Fe(t.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});a1.displayName=ml;var[XP,eR]=n1(ml,{onClose(){}}),tR=x.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...v}=t,w=Zu(ml,n),[b,y]=x.useState(null),m=Mt(e,D=>y(D)),g=x.useRef(null),S=x.useRef(null),_=s||w.duration,k=x.useRef(0),E=x.useRef(_),T=x.useRef(0),{onToastAdd:C,onToastRemove:N}=w,V=ns(()=>{var re;(b==null?void 0:b.contains(document.activeElement))&&((re=w.viewport)==null||re.focus()),o()}),L=x.useCallback(D=>
41{!D||D===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(V,D))},[V]);x.useEffect(()=>{const D=w.viewport;if(D){const re=()=>{L(E.current),c==null||c()},Z=()=>{const F=new Date().getTime()-k.current;E.current=E.current-F,window.clearTimeout(T.current),l==null||l()};return D.addEventListener(Cf,Z),D.addEventListener(Af,re),()=>{D.removeEventListener(Cf,Z),D.removeEventListener(Af,re)}}},[w.viewport,_,l,c,L]),x.useEffect(()=>{i&&!w.isClosePausedRef.current&&L(_)},[i,_,w.isClosePausedRef,L]),x.useEffect(()=>(C(),()=>N()),[C,N]);const K=x.useMemo(()=>b?p1(b):null,[b]);return w.viewport?h.jsxs(h.Fragment,{children:[K&&h.jsx(nR,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:K}),h.jsx(XP,{scope:n,onClose:V,children:pl.createPortal(h.jsx(Om.ItemSlot,{scope:n,children:h.jsx(OP,{asChild:!0,onEscapeKeyDown:Fe(a,()=>{w.isFocusedToastEscapeKeyDownRef.current||V(),w.isFocusedToastEscapeKeyDownRef.current=!1}),children:h.jsx(Ke.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":w.swipeDirection,...v,ref:m,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Fe(t.onKeyDown,D=>{D.key==="Escape"&&(a==null||a(D.nativeEvent),D.nativeEvent.defaultPrevented||(w.isFocusedToastEscapeKeyDownRef.current=!0,V()))}),onPointerDown:Fe(t.onPointerDown,D=>{D.button===0&&(g.current={x:D.clientX,y:D.clientY})}),onPointerMove:Fe(t.onPointerMove,D=>{if(!g.current)return;const re=D.clientX-g.current.x,Z=D.clientY-g.current.y,F=!!S.current,A=["left","right"].includes(w.swipeDirection),j=["left","up"].includes(w.swipeDirection)?Math.min:Math.max,M=A?j(0,re):0,Q=A?0:j(0,Z),G=D.pointerType==="touch"?10:2,ie={x:M,y:Q},oe={originalEvent:D,delta:ie};F?(S.current=ie,ql(JP,d,oe,{discrete:!1})):pv(ie,w.swipeDirection,G)?(S.current=ie,ql(ZP,u,oe,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(re)>G||Math.abs(Z)>G)&&(g.current=null)}),onPointerUp:Fe(t.onPointerUp,D=>{const re=S.current,Z=D.target;if(Z.hasPointerCapture(D.pointerId)&&Z.releasePointerCapture(D.pointerId),S.current=null,g.current=null,re){const F=D.currentTarget,A={originalEvent:D,delta:re};pv(re,w.swipeDirection,w.swipeThreshold)?ql(YP,p,A,{discrete:!0}):ql(QP,f,A,{discrete:!0}),F.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),w.viewport)})]}):null}),nR=t=>{const{__scopeToast:e,children:n,...r}=t,s=Zu(ml,e),[i,o]=x.useState(!1),[a,l]=x.useState(!1);return iR(()=>o(!0)),x.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:h.jsx(t1,{asChild:!0,children:h.jsx(Gu,{...r,children:i&&h.jsxs(h.Fragment,{children:[s.label," ",n]})})})},rR="ToastTitle",l1=x.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return h.jsx(Ke.div,{...r,ref:e})});l1.displayName=rR;var sR="ToastDescription",c1=x.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return h.jsx(Ke.div,{...r,ref:e})});c1.displayName=sR;var u1="ToastAction",d1=x.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?h.jsx(f1,{altText:n,asChild:!0,children:h.jsx(Im,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${u1}\`. Expected non-empty \`string\`.`),null)});d1.displayName=u1;var h1="ToastClose",Im=x.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=eR(h1,n);return h.jsx(f1,{asChild:!0,children:h.jsx(Ke.button,{type:"button",...r,ref:e,onClick:Fe(t.onClick,s.onClose)})})});Im.displayName=h1;var f1=x.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return h.jsx(Ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function p1(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),oR(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&&e.push(o)}else e.push(...p1(r))}}),e}function ql(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?QS(s,i):s.dispatchEvent(i)}var pv=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function iR(t=()=>{}){const e=ns(t);Bn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function oR(t){return t.nodeType===t.ELEMENT_NODE}function aR(t){const e=[],n=document.createTreeWalker(t,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();)e.push(n.currentNode);return e}function th(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var lR=r1,m1=i1,g1=a1,y1=l1,v1=c1,w1=d1,x1=Im;function b1(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=b1(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function S1(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=b1(t))&&(r&&(r+=" "),r+=e);return r}const mv=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,gv=S1,Lm=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return gv(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=mv(u)||mv(d);return s[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(v=>{let[w,b]=v;return Array.isArray(b)?b.includes({...i,...a}[w]):{...i,...a}[w]===b})?[...c,d,f]:c},[]);return gv(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
42 * @license lucide-react v0.462.0 - ISC
43 *
44 * This source code is licensed under the ISC license.
45 * See the LICENSE file in the root directory of this source tree.
46 */const cR=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_1=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
47 * @license lucide-react v0.462.0 - ISC
48 *
49 * This source code is licensed under the ISC license.
50 * See the LICENSE file in the root directory of this source tree.
51 */var uR={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"};/**
52 * @license lucide-react v0.462.0 - ISC
53 *
54 * This source code is licensed under the ISC license.
55 * See the LICENSE file in the root directory of this source tree.
56 */const dR=x.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>x.createElement("svg",{ref:l,...uR,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:_1("lucide",s),...a},[...o.map(([c,u])=>x.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
57 * @license lucide-react v0.462.0 - ISC
58 *
59 * This source code is licensed under the ISC license.
60 * See the LICENSE file in the root directory of this source tree.
61 */const Ee=(t,e)=>{const n=x.forwardRef(({className:r,...s},i)=>
61x.createElement(dR,{ref:i,iconNode:e,className:_1(`lucide-${cR(t)}`,r),...s}));return n.displayName=`${t}`,n};/**
62 * @license lucide-react v0.462.0 - ISC
63 *
64 * This source code is licensed under the ISC license.
65 * See the LICENSE file in the root directory of this source tree.
66 */const hR=Ee("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
67 * @license lucide-react v0.462.0 - ISC
68 *
69 * This source code is licensed under the ISC license.
70 * See the LICENSE file in the root directory of this source tree.
71 */const co=Ee("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
72 * @license lucide-react v0.462.0 - ISC
73 *
74 * This source code is licensed under the ISC license.
75 * See the LICENSE file in the root directory of this source tree.
76 */const fR=Ee("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
77 * @license lucide-react v0.462.0 - ISC
78 *
79 * This source code is licensed under the ISC license.
80 * See the LICENSE file in the root directory of this source tree.
81 */const k1=Ee("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
82 * @license lucide-react v0.462.0 - ISC
83 *
84 * This source code is licensed under the ISC license.
85 * See the LICENSE file in the root directory of this source tree.
86 */const Rf=Ee("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
87 * @license lucide-react v0.462.0 - ISC
88 *
89 * This source code is licensed under the ISC license.
90 * See the LICENSE file in the root directory of this source tree.
91 */const Dm=Ee("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
92 * @license lucide-react v0.462.0 - ISC
93 *
94 * This source code is licensed under the ISC license.
95 * See the LICENSE file in the root directory of this source tree.
96 */const pR=Ee("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
97 * @license lucide-react v0.462.0 - ISC
98 *
99 * This source code is licensed under the ISC license.
100 * See the LICENSE file in the root directory of this source tree.
101 */const E1=Ee("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
102 * @license lucide-react v0.462.0 - ISC
103 *
104 * This source code is licensed under the ISC license.
105 * See the LICENSE file in the root directory of this source tree.
106 */const T1=Ee("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
107 * @license lucide-react v0.462.0 - ISC
108 *
109 * This source code is licensed under the ISC license.
110 * See the LICENSE file in the root directory of this source tree.
111 */const mR=Ee("Droplet",[["path",{d:"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",key:"c7niix"}]]);/**
112 * @license lucide-react v0.462.0 - ISC
113 *
114 * This source code is licensed under the ISC license.
115 * See the LICENSE file in the root directory of this source tree.
116 */const gR=Ee("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/**
117 * @license lucide-react v0.462.0 - ISC
118 *
119 * This source code is licensed under the ISC license.
120 * See the LICENSE file in the root directory of this source tree.
121 */const yR=Ee("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
122 * @license lucide-react v0.462.0 - ISC
123 *
124 * This source code is licensed under the ISC license.
125 * See the LICENSE file in the root directory of this source tree.
126 */const vR=Ee("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
127 * @license lucide-react v0.462.0 - ISC
128 *
129 * This source code is licensed under the ISC license.
130 * See the LICENSE file in the root directory of this source tree.
131 */const Ma=Ee("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"}]]);/**
132 * @license lucide-react v0.462.0 - ISC
133 *
134 * This source code is licensed under the ISC license.
135 * See the LICENSE file in the root directory of this source tree.
136 */const Ju=Ee("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
137 * @license lucide-react v0.462.0 - ISC
138 *
139 * This source code is licensed under the ISC license.
140 * See the LICENSE file in the root directory of this source tree.
141 */const wR=Ee("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"}]]);/**
142 * @license lucide-react v0.462.0 - ISC
143 *
144 * This source code is licensed under the ISC license.
145 * See the LICENSE file in the root directory of this source tree.
146 */const cr=Ee("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
147 * @license lucide-react v0.462.0 - ISC
148 *
149 * This source code is licensed under the ISC license.
150 * See the LICENSE file in the root directory of this source tree.
151 */const xR=Ee("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
152 * @license lucide-react v0.462.0 - ISC
153 *
154 * This source code is licensed under the ISC license.
155 * See the LICENSE file in the root directory of this source tree.
156 */const bR=Ee("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
vendor: 10,559 bytes, lines 156-186
156y:"oel41y"}]]);/**
157 * @license lucide-react v0.462.0 - ISC
158 *
159 * This source code is licensed under the ISC license.
160 * See the LICENSE file in the root directory of this source tree.
161 */const C1=Ee("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"}]]);/**
162 * @license lucide-react v0.462.0 - ISC
163 *
164 * This source code is licensed under the ISC license.
165 * See the LICENSE file in the root directory of this source tree.
166 */const A1=Ee("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
167 * @license lucide-react v0.462.0 - ISC
168 *
169 * This source code is licensed under the ISC license.
170 * See the LICENSE file in the root directory of this source tree.
171 */const SR=Ee("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
172 * @license lucide-react v0.462.0 - ISC
173 *
174 * This source code is licensed under the ISC license.
175 * See the LICENSE file in the root directory of this source tree.
176 */const _R=Ee("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
177 * @license lucide-react v0.462.0 - ISC
178 *
179 * This source code is licensed under the ISC license.
180 * See the LICENSE file in the root directory of this source tree.
181 */const gl=Ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
182 * @license lucide-react v0.462.0 - ISC
183 *
184 * This source code is licensed under the ISC license.
185 * See the LICENSE file in the root directory of this source tree.
186 */const P1=Ee("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Mm="-",kR=t=>{const e=TR(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(Mm);return a[0]===""&&a.length!==1&&a.shift(),R1(a,e)||ER(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},R1=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?R1(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(Mm);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},yv=/^\[(.+)\]$/,ER=t=>{if(yv.test(t)){const e=yv.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},TR=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return AR(Object.entries(t.classGroups),n).forEach(([i,o])=>{jf(o,r,i,e)}),r},jf=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:vv(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(CR(s)){jf(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{jf(o,vv(e,i),n,r)})})},vv=(t,e)=>{let n=t;return e.split(Mm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},CR=t=>t.isThemeGetter,AR=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,PR=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=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)}}},j1="!",RR=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let c=0,u=0,d;for(let b=0;b<a.length;b++){let y=a[b];if(c===0){if(y===s&&(r||a.slice(b,b+i)===e)){l.push(a.slice(u,b)),u=b+i;continue}if(y==="/"){d=b;continue}}y==="["?c++:y==="]"&&c--}const f=l.length===0?a:a.substring(u),p=f.startsWith(j1),v=p?f.substring(1):f,w=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:w}};return n?a=>n({className:a,parseClassName:o}):o},jR=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},NR=t=>({cache:PR(t.cacheSize),parseClassName:RR(t),...kR(t)}),OR=/\s+/,IR=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(OR);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(c);let v=!!p,w=r(v?f.substring(0,p):f);if(!w){if(!v){a=c+(a.length>0?" "+a:a);continue}if(w=r(f),!w){a=c+(a.length>0?" "+a:a);continue}v=!1}const b=jR(u).join(":"),y=d?b+j1:b,m=y+w;if(i.includes(m))continue;i.push(m);const g=s(w,v);for(let S=0;S<g.length;++S){const _=g[S];i.push(y+_)}a=c+(a.length>0?" "+a:a)}return a};function LR(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=N1(e))&&(r&&(r+=" "),r+=n);return r}const N1=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=N1(t[r]))&&(n&&(n+=" "),n+=e);return n};function DR(t,...e){let n,r,s,i=o;function o(l){const c=e.reduce((u,d)=>d(u),t());return n=NR(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=IR(l,n);return s(l,u),u}return function(){return i(LR.apply(null,arguments))}}const be=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},O1=/^\[(?:([a-z-]+):)?(.+)\]$/i,MR=/^\d+\/\d+$/,$R=new Set(["px","full","screen"]),VR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FR=/\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$/,UR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,BR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Kn=t=>Bi(t)||$R.has(t)||MR.test(t),_r=t=>_o(t,"length",QR),Bi=t=>!!t&&!Number.isNaN(Number(t)),nh=t=>_o(t,"number",Bi),Bo=t=>!!t&&Number.isInteger(Number(t)),HR=t=>t.endsWith("%")&&Bi(t.slice(0,-1)),se=t=>O1.test(t),kr=t=>VR.test(t),WR=new Set(["length","size","percentage"]),qR=t=>_o(t,WR,I1),KR=t=>_o(t,"position",I1),GR=new Set(["image","url"]),ZR=t=>_o(t,GR,XR),JR=t=>_o(t,"",YR),zo=()=>!0,_o=(t,e,n)=>{const r=O1.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},QR=t=>FR.test(t)&&!UR.test(t),I1=()=>!1,YR=t=>BR.test(t),XR=t=>zR.test(t),ej=()=>{const t=be("colors"),e=be("spacing"),n=be("blur"),r=be("brightness"),s=be("borderColor"),i=be("borderRadius"),o=be("borderSpacing"),a=be("borderWidth"),l=be("contrast"),c=be("grayscale"),u=be("hueRotate"),d=be("invert"),f=be("gap"),p=be("gradientColorStops"),v=be("gradientColorStopPositions"),w=be("inset"),b=be("margin"),y=be("opacity"),m=be("padding"),g=be("saturate"),S=be("scale"),_=be("sepia"),k=be("skew"),E=be("space"),T=be("translate"),C=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",se,e],L=()=>[se,e],K=()=>["",Kn,_r],D=()=>["auto",Bi,se],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Z=()=>["solid","dashed","dotted","double","none"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",se],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[Bi,se];return{cacheSize:500,separator:":",theme:{colors:[zo],spacing:[Kn,_r],blur:["none","",kr,se],brightness:Q(),borderColor:[t],borderRadius:["none","","full",kr,se],borderSpacing:L(),borderWidth:K(),contrast:Q(),grayscale:j(),hueRotate:Q(),invert:j(),gap:L(),gradientColorStops:[t],gradientColorStopPositions:[HR,_r],inset:V(),margin:V(),opacity:Q(),padding:L(),saturate:Q(),scale:Q(),sepia:j(),skew:Q(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",se]}],container:["container"],columns:[{columns:[kr]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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:[...re(),se]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Bo,se]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",se]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Bo,se]}],"grid-cols":[{"grid-cols":[zo]}],"col-start-end":[{col:["auto",{span:["full",Bo,se]},se]}],"col-start":[{"col-start":D()}
vendor: 4,241 bytes, line 186
186],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[zo]}],"row-start-end":[{row:["auto",{span:[Bo,se]},se]}],"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",se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",se]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",se,e]}],"min-w":[{"min-w":[se,e,"min","max","fit"]}],"max-w":[{"max-w":[se,e,"none","full","min","max","fit","prose",{screen:[kr]},kr]}],h:[{h:[se,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[se,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[se,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[se,e,"auto","min","max","fit"]}],"font-size":[{text:["base",kr,_r]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",nh]}],"font-family":[{font:[zo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",se]}],"line-clamp":[{"line-clamp":["none",Bi,nh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Kn,se]}],"list-image":[{"list-image":["none",se]}],"list-style-type":[{list:["none","disc","decimal",se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Kn,_r]}],"underline-offset":[{"underline-offset":["auto",Kn,se]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se]}],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",se]}],"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:[...re(),KR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ZR]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[v]}
186],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[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:[...Z(),"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]}
vendor: 4,467 bytes, line 186
186],"divide-style":[{divide:Z()}],"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:["",...Z()]}],"outline-offset":[{"outline-offset":[Kn,se]}],"outline-w":[{outline:[Kn,_r]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Kn,_r]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",kr,JR]}],"shadow-color":[{shadow:[zo]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...F(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":F()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",kr,se]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[g]}],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":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"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",se]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",se]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Bo,se]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",se]}],accent:[{accent:["auto",t]}],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",se]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Kn,_r,nh]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
186none"]}]},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"]}}},tj=DR(ej);function we(...t){return tj(S1(t))}const nj=lR,L1=x.forwardRef(({className:t,...e},n)=>h.jsx(m1,{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]",t),...e}));L1.displayName=m1.displayName;const rj=Lm("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"}}),D1=x.forwardRef(({className:t,variant:e,...n},r)=>h.jsx(g1,{ref:r,className:we(rj({variant:e}),t),...n}));D1.displayName=g1.displayName;const sj=x.forwardRef(({className:t,...e},n)=>h.jsx(w1,{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 group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...e}));sj.displayName=w1.displayName;const M1=x.forwardRef(({className:t,...e},n)=>h.jsx(x1,{ref:n,className:we("absolute right-2 top-2 rounded-md p-1 text-foreground
186/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:h.jsx(gl,{className:"h-4 w-4"})}));M1.displayName=x1.displayName;const $1=x.forwardRef(({className:t,...e},n)=>h.jsx(y1,{ref:n,className:we("text-sm font-semibold",t),...e}));$1.displayName=y1.displayName;const V1=x.forwardRef(({className:t,...e},n)=>h.jsx(v1,{ref:n,className:we("text-sm opacity-90",t),...e}));V1.displayName=v1.displayName;function ij(){const{toasts:t}=KS();return h.jsxs(nj,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return h.jsxs(D1,{...i,children:[h.jsxs("div",{className:"grid gap-1",children:[n&&h.jsx($1,{children:n}),r&&h.jsx(V1,{children:r})]}),s,h.jsx(M1,{})]},e)}),h.jsx(L1,{})]})}var wv=["light","dark"],oj="(prefers-color-scheme: dark)",aj=x.createContext(void 0),lj={setTheme:t=>{},themes:[]},cj=()=>{var t;return(t=x.useContext(aj))!=null?t:lj};x.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;
186${`c.remove(${a.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?wv.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(v,w=!1,b=!0)=>{let y=o?o[v]:v,m=w?v+"|| ''":`'${y}'`,g="";return s&&b&&!w&&wv.includes(v)&&(g+=`d.style.colorScheme = '${v}';`),n==="class"?w||y?g+=`c.add(${m})`:g+="null":y&&(g+=`d[s](n,${m})`),g},p=t?`!function(){${u}${f(t)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${oj}',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)}}${c?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return x.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})});var uj=t=>{switch(t){case"success":return fj;case"info":return mj;case"warning":return pj;case"error":return gj;default:return null}},dj=Array(12).fill(0),hj=({visible:t,className:e})=>P.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},P.createElement("div",{className:"sonner-spinner"},dj.map((n,r)=>P.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),fj=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.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"})),pj=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},P.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"})),mj=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.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"})),gj=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.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"})),yj=P.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"},P.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),P.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vj=()=>{let[t,e]=P.useState(document.hidden);return P.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},Nf=1,wj=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Nf++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>
186(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],P.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(bj(l)&&!l.ok){s=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:c,description:u})}else if(e.success!==void 0){s=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||Nf++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},kt=new wj,xj=(t,e)=>{let n=(e==null?void 0:e.id)||Nf++;return kt.addToast({title:t,...e,id:n}),n},bj=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",Sj=xj,_j=()=>kt.toasts,kj=()=>kt.getActiveToasts();Object.assign(Sj,{success:kt.success,info:kt.info,warning:kt.warning,error:kt.error,custom:kt.custom,message:kt.message,promise:kt.promise,dismiss:kt.dismiss,loading:kt.loading},{getHistory:_j,getToasts:kj});function Ej(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}Ej(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
186left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
186:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
186--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
187`);function Kl(t){return t.label!==void 0}var Tj=3,Cj="32px",Aj="16px",xv=4e3,Pj=356,Rj=14,jj=20,Nj=200;function an(...t){return t.filter(Boolean).join(" ")}function Oj(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var Ij=t=>{var e,n,r,s,i,o,a,l,c,u,d;let{invert:f,toast:p,unstyled:v,interacting:w,setHeights:b,visibleToasts:y,heights:m,index:g,toasts:S,expanded:_,removeToast:k,defaultRichColors:E,closeButton:T,style:C,cancelButtonStyle:N,actionButtonStyle:V,className:L="",descriptionClassName:K="",duration:D,position:re,gap:Z,loadingIcon:F,expandByDefault:A,classNames:j,icons:M,closeButtonAriaLabel:Q="Close toast",pauseWhenPageIsHidden:G}=t,[ie,oe]=P.useState(null),[ye,Me]=P.useState(null),[ce,Ut]=P.useState(!1),[St,gs]=P.useState(!1),[yr,ti]=P.useState(!1),[vr,kl]=P.useState(!1),[Sd,El]=P.useState(!1),[_d,No]=P.useState(0),[ni,Kg]=P.useState(0),Oo=P.useRef(p.duration||D||xv),Gg=P.useRef(null),ys=P.useRef(null),AT=g===0,PT=g+1<=y,Bt=p.type,ri=p.dismissible!==!1,RT=p.className||"",jT=p.descriptionClassName||"",Tl=P.useMemo(()=>m.findIndex(te=>te.toastId===p.id)||0,[m,p.id]),NT=P.useMemo(()=>{var te;return(te=p.closeButton)!=null?te:T},[p.closeButton,T]),Zg=P.useMemo(()=>p.duration||D||xv,[p.duration,D]),kd=P.useRef(0),si=P.useRef(0),Jg=P.useRef(0),ii=P.useRef(null),[OT,IT]=re.split("-"),Qg=P.useMemo(()=>m.reduce((te,ge,Te)=>Te>=Tl?te:te+ge.height,0),[m,Tl]),Yg=vj(),LT=p.invert||f,Ed=Bt==="loading";si.current=P.useMemo(()=>Tl*Z+Qg,[Tl,Qg]),P.useEffect(()=>{Oo.current=Zg},[Zg]),P.useEffect(()=>{Ut(!0)},[]),P.useEffect(()=>{let te=ys.current;if(te){let ge=te.getBoundingClientRect().height;return Kg(ge),b(Te=>[{toastId:p.id,height:ge,position:p.position},...Te]),()=>b(Te=>Te.filter(nn=>nn.toastId!==p.id))}},[b,p.id]),P.useLayoutEffect(()=>{if(!ce)return;let te=ys.current,ge=te.style.height;te.style.height="auto";let Te=te.getBoundingClientRect().height;te.style.height=ge,Kg(Te),b(nn=>nn.find(rn=>rn.toastId===p.id)?nn.map(rn=>rn.toastId===p.id?{...rn,height:Te}:rn):[{toastId:p.id,height:Te,position:p.position},...nn])},[ce,p.title,p.description,b,p.id]);let wr=P.useCallback(()=>{gs(!0),No(si.current),b(te=>te.filter(ge=>ge.toastId!==p.id)),setTimeout(()=>{k(p)},Nj)},[p,k,b,si]);P.useEffect(()=>{if(p.promise&&Bt==="loading"||p.duration===1/0||p.type==="loading")return;let te;return _||w||G&&Yg?(()=>{if(Jg.current<kd.current){let ge=new Date().getTime()-kd.current;Oo.current=Oo.current-ge}
187Jg.current=new Date().getTime()})():Oo.current!==1/0&&(kd.current=new Date().getTime(),te=setTimeout(()=>{var ge;(ge=p.onAutoClose)==null||ge.call(p,p),wr()},Oo.current)),()=>clearTimeout(te)},[_,w,p,Bt,G,Yg,wr]),P.useEffect(()=>{p.delete&&wr()},[wr,p.delete]);function DT(){var te,ge,Te;return M!=null&&M.loading?P.createElement("div",{className:an(j==null?void 0:j.loader,(te=p==null?void 0:p.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":Bt==="loading"},M.loading):F?P.createElement("div",{className:an(j==null?void 0:j.loader,(ge=p==null?void 0:p.classNames)==null?void 0:ge.loader,"sonner-loader"),"data-visible":Bt==="loading"},F):P.createElement(hj,{className:an(j==null?void 0:j.loader,(Te=p==null?void 0:p.classNames)==null?void 0:Te.loader),visible:Bt==="loading"})}return P.createElement("li",{tabIndex:0,ref:ys,className:an(L,RT,j==null?void 0:j.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,j==null?void 0:j.default,j==null?void 0:j[Bt],(n=p==null?void 0:p.classNames)==null?void 0:n[Bt]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:E,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":ce,"data-promise":!!p.promise,"data-swiped":Sd,"data-removed":St,"data-visible":PT,"data-y-position":OT,"data-x-position":IT,"data-index":g,"data-front":AT,"data-swiping":yr,"data-dismissible":ri,"data-type":Bt,"data-invert":LT,"data-swipe-out":vr,"data-swipe-direction":ye,"data-expanded":!!(_||A&&ce),style:{"--index":g,"--toasts-before":g,"--z-index":S.length-g,"--offset":`${St?_d:si.current}px`,"--initial-height":A?"auto":`${ni}px`,...C,...p.style},onDragEnd:()=>{ti(!1),oe(null),ii.current=null},onPointerDown:te=>{Ed||!ri||(Gg.current=new Date,No(si.current),te.target.setPointerCapture(te.pointerId),te.target.tagName!=="BUTTON"&&(ti(!0),ii.current={x:te.clientX,y:te.clientY}))},onPointerUp:()=>{var te,ge,Te,nn;if(vr||!ri)return;ii.current=null;let rn=Number(((te=ys.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),xr=Number(((ge=ys.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),vs=new Date().getTime()-((Te=Gg.current)==null?void 0:Te.getTime()),sn=ie==="x"?rn:xr,br=Math.abs(sn)/vs;if(Math.abs(sn)>=jj||br>.11){No(si.current),(nn=p.onDismiss)==null||nn.call(p,p),Me(ie==="x"?rn>0?"right":"left":xr>0?"down":"up"),wr(),kl(!0),El(!1);return}ti(!1),oe(null)},onPointerMove:te=>{var ge,Te,nn,rn;if(!ii.current||!ri||((ge=window.getSelection())==null?void 0:ge.toString().length)>0)return;let xr=te.clientY-ii.current.y,vs=te.clientX-ii.current.x,sn=(Te=t.swipeDirections)!=null?Te:Oj(re);!ie&&(Math.abs(vs)>1||Math.abs(xr)>1)&&oe(Math.abs(vs)>Math.abs(xr)?"x":"y");let br={x:0,y:0};ie==="y"?(sn.includes("top")||sn.includes("bottom"))&&(sn.includes("top")&&xr<0||sn.includes("bottom")&&xr>0)&&(br.y=xr):ie==="x"&&(sn.includes("left")||sn.includes("right"))&&(sn.includes("left")&&vs<0||sn.includes("right")&&vs>0)&&(br.x=vs),(Math.abs(br.x)>0||Math.abs(br.y)>0)&&El(!0),(nn=ys.current)==null||nn.style.setProperty("--swipe-amount-x",`${br.x}px`),(rn=ys.current)==null||rn.style.setProperty("--swipe-amount-y",`${br.y}px`)}},NT&&!p.jsx?P.createElement("button",{"aria-label":Q,"data-disabled":Ed,"data-close-button":!0,onClick:Ed||!ri?()=>{}:()=>{var te;wr(),(te=p.onDismiss)==null||te.call(p,p)},className:an(j==null?void 0:j.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=M==null?void 0:M.close)!=null?i:yj):null,p.jsx||x.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:P.createElement(P.Fragment,null,Bt||p.icon||p.promise?P.createElement("div",{"data-icon":"",className:an(j==null?void 0:j.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||DT():null,p.type!=="loading"?p.icon||(M==null?void 0:M[Bt])||uj(Bt):null):null,P.createElement("div",{"data-content":"",className:an(j==null?void 0:j.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},P.createElement("div",{"data-title":"",className:an(j==null?void 0:j.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?P.createElement("div",{"data-description":"",className:an(K,jT,j==null?void 0:j.description,(c=p==null?void 0:p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),x.isValidElement(p.cancel)?p.cancel:p.cancel&&Kl(p.cancel)?P.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||N,onClick:te=>{var ge,Te;Kl(p.cancel)&&ri&&((Te=(ge=p.cancel).onClick)==null||Te.call(ge,te),wr())},className:an(j==null?void 0:j.cancelButton,(u=p==null?void 0:p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,x.isValidElement(p.action)?p.action:p.action&&Kl(p.action)?P.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||V,onClick:te=>{var ge,Te;Kl(p.action)&&((Te=(ge=p.action).onClick)==null||Te.call(ge,te),!te.defaultPrevented&&wr())},className:an(j==null?void 0:j.actionButton,(d=p==null?void 0:p.classNames)==null?void 0:d.actionButton)},p.action.label):null))};function bv(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function Lj(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?Aj:Cj;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var Dj=x.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:f,style:p,visibleToasts:v=Tj,toastOptions:w,dir:b=bv(
vendor: 4,456 bytes, line 187
187),gap:y=Rj,loadingIcon:m,icons:g,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:_}=t,[k,E]=P.useState([]),T=P.useMemo(()=>Array.from(new Set([r].concat(k.filter(G=>G.position).map(G=>G.position)))),[k,r]),[C,N]=P.useState([]),[V,L]=P.useState(!1),[K,D]=P.useState(!1),[re,Z]=P.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=P.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=P.useRef(null),M=P.useRef(!1),Q=P.useCallback(G=>{E(ie=>{var oe;return(oe=ie.find(ye=>ye.id===G.id))!=null&&oe.delete||kt.dismiss(G.id),ie.filter(({id:ye})=>ye!==G.id)})},[]);return P.useEffect(()=>kt.subscribe(G=>{if(G.dismiss){E(ie=>ie.map(oe=>oe.id===G.id?{...oe,delete:!0}:oe));return}setTimeout(()=>{WS.flushSync(()=>{E(ie=>{let oe=ie.findIndex(ye=>ye.id===G.id);return oe!==-1?[...ie.slice(0,oe),{...ie[oe],...G},...ie.slice(oe+1)]:[G,...ie]})})})}),[]),P.useEffect(()=>{if(u!=="system"){Z(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;let G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:ie})=>{Z(ie?"dark":"light")})}catch{G.addListener(({matches:oe})=>{try{Z(oe?"dark":"light")}catch(ye){console.error(ye)}})}},[u]),P.useEffect(()=>{k.length<=1&&L(!1)},[k]),P.useEffect(()=>{let G=ie=>{var oe,ye;s.every(Me=>ie[Me]||ie.code===Me)&&(L(!0),(oe=F.current)==null||oe.focus()),ie.code==="Escape"&&(document.activeElement===F.current||(ye=F.current)!=null&&ye.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[s]),P.useEffect(()=>{if(F.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,M.current=!1)}},[F.current]),P.createElement("section",{ref:e,"aria-label":`${S} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((G,ie)=>{var oe;let[ye,Me]=G.split("-");return k.length?P.createElement("ol",{key:G,dir:b==="auto"?bv():b,tabIndex:-1,ref:F,className:a,"data-sonner-toaster":!0,"data-theme":re,"data-y-position":ye,"data-lifted":V&&k.length>1&&!i,"data-x-position":Me,style:{"--front-toast-height":`${((oe=C[0])==null?void 0:oe.height)||0}px`,"--width":`${Pj}px`,"--gap":`${y}px`,...p,...Lj(l,c)},onBlur:ce=>{M.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(M.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||M.current||(M.current=!0,j.current=ce.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{K||L(!1)},onDragEnd:()=>L(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},k.filter(ce=>!ce.position&&ie===0||ce.position===G).map((ce,Ut)=>{var St,gs;return P.createElement(Ij,{key:ce.id,icons:g,index:Ut,toast:ce,defaultRichColors:d,duration:(St=w==null?void 0:w.duration)!=null?St:f,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:n,visibleToasts:v,closeButton:(gs=w==null?void 0:w.closeButton)!=null?gs:o,interacting:K,position:G,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,removeToast:Q,toasts:k.filter(yr=>yr.position==ce.position),heights:C.filter(yr=>yr.position==ce.position),setHeights:N,expandByDefault:i,gap:y,loadingIcon:m,expanded:V,pauseWhenPageIsHidden:_,swipeDirections:t.swipeDirections})})):null}))});const Mj=({...t})=>{const{theme:e="system"}=cj();return h.jsx(Dj,{theme:e,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"}},...t})};var $j=Fp[" useId ".trim().toString()]||(()=>{}),Vj=0;function F1(t){const[e,n]=x.useState($j());return Bn(()=>{n(r=>r??String(Vj++))},[t]),e?`radix-${e}
187`:""}const Fj=["top","right","bottom","left"],rs=Math.min,jt=Math.max,iu=Math.round,Gl=Math.floor,Vn=t=>({x:t,y:t}),Uj={left:"right",right:"left",bottom:"top",top:"bottom"},Bj={start:"end",end:"start"};function Of(t,e,n){return jt(t,rs(e,n))}function ur(t,e){return typeof t=="function"?t(e):t}function dr(t){return t.split("-")[0]}function ko(t){return t.split("-")[1]}function $m(t){return t==="x"?"y":"x"}function Vm(t){return t==="y"?"height":"width"}const zj=new Set(["top","bottom"]);function Dn(t){return zj.has(dr(t))?"y":"x"}function Fm(t){return $m(Dn(t))}function Hj(t,e,n){n===void 0&&(n=!1);const r=ko(t),s=Fm(t),i=Vm(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=ou(o)),[o,ou(o)]}function Wj(t){const e=ou(t);return[If(t),e,If(e)]}function If(t){return t.replace(/start|end/g,e=>Bj[e])}const Sv=["left","right"],_v=["right","left"],qj=["top","bottom"],Kj=["bottom","top"];function Gj(t,e,n){switch(t){case"top":case"bottom":return n?e?_v:Sv:e?Sv:_v;case"left":case"right":return e?qj:Kj;default:return[]}}function Zj(t,e,n,r){const s=ko(t);let i=Gj(dr(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(If)))),i}function ou(t){return t.replace(/left|right|bottom|top/g,e=>Uj[e])}function Jj(t){return{top:0,right:0,bottom:0,left:0,...t}}function U1(t){return typeof t!="number"?Jj(t):{top:t,right:t,bottom:t,left:t}}function au(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function kv(t,e,n){let{reference:r,floating:s}=t;const i=Dn(e),o=Fm(e),a=Vm(o),l=dr(e),c=i==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-s.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-s.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ko(e)){case"start":p[o]-=f*(n&&c?-1:1);break;case"end":p[o]+=f*(n&&c?-1:1);break}return p}const Qj=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=kv(c,r,l),f=r,p={},v=0;for(let w=0;w<a.length;w++){const{name:b,fn:y}=a[w],{x:m,y:g,data:S,reset:_}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:c,platform:o,elements:{reference:t,floating:e}});u=m??u,d=g??d,p={...p,[b]:{...p[b],...S}},_&&v<=50&&(v++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):_.rects),{x:u,y:d}=kv(c,f,l)),w=-1)}return{x:u,y:d,placement:f,strategy:s,middlewareData:p}};async function $a(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=ur(e,t),v=U1(p),b=a[f?d==="floating"?"reference":"floating":d],y=au(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),m=d==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(g))?await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1}:{x:1,y:1},_=au(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:g,strategy:l}):m);return{top:(y.top-_.top+v.top)/S.y,bottom:(_.bottom-y.bottom+v.bottom)/S.y,left:(y.left-_.left+v.left)/S.x,right:(_.right-y.right+v.right)/S.x}}const Yj=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=ur(t,e)||{};if(c==null)return{};const d=U1(u),f={x:n,y:r},p=Fm(s),v=Vm(p),w=await o.getDimensions(c),b=p==="y",y=b?"top":"left",m=b?"bottom":"right",g=b?"clientHeight":"clientWidth",S=i.reference[v]+i.reference[p]-f[p]-i.floating[v],_=f[p]-i.reference[p],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let E=k?k[g]:0;(!E||!await(o.isElement==null?void 0:o.isElement(k)))&&(E=a.floating[g]||i.floating[v]);const T=S/2-_/2,C=E/2-w[v]/2-1,N=rs(d[y],C),V=rs(d[m],C),L=N,K=E-w[v]-V,D=E/2-w[v]/2+T,re=Of(L,D,K),Z=!l.arrow&&ko(s)!=null&&D!==re&&i.reference[v]/2-(D<L?N:V)-w[v]/2<0,F=Z?D<L?D-L:D-K:0;return{[p]:f[p]+F,data:{[p]:re,centerOffset:D-re-F,...Z&&{alignmentOffset:F}},reset:Z}}}),Xj=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:w=!0,...b}=ur(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=dr(s),m=Dn(a),g=dr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=f||(g||!w?[ou(a)]:Wj(a)),k=v!=="none";!f&&k&&_.push(...Zj(a,w,v,S));const E=[a,..._],T=await $a(e,b),C=[];let N=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&C.push(T[y]),d){const D=Hj(s,o,S);C.push(T[D[0]],T[D[1]])}if(N=[...N,{placement:s,overflows:C}],!C.every(D=>D<=0)){var V,L;const D=(((V=i.flip)==null?void 0:V.index)||0)+1,re=E[D];if(re&&(!(d==="alignment"?m!==Dn(re):!1)||N.every(A=>A.overflows[0]>0&&Dn(A.placement)===m)))return{data:{index:D,overflows:N},reset:{placement:re}};let Z=(L=N.filter(F=>F.overflows[0]<=0).sort((F,A)=>F.overflows[1]-A.overflows[1])[0])==null?void 0:L.placement;if(!Z)switch(p){case"bestFit":{var K;const F=(K=N.filter(A=>{if(k){const j=Dn(A.placement);return j===m||j==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(j=>j>0).reduce((j,M)=>j+M,0)]).sort((A,j)=>A[1]-j[1])[0])==null?void 0:K[0];F&&(Z=F);break}case"initialPlacement":Z=a;break}if(s!==Z)return{reset:{placement:Z}}}return{}}}};function Ev(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Tv(t){return Fj.some(e=>t[e]>=0)}const eN=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=ur(t,e);switch(r){case"referenceHidden":{const i=await $a(e,{...s,elementContext:"reference"}),o=Ev(i,n.reference);
vendor: 12,932 bytes, line 187
187return{data:{referenceHiddenOffsets:o,referenceHidden:Tv(o)}}}case"escaped":{const i=await $a(e,{...s,altBoundary:!0}),o=Ev(i,n.floating);return{data:{escapedOffsets:o,escaped:Tv(o)}}}default:return{}}}}},B1=new Set(["left","top"]);async function tN(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=dr(n),a=ko(n),l=Dn(n)==="y",c=B1.has(o)?-1:1,u=i&&l?-1:1,d=ur(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const nN=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await tN(e,t);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}}}}},rN=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:y,y:m}=b;return{x:y,y:m}}},...l}=ur(t,e),c={x:n,y:r},u=await $a(e,l),d=Dn(dr(s)),f=$m(d);let p=c[f],v=c[d];if(i){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",m=p+u[b],g=p-u[y];p=Of(m,p,g)}if(o){const b=d==="y"?"top":"left",y=d==="y"?"bottom":"right",m=v+u[b],g=v-u[y];v=Of(m,v,g)}const w=a.fn({...e,[f]:p,[d]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[f]:i,[d]:o}}}}}},sN=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ur(t,e),u={x:n,y:r},d=Dn(s),f=$m(d);let p=u[f],v=u[d];const w=ur(a,e),b=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const g=f==="y"?"height":"width",S=i.reference[f]-i.floating[g]+b.mainAxis,_=i.reference[f]+i.reference[g]-b.mainAxis;p<S?p=S:p>_&&(p=_)}if(c){var y,m;const g=f==="y"?"width":"height",S=B1.has(dr(s)),_=i.reference[d]-i.floating[g]+(S&&((y=o.offset)==null?void 0:y[d])||0)+(S?0:b.crossAxis),k=i.reference[d]+i.reference[g]+(S?0:((m=o.offset)==null?void 0:m[d])||0)-(S?b.crossAxis:0);v<_?v=_:v>k&&(v=k)}return{[f]:p,[d]:v}}}},iN=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...c}=ur(t,e),u=await $a(e,c),d=dr(s),f=ko(s),p=Dn(s)==="y",{width:v,height:w}=i.floating;let b,y;d==="top"||d==="bottom"?(b=d,y=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,b=f==="end"?"top":"bottom");const m=w-u.top-u.bottom,g=v-u.left-u.right,S=rs(w-u[b],m),_=rs(v-u[y],g),k=!e.middlewareData.shift;let E=S,T=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=g),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(E=m),k&&!f){const N=jt(u.left,0),V=jt(u.right,0),L=jt(u.top,0),K=jt(u.bottom,0);p?T=v-2*(N!==0||V!==0?N+V:jt(u.left,u.right)):E=w-2*(L!==0||K!==0?L+K:jt(u.top,u.bottom))}await l({...e,availableWidth:T,availableHeight:E});const C=await o.getDimensions(a.floating);return v!==C.width||w!==C.height?{reset:{rects:!0}}:{}}}};function Qu(){return typeof window<"u"}function Eo(t){return z1(t)?(t.nodeName||"").toLowerCase():"#document"}function Lt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Wn(t){var e;return(e=(z1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function z1(t){return Qu()?t instanceof Node||t instanceof Lt(t).Node:!1}function kn(t){return Qu()?t instanceof Element||t instanceof Lt(t).Element:!1}function zn(t){return Qu()?t instanceof HTMLElement||t instanceof Lt(t).HTMLElement:!1}function Cv(t){return!Qu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Lt(t).ShadowRoot}const oN=new Set(["inline","contents"]);function yl(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=En(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!oN.has(s)}const aN=new Set(["table","td","th"]);function lN(t){return aN.has(Eo(t))}const cN=[":popover-open",":modal"];function Yu(t){return cN.some(e=>{try{return t.matches(e)}catch{return!1}})}const uN=["transform","translate","scale","rotate","perspective"],dN=["transform","translate","scale","rotate","perspective","filter"],hN=["paint","layout","strict","content"];function Um(t){const e=Bm(),n=kn(t)?En(t):t;return uN.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||dN.some(r=>(n.willChange||"").includes(r))||hN.some(r=>(n.contain||"").includes(r))}function fN(t){let e=ss(t);for(;zn(e)&&!uo(e);){if(Um(e))return e;if(Yu(e))return null;e=ss(e)}return null}function Bm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const pN=new Set(["html","body","#document"]);function uo(t){return pN.has(Eo(t))}function En(t){return Lt(t).getComputedStyle(t)}function Xu(t){return kn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ss(t){if(Eo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Cv(t)&&t.host||Wn(t);return Cv(e)?e.host:e}function H1(t){const e=ss(t);return uo(e)?t.ownerDocument?t.ownerDocument.body:t.body:zn(e)&&yl(e)?e:H1(e)}function Va(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=H1(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=Lt(s);if(i){const a=Lf(o);return e.concat(o,o.visualViewport||[],yl(s)?s:[],a&&n?Va(a):[])}return e.concat(s,Va(s,[],n))}function Lf(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function W1(t){const e=En(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=zn(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=iu(n)!==i||iu(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function zm(t){return kn(t)?t:t.contextElement}function zi(t){const e=zm(t);if(!zn(e))return Vn(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=W1(e);let o=(i?iu(n.width):n.width)/r,a=(i?iu(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const mN=Vn(0);function q1(t){const e=Lt(t);return!Bm()||!e.visualViewport?mN:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function gN(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Lt(t)?!1:e}function Zs(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=zm(t);let o=Vn(1);e&&(r?kn(r)&&(o=zi(r)):o=zi(t));const a=gN(i,n,r)?q1(i):Vn(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const f=Lt(i),p=r&&kn(r)?Lt(r):r;let v=f,w=Lf(v);for(;w&&r&&p!==v;){const b=zi(w),y=w.getBoundingClientRect(),m=En(w),g=y.left+(w.clientLeft+parseFloat(m.paddingLeft))*b.x,S=y.top+(w.clientTop+parseFloat(m.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=g,c+=S,v=Lt(w),w=Lf(v)}}return au({width:u,height:d,x:l,y:c})}function Hm(t,e){const n=Xu(t).scrollLeft;return e?e.left+n:Zs(Wn(t)).left+n}function K1(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-(n?0:Hm(t,r)),i=r.top+e.scrollTop;return{x:s,y:i}}function yN(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=Wn(r),a=e?Yu(e.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Vn(1);const u=Vn(0),d=zn(r);if((d||!d&&!i)&&((Eo(r)!=="body"||yl(o))&&(l=Xu(r)),zn(r))){const p=Zs(r);c=zi(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=o&&!d&&!i?K1(o,l,!0):Vn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function vN(t){return Array.from(t.getClientRects())}function wN(t){const e=Wn(t),n=Xu(t),r=t.ownerDocument.body,s=jt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=jt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Hm(t);const a=-n.scrollTop;return En(r).direction==="rtl"&&(o+=jt(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function xN(t,e){const n=Lt(t),r=Wn(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Bm();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const bN=new Set(["absolute","fixed"]);function SN(t,e){const n=Zs(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=zn(t)?zi(t):Vn(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function Av(t,e,n){let r;if(e==="viewport")r=xN(t,n);else if(e==="document")r=wN(Wn(t));else if(kn(e))r=SN(e,n);else{const s=q1(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return au(r)}function G1(t,e){const n=ss(t);return n===e||!kn(n)||uo(n)?!1:En(n).position==="fixed"||G1(n,e)}function _N(t,e){const n=e.get(t);if(n)return n;let r=Va(t,[],!1).filter(a=>kn(a)&&Eo(a)!=="body"),s=null;const i=En(t).position==="fixed";let o=i?ss(t):t;for(;kn(o)&&!uo(o);){const a=En(o),l=Um(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&bN.has(s.position)||yl(o)&&!l&&G1(t,o))?r=r.filter(u=>u!==o):s=a,o=ss(o)}return e.set(t,r),r}function kN(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?Yu(e)?[]:_N(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=Av(e,u,s);return c.top=jt(d.top,c.top),c.right=rs(d.right,c.right),c.bottom=rs(d.bottom,c.bottom),c.left=jt(d.left,c.left),c},Av(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function EN(t){const{width:e,height:n}=W1(t);return{width:e,height:n}}function TN(t,e,n){const r=zn(e),s=Wn(e),i=n==="fixed",o=Zs(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Vn(0);function c(){l.x=Hm(s)}if(r||!r&&!i)if((Eo(e)!=="body"||yl(s))&&(a=Xu(e)),r){const p=Zs(e,!0,i,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else s&&c();i&&!r&&s&&c();const u=s&&!r&&!i?K1(s,a):Vn(0),d=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function rh(t){return En(t).position==="static"}function Pv(t,e){if(!zn(t)||En(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Wn(t)===n&&(n=n.ownerDocument.body),n}function Z1(t,e){const n=Lt(t);if(Yu(t))return n;if(!zn(t)){let s=ss(t);for(;s&&!uo(s);){if(kn(s)&&!rh(s))return s;s=ss(s)}return n}let r=Pv(t,e);for(;r&&lN(r)&&rh(r);)r=Pv(r,e);return r&&uo(r)&&rh(r)&&!Um(r)?n:r||fN(t)||n}const CN=async function(t){const e=this.getOffsetParent||Z1,n=this.getDimensions,r=await n(t.floating);return{reference:TN(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function AN(t){return En(t).direction==="rtl"}const PN={convertOffsetParentRelativeRectToViewportRelativeRect:yN,getDocumentElement:Wn,getClippingRect:kN,getOffsetParent:Z1,getElementRects:CN,getClientRects:vN,getDimensions:EN,getScale:zi,isElement:kn,isRTL:AN};function J1(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function RN(t,e){let n=null,r;const s=Wn(t);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 c=t.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||e(),!f||!p)return;const v=Gl(d),w=Gl(s.clientWidth-(u+f)),b=Gl(s.clientHeight-(d+p)),y=Gl(u),g={rootMargin:-v+"px "+-w+"px "+-b+"px "+-y+"px",threshold:jt(0,rs(1,l))||1};let S=!0;function _(k){const E=k[0].intersectionRatio;if(E!==l){if(!S)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!J1(c,t.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(_,{...g,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,g)}n.observe(t)}return o(!0),i}function jN(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=zm(t),u=s||i?[...c?Va(c):[],...Va(e)]:[];u.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?RN(c,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(y=>{let[m]=y;m&&m.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var g;(g=p)==null||g.observe(e)})),n()}),c&&!l&&p.observe(c),p.observe(e));let v,w=l?Zs(t):null;l&&b();function b(){const y=Zs(t);w&&!J1(w,y)&&n(),w=y,v=requestAnimationFrame(b)}return n(),()=>{var y;u.forEach(m=>{s&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const NN=nN,ON=rN,IN=Xj,LN=iN,DN=eN,Rv=Yj,MN=sN,$N=(t,e,n)=>{const r=new Map,s={platform:PN,...n},i={...s.platform,_c:r};return Qj(t,e,{...s,platform:i})};var VN=typeof document<"u",FN=function(){},kc=VN?x.useLayoutEffect:FN;function lu(t,e){if(t===e)return!0;
vendor: 3,236 bytes, line 187
187if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!lu(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!lu(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Q1(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function jv(t,e){const n=Q1(t);return Math.round(e*n)/n}function sh(t){const e=x.useRef(t);return kc(()=>{e.current=t}),e}function UN(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,d]=x.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,p]=x.useState(r);lu(f,r)||p(r);const[v,w]=x.useState(null),[b,y]=x.useState(null),m=x.useCallback(A=>{A!==k.current&&(k.current=A,w(A))},[]),g=x.useCallback(A=>{A!==E.current&&(E.current=A,y(A))},[]),S=i||v,_=o||b,k=x.useRef(null),E=x.useRef(null),T=x.useRef(u),C=l!=null,N=sh(l),V=sh(s),L=sh(c),K=x.useCallback(()=>{if(!k.current||!E.current)return;const A={placement:e,strategy:n,middleware:f};V.current&&(A.platform=V.current),$N(k.current,E.current,A).then(j=>{const M={...j,isPositioned:L.current!==!1};D.current&&!lu(T.current,M)&&(T.current=M,pl.flushSync(()=>{d(M)}))})},[f,e,n,V,L]);kc(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[c]);const D=x.useRef(!1);kc(()=>(D.current=!0,()=>{D.current=!1}),[]),kc(()=>{if(S&&(k.current=S),_&&(E.current=_),S&&_){if(N.current)return N.current(S,_,K);K()}},[S,_,K,N,C]);const re=x.useMemo(()=>({reference:k,floating:E,setReference:m,setFloating:g}),[m,g]),Z=x.useMemo(()=>({reference:S,floating:_}),[S,_]),F=x.useMemo(()=>{const A={position:n,left:0,top:0};if(!Z.floating)return A;const j=jv(Z.floating,u.x),M=jv(Z.floating,u.y);return a?{...A,transform:"translate("+j+"px, "+M+"px)",...Q1(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:M}},[n,a,Z.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:K,refs:re,elements:Z,floatingStyles:F}),[u,K,re,Z,F])}const BN=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Rv({element:r.current,padding:s}).fn(n):{}:r?Rv({element:r,padding:s}).fn(n):{}}}},zN=(t,e)=>({...NN(t),options:[t,e]}),HN=(t,e)=>({...ON(t),options:[t,e]}),WN=(t,e)=>({...MN(t),options:[t,e]}),qN=(t,e)=>({...IN(t),options:[t,e]}),KN=(t,e)=>({...LN(t),options:[t,e]}),GN=(t,e)=>({...DN(t),options:[t,e]}),ZN=(t,e)=>({...BN(t),options:[t,e]});var JN="Arrow",Y1=x.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return h.jsx(Ke.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Y1.displayName=JN;var QN=Y1;function YN(t){const[e,n]=x.useState(void 0);return Bn(()=>
vendor: 4,972 bytes, line 187
187{if(t){n({width:t.offsetWidth,height:t.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,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var X1="Popper",[e_,t_]=So(X1),[$3,n_]=e_(X1),r_="PopperAnchor",s_=x.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=n_(r_,n),o=x.useRef(null),a=Mt(e,o);return x.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:h.jsx(Ke.div,{...s,ref:a})});s_.displayName=r_;var Wm="PopperContent",[XN,eO]=e_(Wm),i_=x.forwardRef((t,e)=>{var ce,Ut,St,gs,yr,ti;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:v,...w}=t,b=n_(Wm,n),[y,m]=x.useState(null),g=Mt(e,vr=>m(vr)),[S,_]=x.useState(null),k=YN(S),E=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,C=r+(i!=="center"?"-"+i:""),N=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},V=Array.isArray(c)?c:[c],L=V.length>0,K={padding:N,boundary:V.filter(nO),altBoundary:L},{refs:D,floatingStyles:re,placement:Z,isPositioned:F,middlewareData:A}=UN({strategy:"fixed",placement:C,whileElementsMounted:(...vr)=>jN(...vr,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[zN({mainAxis:s+T,alignmentAxis:o}),l&&HN({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?WN():void 0,...K}),l&&qN({...K}),KN({...K,apply:({elements:vr,rects:kl,availableWidth:Sd,availableHeight:El})=>{const{width:_d,height:No}=kl.reference,ni=vr.floating.style;ni.setProperty("--radix-popper-available-width",`${Sd}px`),ni.setProperty("--radix-popper-available-height",`${El}px`),ni.setProperty("--radix-popper-anchor-width",`${_d}px`),ni.setProperty("--radix-popper-anchor-height",`${No}px`)}}),S&&ZN({element:S,padding:a}),rO({arrowWidth:E,arrowHeight:T}),f&&GN({strategy:"referenceHidden",...K})]}),[j,M]=l_(Z),Q=ns(v);Bn(()=>{F&&(Q==null||Q())},[F,Q]);const G=(ce=A.arrow)==null?void 0:ce.x,ie=(Ut=A.arrow)==null?void 0:Ut.y,oe=((St=A.arrow)==null?void 0:St.centerOffset)!==0,[ye,Me]=x.useState();return Bn(()=>{y&&Me(window.getComputedStyle(y).zIndex)},[y]),h.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:F?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[(gs=A.transformOrigin)==null?void 0:gs.x,(yr=A.transformOrigin)==null?void 0:yr.y].join(" "),...((ti=A.hide)==null?void 0:ti.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:h.jsx(XN,{scope:n,placedSide:j,onArrowChange:_,arrowX:G,arrowY:ie,shouldHideArrow:oe,children:h.jsx(Ke.div,{"data-side":j,"data-align":M,...w,ref:g,style:{...w.style,animation:F?void 0:"none"}})})})});i_.displayName=Wm;var o_="PopperArrow",tO={top:"bottom",right:"left",bottom:"top",left:"right"},a_=x.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=eO(o_,r),o=tO[i.placedSide];return h.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:h.jsx(QN,{...s,ref:n,style:{...s.style,display:"block"}})})});a_.displayName=o_;function nO(t){return t!==null}var rO=t=>({name:"transformOrigin",options:t,fn(e){var b,y,m;const{placement:n,rects:r,middlewareData:s}=e,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=l_(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,p=(((m=s.arrow)==null?void 0:m.y)??0)+l/2;let v="",w="";return c==="bottom"?(v=o?d:`${f}px`,w=`${-l}px`):c==="top"?(v=o?d:`${f}px`,w=`${r.floating.height+l}px`):c==="right"?(v=`${-l}px`,w=o?d:`${p}px`):c==="left"&&(v=`${r.floating.width+l}px`,w=o?d:`${p}px`),{data:{x:v,y:w}}}});function l_(t){const[e,n="center"]=t.split("-");return[e,n]}var sO=s_,iO=i_,oO=a_,[ed,V3]=So("Tooltip",[t_]),qm=t_(),c_="TooltipProvider",aO=700,Nv="tooltip.open",[lO,u_]=ed(c_),d_=t=>{const{__scopeTooltip:e,delayDuration:n=aO,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=x.useRef(!0),a=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),h.jsx(lO,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>
vendor: 5,398 bytes, line 187
187o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:x.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};d_.displayName=c_;var h_="Tooltip",[F3,td]=ed(h_),Df="TooltipTrigger",cO=x.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=td(Df,n),i=u_(Df,n),o=qm(n),a=x.useRef(null),l=Mt(e,a,s.onTriggerChange),c=x.useRef(!1),u=x.useRef(!1),d=x.useCallback(()=>c.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),h.jsx(sO,{asChild:!0,...o,children:h.jsx(Ke.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:Fe(t.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:Fe(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:Fe(t.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Fe(t.onFocus,()=>{c.current||s.onOpen()}),onBlur:Fe(t.onBlur,s.onClose),onClick:Fe(t.onClick,s.onClose)})})});cO.displayName=Df;var uO="TooltipPortal",[U3,dO]=ed(uO,{forceMount:void 0}),ho="TooltipContent",f_=x.forwardRef((t,e)=>{const n=dO(ho,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=td(ho,t.__scopeTooltip);return h.jsx(qu,{present:r||o.open,children:o.disableHoverableContent?h.jsx(p_,{side:s,...i,ref:e}):h.jsx(hO,{side:s,...i,ref:e})})}),hO=x.forwardRef((t,e)=>{const n=td(ho,t.__scopeTooltip),r=u_(ho,t.__scopeTooltip),s=x.useRef(null),i=Mt(e,s),[o,a]=x.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:d}=r,f=x.useCallback(()=>{a(null),d(!1)},[d]),p=x.useCallback((v,w)=>{const b=v.currentTarget,y={x:v.clientX,y:v.clientY},m=yO(y,b.getBoundingClientRect()),g=vO(y,m),S=wO(w.getBoundingClientRect()),_=bO([...g,...S]);a(_),d(!0)},[d]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(l&&u){const v=b=>p(b,u),w=b=>p(b,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",w),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",w)}}},[l,u,p,f]),x.useEffect(()=>{if(o){const v=w=>{const b=w.target,y={x:w.clientX,y:w.clientY},m=(l==null?void 0:l.contains(b))||(u==null?void 0:u.contains(b)),g=!xO(y,o);m?f():g&&(f(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,o,c,f]),h.jsx(p_,{...t,ref:i})}),[fO,pO]=ed(h_,{isInside:!1}),mO=bP("TooltipContent"),p_=x.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=td(ho,n),c=qm(n),{onClose:u}=l;return x.useEffect(()=>(document.addEventListener(Nv,u),()=>document.removeEventListener(Nv,u)),[u]),x.useEffect(()=>{if(l.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),h.jsx(jm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:h.jsxs(iO,{"data-state":l.stateAttribute,...c,...a,ref:e,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:[h.jsx(mO,{children:r}),h.jsx(fO,{scope:n,isInside:!0,children:h.jsx(HP,{id:l.contentId,role:"tooltip",children:s||r})})]})})});f_.displayName=ho;var m_="TooltipArrow",gO=x.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=qm(n);return pO(m_,n).isInside?null:h.jsx(oO,{...s,...r,ref:e})});gO.displayName=m_;function yO(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.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 vO(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function wO(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function xO(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],c=a.x,u=a.y,d=l.x,f=l.y;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(s=!s)}return s}function bO(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),SO(e)}function SO(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[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(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var _O=d_,g_=f_;
vendor: 24,329 bytes, line 187
187const kO=_O,EO=x.forwardRef(({className:t,sideOffset:e=4,...n},r)=>h.jsx(g_,{ref:r,sideOffset:e,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",t),...n}));EO.displayName=g_.displayName;var nd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},rd=typeof window>"u"||"Deno"in globalThis;function hn(){}function TO(t,e){return typeof t=="function"?t(e):t}function CO(t){return typeof t=="number"&&t>=0&&t!==1/0}function AO(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Mf(t,e){return typeof t=="function"?t(e):t}function PO(t,e){return typeof t=="function"?t(e):t}function Ov(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==Km(o,e.options))return!1}else if(!Ua(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function Iv(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Fa(e.options.mutationKey)!==Fa(i))return!1}else if(!Ua(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function Km(t,e){return((e==null?void 0:e.queryKeyHashFn)||Fa)(t)}function Fa(t){return JSON.stringify(t,(e,n)=>$f(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ua(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ua(t[n],e[n])):!1}function y_(t,e){if(t===e)return t;const n=Lv(t)&&Lv(e);if(n||$f(t)&&$f(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&l.has(d)||n)&&t[d]===void 0&&e[d]===void 0?(a[d]=void 0,c++):(a[d]=y_(t[d],e[d]),a[d]===t[d]&&t[d]!==void 0&&c++)}return s===o&&c===s?t:a}return e}function Lv(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function $f(t){if(!Dv(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Dv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Dv(t){return Object.prototype.toString.call(t)==="[object Object]"}function RO(t){return new Promise(e=>{setTimeout(e,t)})}function jO(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?y_(t,e):e}function NO(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function OO(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Gm=Symbol();function v_(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Gm?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Is,Ir,Gi,Ex,IO=(Ex=class extends nd{constructor(){super();fe(this,Is);fe(this,Ir);fe(this,Gi);ne(this,Gi,e=>{if(!rd&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,Ir)||this.setEventListener(R(this,Gi))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,Ir))==null||e.call(this),ne(this,Ir,void 0))}setEventListener(e){var n;ne(this,Gi,e),(n=R(this,Ir))==null||n.call(this),ne(this,Ir,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){R(this,Is)!==e&&(ne(this,Is,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof R(this,Is)=="boolean"?R(this,Is):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Is=new WeakMap,Ir=new WeakMap,Gi=new WeakMap,Ex),w_=new IO,Zi,Lr,Ji,Tx,LO=(Tx=class extends nd{constructor(){super();fe(this,Zi,!0);fe(this,Lr);fe(this,Ji);ne(this,Ji,e=>{if(!rd&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,Lr)||this.setEventListener(R(this,Ji))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,Lr))==null||e.call(this),ne(this,Lr,void 0))}setEventListener(e){var n;ne(this,Ji,e),(n=R(this,Lr))==null||n.call(this),ne(this,Lr,e(this.setOnline.bind(this)))}setOnline(e){R(this,Zi)!==e&&(ne(this,Zi,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return R(this,Zi)}},Zi=new WeakMap,Lr=new WeakMap,Ji=new WeakMap,Tx),cu=new LO;function DO(){let t,e;const n=new Promise((s,i)=>{t=s,e=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}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function MO(t){return Math.min(1e3*2**t,3e4)}function x_(t){return(t??"online")==="online"?cu.isOnline():!0}var b_=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function ih(t){return t instanceof b_}function S_(t){let e=!1,n=0,r=!1,s;const i=DO(),o=w=>{var b;r||(f(new b_(w)),(b=t.abort)==null||b.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>w_.isFocused()&&(t.networkMode==="always"||cu.isOnline())&&t.canRun(),u=()=>x_(t.networkMode)&&t.canRun(),d=w=>{var b;r||(r=!0,(b=t.onSuccess)==null||b.call(t,w),s==null||s(),i.resolve(w))},f=w=>{var b;r||(r=!0,(b=t.onError)==null||b.call(t,w),s==null||s(),i.reject(w))},p=()=>new Promise(w=>{var b;s=y=>{(r||c())&&w(y)},(b=t.onPause)==null||b.call(t)}).then(()=>{var w;s=void 0,r||(w=t.onContinue)==null||w.call(t)}),v=()=>{if(r)return;let w;const b=n===0?t.initialPromise:void 0;try{w=b??t.fn()}catch(y){w=Promise.reject(y)}Promise.resolve(w).then(d).catch(y=>{var k;if(r)return;const m=t.retry??(rd?0:3),g=t.retryDelay??MO,S=typeof g=="function"?g(n,y):g,_=m===!0||typeof m=="number"&&n<m||typeof m=="function"&&m(n,y);if(e||!_){f(y);return}n++,(k=t.onFail)==null||k.call(t,n,y),RO(S).then(()=>c()?void 0:p()).then(()=>{e?f(y):v()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?v():p().then(v),i)}}var $O=t=>setTimeout(t,0);function VO(){let t=[],e=0,n=a=>{a()},r=a=>{a()},s=$O;const i=a=>{e?t.push(a):s(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var gt=VO(),Ls,Cx,__=(Cx=class{constructor(){fe(this,Ls)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),CO(this.gcTime)&&ne(this,Ls,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(rd?1/0:5*60*1e3))}clearGcTimeout(){R(this,Ls)&&(clearTimeout(R(this,Ls)),ne(this,Ls,void 0))}},Ls=new WeakMap,Cx),Qi,Ds,qt,Ms,dt,ol,$s,pn,Zn,Ax,FO=(Ax=class extends __{constructor(e){super();fe(this,pn);fe(this,Qi);fe(this,Ds);fe(this,qt);fe(this,Ms);fe(this,dt);fe(this,ol);fe(this,$s);ne(this,$s,!1),ne(this,ol,e.defaultOptions),this.setOptions(e.options),this.observers=[],ne(this,Ms,e.client),ne(this,qt,R(this,Ms).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ne(this,Qi,BO(this.options)),this.state=e.state??R(this,Qi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=R(this,dt))==null?void 0:e.promise}setOptions(e){this.options={...R(this,ol),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,qt).remove(this)}setData(e,n){const r=jO(this.state.data,e,this.options);return lt(this,pn,Zn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){lt(this,pn,Zn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=R(this,dt))==null?void 0:r.promise;return(s=R(this,dt))==null||s.cancel(e),n?n.then(hn).catch(hn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Qi))}isActive(){return this.observers.some(e=>PO(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Mf(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!AO(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=R(this,dt))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=R(this,dt))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),R(this,qt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(R(this,dt)&&(R(this,$s)?R(this,dt).cancel({revert:!0}):R(this,dt).cancelRetry()),this.scheduleGc()),R(this,qt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||lt(this,pn,Zn).call(this,{type:"invalidate"})}fetch(e,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,dt))return R(this,dt).continueRetry(),R(this,dt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ne(this,$s,!0),r.signal)})},i=()=>{const f=v_(this.options,n),v=(()=>{const w={client:R(this,Ms),queryKey:this.queryKey,meta:this.meta};return s(w),w})();return ne(this,$s,!1),this.options.persister?this.options.persister(f,v,this):f(v)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:R(this,Ms),state:this.state,fetchFn:i};return s(f),f})();(c=this.options.behavior)==null||c.onFetch(a,this),ne(this,Ds,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&lt(this,pn,Zn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var p,v,w,b;ih(f)&&f.silent||lt(this,pn,Zn).call(this,{type:"error",error:f}),ih(f)||((v=(p=R(this,qt).config).onError)==null||v.call(p,f,this),(b=(w=R(this,qt).config).onSettled)==null||b.call(w,this.state.data,f,this)),this.scheduleGc()};return ne(this,dt,S_({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,v,w,b;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){l(y);return}(v=(p=R(this,qt).config).onSuccess)==null||v.call(p,f,this),(b=(w=R(this,qt).config).onSettled)==null||b.call(w,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,p)=>{lt(this,pn,Zn).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{lt(this,pn,Zn).call(this,{type:"pause"})},onContinue:()=>{lt(this,pn,Zn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),R(this,dt).start()}},Qi=new WeakMap,Ds=new WeakMap,qt=new WeakMap,Ms=new WeakMap,dt=new WeakMap,ol=new WeakMap,$s=new WeakMap,pn=new WeakSet,Zn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...UO(r.data,this.options),fetchMeta:e.meta??null};case"success":return ne(this,Ds,void 0),{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return ih(s)&&s.revert&&R(this,Ds)?{...R(this,Ds),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,...e.state}}};this.state=n(this.state),gt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,qt).notify({query:this,type:"updated",action:e})})},Ax);function UO(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:x_(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function BO(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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 jn,Px,zO=(Px=class extends nd{constructor(e={}){super();fe(this,jn);this.config=e,ne(this,jn,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??Km(s,n);let o=this.get(i);return o||(o=new FO({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){R(this,jn).has(e.queryHash)||(R(this,jn).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=R(this,jn).get(e.queryHash);n&&(e.destroy(),n===e&&R(this,jn).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){gt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return R(this,jn).get(e)}getAll(){return[...R(this,jn).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Ov(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>Ov(e,r)):n}notify(e){gt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){gt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){gt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},jn=new WeakMap,Px),Nn,pt,Vs,On,Er,Rx,HO=(Rx=class extends __{constructor(e){super();fe(this,On);fe(this,Nn);fe(this,pt);fe(this,Vs);this.mutationId=e.mutationId,ne(this,pt,e.mutationCache),ne(this,Nn,[]),this.state=e.state||WO(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){R(this,Nn).includes(e)||(R(this,Nn).push(e),this.clearGcTimeout(),R(this,pt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ne(this,Nn,R(this,Nn).filter(n=>n!==e)),this.scheduleGc(),R(this,pt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){R(this,Nn).length||(this.state.status==="pending"?this.scheduleGc():R(this,pt).remove(this))}continue(){var e;return((e=R(this,Vs))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,c,u,d,f,p,v,w,b,y,m,g,S,_,k,E,T;const n=()=>{lt(this,On,Er).call(this,{type:"continue"})};ne(this,Vs,S_({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(C,N)=>{lt(this,On,Er).call(this,{type:"failed",failureCount:C,error:N})},onPause:()=>{lt(this,On,Er).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,pt).canRun(this)}));const r=this.state.status==="pending",s=!R(this,Vs).canStart();try{if(r)n();else{lt(this,On,Er).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=R(this,pt).config).onMutate)==null?void 0:o.call(i,e,this));const N=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));N!==this.state.context&&lt(this,On,Er).call(this,{type:"pending",context:N,variables:e,isPaused:s})}const C=await R(this,Vs).start();return await((u=(c=R(this,pt).config).onSuccess)==null?void 0:u.call(c,C,e,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,C,e,this.state.context)),await((v=(p=R(this,pt).config).onSettled)==null?void 0:v.call(p,C,null,this.state.variables,this.state.context,this)),await((b=(w=this.options).onSettled)==null?void 0:b.call(w,C,null,e,this.state.context)),lt(this,On,Er).call(this,{type:"success",data:C}),C}catch(C){try{throw await((m=(y=R(this,pt).config).onError)==null?void 0:m.call(y,C,e,this.state.context,this)),await((S=(g=this.options).onError)==null?void 0:S.call(g,C,e,this.state.context)),await((k=(_=R(this,pt).config).onSettled)==null?void 0:k.call(_,void 0,C,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,C,e,this.state.context)),C}finally{lt(this,On,Er).call(this,{type:"error",error:C})}}finally{R(this,pt).runNext(this)}}},Nn=new WeakMap,pt=new WeakMap,Vs=new WeakMap,On=new WeakSet,Er=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),gt.batch(()=>{R(this,Nn).forEach(r=>{r.onMutationUpdate(e)}),R(this,pt).notify({mutation:this,type:"updated",action:e})})},Rx);function WO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var er,mn,al,jx,qO=(jx=class extends nd{constructor(e={}){super();fe(this,er);fe(this,mn);fe(this,al);this.config=e,ne(this,er,new Set),ne(this,mn,new Map),ne(this,al,0)}build(e,n,r){const s=new HO({mutationCache:this,mutationId:++Cl(this,al)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){R(this,er).add(e);const n=Zl(e);if(typeof n=="string"){const r=R(this,mn).get(n);r?r.push(e):R(this,mn).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(R(this,er).delete(e)){const n=Zl(e);if(typeof n=="string"){const r=R(this,mn).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&R(this,mn).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Zl(e);if(typeof n=="string"){const r=R(this,mn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r;const n=Zl(e);if(typeof n=="string"){const s=(r=R(this,mn).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){gt.batch(()=>{R(this,er).forEach(e=>{this.notify({type:"removed",mutation:e})}),R(this,er).clear(),R(this,mn).clear()})}getAll(){return Array.from(R(this,er))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Iv(n,r))}findAll(e={}){return this.getAll().filter(n=>Iv(e,n))}notify(e){gt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return gt.batch(()=>Promise.all(e.map(n=>n.continue().catch(hn))))}},er=new WeakMap,mn=new WeakMap,al=new WeakMap,jx);function Zl(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Mv(t){return{onFetch:(e,n)=>{var u,d,f,p,v;const r=e.options,s=(f=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=e.state.data)==null?void 0:p.pages)||[],o=((v=e.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let w=!1;const b=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(e.signal.aborted?w=!0:e.signal.addEventListener("abort",()=>{w=!0}),e.signal)})},y=v_(e.options,e.fetchOptions),m=async(g,S,_)=>{if(w)return Promise.reject();if(S==null&&g.pages.length)return Promise.resolve(g);const E=(()=>{const V={client:e.client,queryKey:e.queryKey,pageParam:S,direction:_?"backward":"forward",meta:e.options.meta};return b(V),V})(),T=await y(E),{maxPages:C}=e.options,N=_?OO:NO;return{pages:N(g.pages,T,C),pageParams:N(g.pageParams,S,C)}};if(s&&i.length){const g=s==="backward",S=g?KO:$v,_={pages:i,pageParams:o},k=S(r,_);a=await m(_,k,g)}else{const g=t??i.length;do{const S=l===0?o[0]??r.initialPageParam:$v(r,a);if(l>0&&S==null)break;a=await m(a,S),l++}while(l<g)}return a};e.options.persister?e.fetchFn=()=>{var w,b;return(b=(w=e.options).persister)==null?void 0:b.call(w,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=c}}}function $v(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function KO(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var Oe,Dr,Mr,Yi,Xi,$r,eo,to,Nx,GO=(Nx=class{constructor(t={}){fe(this,Oe);fe(this,Dr);fe(this,Mr);fe(this,Yi);fe(this,Xi);fe(this,$r);fe(this,eo);fe(this,to);ne(this,Oe,t.queryCache||new zO),ne(this,Dr,t.mutationCache||new qO),ne(this,Mr,t.defaultOptions||{}),ne(this,Yi,new Map),ne(this,Xi,new Map),ne(this,$r,0)}mount(){Cl(this,$r)._++,R(this,$r)===1&&(ne(this,eo,w_.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,Oe).onFocus())})),ne(this,to,cu.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,Oe).onOnline())})))}unmount(){var t,e;Cl(this,$r)._--,R(this,$r)===0&&((t=R(this,eo))==null||t.call(this),ne(this,eo,void 0),(e=R(this,to))==null||e.call(this),ne(this,to,void 0))}isFetching(t){return R(this,Oe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return R(this,Dr).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=R(this,Oe).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=R(this,Oe).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Mf(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return R(this,Oe).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=R(this,Oe).get(r.queryHash),i=s==null?void 0:s.state.data,o=TO(e,i);if(o!==void 0)return R(this,Oe).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return gt.batch(()=>R(this,Oe).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=R(this,Oe).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=R(this,Oe);gt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=R(this,Oe);return gt.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=gt.batch(()=>R(this,Oe).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(hn).catch(hn)}invalidateQueries(t,e={}){return gt.batch(()=>(R(this,Oe).findAll(t).forEach(n=>
187{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=gt.batch(()=>R(this,Oe).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(hn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(hn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=R(this,Oe).build(this,e);return n.isStaleByTime(Mf(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(hn).catch(hn)}fetchInfiniteQuery(t){return t.behavior=Mv(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(hn).catch(hn)}ensureInfiniteQueryData(t){return t.behavior=Mv(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return cu.isOnline()?R(this,Dr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,Oe)}getMutationCache(){return R(this,Dr)}getDefaultOptions(){return R(this,Mr)}setDefaultOptions(t){ne(this,Mr,t)}setQueryDefaults(t,e){R(this,Yi).set(Fa(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...R(this,Yi).values()],n={};return e.forEach(r=>{Ua(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){R(this,Xi).set(Fa(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...R(this,Xi).values()],n={};return e.forEach(r=>{Ua(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...R(this,Mr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Km(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Gm&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...R(this,Mr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){R(this,Oe).clear(),R(this,Dr).clear()}},Oe=new WeakMap,Dr=new WeakMap,Mr=new WeakMap,Yi=new WeakMap,Xi=new WeakMap,$r=new WeakMap,eo=new WeakMap,to=new WeakMap,Nx),ZO=x.createContext(void 0),JO=({client:t,children:e})=>(x.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),h.jsx(ZO.Provider,{value:t,children:e}));/**
188 * @remix-run/router v1.23.0
189 *
190 * Copyright (c) Remix Software Inc.
191 *
192 * This source code is licensed under the MIT license found in the
193 * LICENSE.md file in the root directory of this source tree.
194 *
195 * @license MIT
196 */function Ba(){return Ba=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ba.apply(this,arguments)}var Ur;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Ur||(Ur={}));const Vv="popstate";function QO(t){t===void 0&&(t={});function e(r,s){let{pathname:i,search:o,hash:a}=r.location;return Vf("",{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:uu(s)}return XO(e,n,null,t)}function Ue(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function k_(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function YO(){return Math.random().toString(36).substr(2,8)}function Fv(t,e){return{usr:t.state,key:t.key,idx:e}}function Vf(t,e,n,r){return n===void 0&&(n=null),Ba({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?To(e):e,{state:n,key:e&&e.key||r||YO()})}function uu(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function To(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function XO(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Ur.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Ba({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=Ur.Pop;let b=u(),y=b==null?null:b-c;c=b,l&&l({action:a,location:w.location,delta:y})}function f(b,y){a=Ur.Push;let m=Vf(w.location,b,y);c=u()+1;let g=Fv(m,c),S=w.createHref(m);try{o.pushState(g,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(S)}i&&l&&l({action:a,location:w.location,delta:1})}function p(b,y){a=Ur.Replace;let m=Vf(w.location,b,y);c=u();let g=Fv(m,c),S=w.createHref(m);o.replaceState(g,"",S),i&&l&&l({action:a,location:w.location,delta:0})}function v(b){let y=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof b=="string"?b:uu(b);return m=m.replace(/ $/,"%20"),Ue(y,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,y)}let w={get action(){return a},get location(){return t(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Vv,d),l=b,()=>{s.removeEventListener(Vv,d),l=null}},createHref(b){return e(s,b)},createURL:v,encodeLocation(b){let y=v(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:p,go(b){return o.go(b)}};return w}var Uv;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Uv||(Uv={}));function eI(t,e,n){return n===void 0&&(n="/"),tI(t,e,n,!1)}function tI(t,e,n,r){let s=typeof e=="string"?To(e):e,i=Zm(s.pathname||"/",n);if(i==null)return null;let o=E_(t);nI(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=fI(i);a=dI(o[l],c,r)}return a}function E_(t,e,n,r){e===void 0&&(e=[]),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("/")&&(Ue(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not val
196id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Yr([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(Ue(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),E_(i.children,e,u,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:cI(c,i.index),routesMeta:u})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of T_(i.path))s(i,o,l)}),e}function T_(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=T_(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function nI(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:uI(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const rI=/^:[\w-]+$/,sI=3,iI=2,oI=1,aI=10,lI=-2,Bv=t=>t==="*";function cI(t,e){let n=t.split("/"),r=n.length;return n.some(Bv)&&(r+=lI),e&&(r+=iI),n.filter(s=>!Bv(s)).reduce((s,i)=>s+(rI.test(i)?sI:i===""?oI:aI),r)}function uI(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function dI(t,e,n){let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?e:e.slice(i.length)||"/",d=zv({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=zv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 9,263 bytes, lines 196-205
196Object.assign(s,d.params),o.push({params:s,pathname:Yr([i,d.pathname]),pathnameBase:yI(Yr([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=Yr([i,d.pathnameBase]))}return o}function zv(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=hI(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:f,isOptional:p}=u;if(f==="*"){let w=a[d]||"";o=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const v=a[d];return p&&!v?c[f]=void 0:c[f]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:t}}function hI(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),k_(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function fI(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return k_(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Zm(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function pI(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?To(t):t;return{pathname:n?n.startsWith("/")?n:mI(n,e):e,search:vI(r),hash:wI(s)}}function mI(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function oh(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function gI(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Jm(t,e){let n=gI(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Qm(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=To(t):(s=Ba({},t),Ue(!s.pathname||!s.pathname.includes("?"),oh("?","pathname","search",s)),Ue(!s.pathname||!s.pathname.includes("#"),oh("#","pathname","hash",s)),Ue(!s.search||!s.search.includes("#"),oh("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=e.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?e[d]:"/"}let l=pI(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Yr=t=>t.join("/").replace(/\/\/+/g,"/"),yI=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),vI=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,wI=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function xI(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const C_=["post","put","patch","delete"];new Set(C_);const bI=["get",...C_];new Set(bI);/**
197 * React Router v6.30.1
198 *
199 * Copyright (c) Remix Software Inc.
200 *
201 * This source code is licensed under the MIT license found in the
202 * LICENSE.md file in the root directory of this source tree.
203 *
204 * @license MIT
205 */function za(){return za=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},za.apply(this,arguments)}const Ym=x.createContext(null),SI=x.createContext(null),fs=x.createContext(null),sd=x.createContext(null),mr=x.createContext({outlet:null,matches:[],isDataRoute:!1}),A_=x.createContext(null);function _I(t,e){let{relative:n}=e===void 0?{}:e;Co()||Ue(!1);let{basename:r,navigator:s}=x.useContext(fs),{hash:i,pathname:o,search:a}=R_(t,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Yr([r,o])),s.createHref({pathname:l,search:a,hash:i})}function Co(){return x.useContext(sd)!=null}function ps(){return Co()||Ue(!1),x.useContext(sd).location}function P_(t){x.useContext(fs).static||x.useLayoutEffect(t)}function Xm(){let{isDataRoute:t}=x.useContext(mr);return t?DI():kI()}function kI(){Co()||Ue(!1);let t=x.useContext(Ym),{basename:e,future:n,navigator:r}=x.useContext(fs),{matches:s}=x.useContext(mr),{pathname:i}=ps(),o=JSON.stringify(Jm(s,n.v7_relativeSplatPath)),a=x.useRef(!1);return P_(()=>{a.current=!0}),x.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=Qm(c,JSON.parse(o),i,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:Yr([e,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[e,r,o,i,t])}function B3(){let{matches:t}=x.useContext(mr),e=t[t.length-1];return e?e.params:{}}function R_(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=x.useContext(fs),{matches:s}=x.useContext(mr),{pathname:i}=ps(),o=JSON.stringify(Jm(s,r.v7_relativeSplatPath));return x.useMemo(()=>Qm(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function EI(t,e){return TI(t,e)}function TI(t,e,n,r){Co()||Ue(!1);let{navigator:s}=x.useContext(fs),{matches:i}=x.useContext(mr),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=ps(),u;if(e){var d;let b=typeof e=="string"?To(e):e;l==="/"||(d=b.pathname)!=null&&d.startsWith(l)||Ue(!1),u=b}else u=c;let f=u.pathname||"/",p=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=eI(t,{pathname:p}),w=jI(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Yr([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Yr([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return e&&w?x.createElement(sd.Provider,{value:{location:za({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ur.Pop}},w):w}function CI(){let t=LI(),e=xI(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},e),n?x.createElement("pre",{style:s},n):null,null)}const AI=x.createElement(CI,null);class PI extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?x.createElement(mr.Provider,{value:this.props.routeContext},x.createElement(A_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function RI(t){let{routeContext:e,match:n,children:r}=t,s=x.useContext(Ym);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(mr.Provider,{value:e},r)}function jI(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||Ue(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:f,errors:p}=n,v=d.route.loader&&f[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||v){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,f)=>{let p,v=!1,w=null,b=null;n&&(p=a&&d.route.id?a[d.route.id]:void 0,w=d.route.errorElement||AI,l&&(c<0&&f===0?(v=!0,b=null):c===f&&(v=!0,b=d.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,f+1)),m=()=>{let g;return p?g=w:v?g=b:d.route.Component?g=x.createElement(d.route.Component,null):d.route.element?g=d.route.element:g=u,x.createElement(RI,{match:d,routeC
205ontext:{outlet:u,matches:y,isDataRoute:n!=null},children:g})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?x.createElement(PI,{location:n.location,revalidation:n.revalidation,component:w,error:p,children:m(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):m()},null)}var j_=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(j_||{}),du=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(du||{});function NI(t){let e=x.useContext(Ym);return e||Ue(!1),e}function OI(t){let e=x.useContext(SI);return e||Ue(!1),e}function II(t){let e=x.useContext(mr);return e||Ue(!1),e}function N_(t){let e=II(),n=e.matches[e.matches.length-1];return n.route.id||Ue(!1),n.route.id}function LI(){var t;let e=x.useContext(A_),n=OI(du.UseRouteError),r=N_(du.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function DI(){let{router:t}=NI(j_.UseNavigateStable),e=N_(du.UseNavigateStable),n=x.useRef(!1);return P_(()=>{n.current=!0}),x.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,za({fromRouteId:e},i)))},[t,e])}function MI(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function z3(t){let{to:e,replace:n,state:r,relative:s}=t;Co()||Ue(!1);let{future:i,static:o}=x.useContext(fs),{matches:a}=x.useContext(mr),{pathname:l}=ps(),c=Xm(),u=Qm(e,Jm(a,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(u);return x.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:s}),[c,d,s,n,r]),null}function $e(t){Ue(!1)}function $I(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Ur.Pop,navigator:i,static:o=!1,future:a}=t;Co()&&Ue(!1);let l=e.replace(/^\/*/,"/"),c=x.useMemo(()=>({basename:l,navigator:i,static:o,future:za({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=To(r));let{pathname:u="/",search:d="",hash:f="",state:p=null,key:v="default"}=r,w=x.useMemo(()=>{let b=Zm(u,l);return b==null?null:{location:{pathname:b,search:d,hash:f,state:p,key:v},navigationType:s}},[l,u,d,f,p,v,s]);return w==null?null:x.createElement(fs.Provider,{value:c},x.createElement(sd.Provider,{children:n,value:w}))}function VI(t){let{children:e,location:n}=t;return EI(Ff(e),n)}new Promise(()=>{});function Ff(t,e){e===void 0&&(e=[]);let n=[];return x.Children.forEach(t,(r,s)=>{if(!x.isValidElement(r))return;let i=[...e,s];if(r.type===x.Fragment){n.push.apply(n,Ff(r.props.children,i));return}r.type!==$e&&Ue(!1),!r.props.index||!r.props.children||Ue(!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=Ff(r.props.children,i)),n.push(o)}),n}/**
206 * React Router DOM v6.30.1
207 *
208 * Copyright (c) Remix Software Inc.
209 *
210 * This source code is licensed under the MIT license found in the
211 * LICENSE.md file in the root directory of this source tree.
212 *
213 * @license MIT
214 */function Uf(){return Uf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Uf.apply(this,arguments)}function FI(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function UI(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function BI(t,e){return t.button===0&&(!e||e==="_self")&&!UI(t)}function Bf(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function zI(t,e){let n=Bf(t);return e&&e.forEach((r,s)=>
214{n.has(s)||e.getAll(s).forEach(i=>{n.append(s,i)})}),n}const HI=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],WI="6";try{window.__reactRouterVersion=WI}catch{}const qI="startTransition",Hv=Fp[qI];function KI(t){let{basename:e,children:n,future:r,window:s}=t,i=x.useRef();i.current==null&&(i.current=QO({window:s,v5Compat:!0}));let o=i.current,[a,l]=x.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=x.useCallback(d=>{c&&Hv?Hv(()=>l(d)):l(d)},[l,c]);return x.useLayoutEffect(()=>o.listen(u),[o,u]),x.useEffect(()=>MI(r),[r]),x.createElement($I,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const GI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ZI=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Y=x.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=e,f=FI(e,HI),{basename:p}=x.useContext(fs),v,w=!1;if(typeof c=="string"&&ZI.test(c)&&(v=c,GI))try{let g=new URL(window.location.href),S=c.startsWith("//")?new URL(g.protocol+c):new URL(c),_=Zm(S.pathname,p);S.origin===g.origin&&_!=null?c=_+S.search+S.hash:w=!0}catch{}let b=_I(c,{relative:s}),y=JI(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:d});function m(g){r&&r(g),g.defaultPrevented||y(g)}return x.createElement("a",Uf({},f,{href:v||b,onClick:w||i?r:m,ref:n,target:l}))});var Wv;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Wv||(Wv={}));var qv;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(qv||(qv={}));function JI(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=Xm(),c=ps(),u=R_(t,{relative:o});return x.useCallback(d=>{if(BI(d,n)){d.preventDefault();let f=r!==void 0?r:uu(c)===uu(u);l(t,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,r,s,n,t,i,o,a])}function H3(t){let e=x.useRef(Bf(t)),n=x.useRef(!1),r=ps(),s=x.useMemo(()=>zI(r.search,n.current?null:e.current),[r.search]),i=Xm(),o=x.useCallback((a,l)=>{const c=Bf(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}var QI=typeof Element<"u",YI=typeof Map=="function",XI=typeof Set=="function",e2=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Ec(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,s;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!Ec(t[r],e[r]))return!1;return!0}var i;if(YI&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i=t.entries();!(r=i.next()).done;)if(!e.has(r.value[0]))return!1;for(i=t.entries();!(r=i.next()).done;)if(!Ec(r.value[1],e.get(r.value[0])))return!1;return!0}if(XI&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i=t.entries();!(r=i.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(e2&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf&&typeof t.valueOf=="function"&&typeof e.valueOf=="function")return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString&&typeof t.toString=="function"&&typeof e.toString=="function")return t.toString()===e.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[r]))return!1;if(QI&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&t.$$typeof)&&!Ec(t[s[r]],e[s[r]]))return!1;return!0}return t!==t&&e!==e}var t2=function(e,n){try{return Ec(e,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const n2=ll(t2);var r2=function(t,e,n,r,s,i,o,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,s,i,o,a],u=0;l=new Error(e.replace(/%s/g,function(){return c[u++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},s2=r2;const Kv=ll(s2);
214var i2=function(e,n,r,s){var i=r?r.call(s,e,n):void 0;if(i!==void 0)return!!i;if(e===n)return!0;if(typeof e!="object"||!e||typeof n!="object"||!n)return!1;var o=Object.keys(e),a=Object.keys(n);if(o.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),c=0;c<o.length;c++){var u=o[c];if(!l(u))return!1;var d=e[u],f=n[u];if(i=r?r.call(s,d,f,u):void 0,i===!1||i===void 0&&d!==f)return!1}return!0};const o2=ll(i2);var O_=(t=>(t.BASE="base",t.BODY="body",t.HEAD="head",t.HTML="html",t.LINK="link",t.META="meta",t.NOSCRIPT="noscript",t.SCRIPT="script",t.STYLE="style",t.TITLE="title",t.FRAGMENT="Symbol(react.fragment)",t))(O_||{}),ah={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Gv=Object.values(O_),id={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},I_=Object.entries(id).reduce((t,[e,n])=>(t[n]=e,t),{}),wn="data-rh",Hi={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Wi=(t,e)=>{for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(Object.prototype.hasOwnProperty.call(r,e))return r[e]}return null},a2=t=>{let e=Wi(t,"title");const n=Wi(t,Hi.TITLE_TEMPLATE);if(Array.isArray(e)&&(e=e.join("")),n&&e)return n.replace(/%s/g,()=>e);const r=Wi(t,Hi.DEFAULT_TITLE);return e||r||void 0},l2=t=>Wi(t,Hi.ON_CHANGE_CLIENT_STATE)||(()=>{}),lh=(t,e)=>e.filter(n=>typeof n[t]<"u").map(n=>n[t]).reduce((n,r)=>({...n,...r}),{}),c2=(t,e)=>e.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let i=0;i<s.length;i+=1){const a=s[i].toLowerCase();if(t.indexOf(a)!==-1&&r[a])return n.concat(r)}}return n},[]),u2=t=>console&&typeof console.warn=="function"&&console.warn(t),Ho=(t,e,n)=>{const r={};return n.filter(s=>Array.isArray(s[t])?!0:(typeof s[t]<"u"&&u2(`Helmet: ${t} should be of type "Array". Instead found type "${typeof s[t]}"`),!1)).map(s=>s[t]).reverse().reduce((s,i)=>{const o={};i.filter(l=>{let c;const u=Object.keys(l);for(let f=0;f<u.length;f+=1){const p=u[f],v=p.toLowerCase();e.indexOf(v)!==-1&&!(c==="rel"&&l[c].toLowerCase()==="canonical")&&!(v==="rel"&&l[v].toLowerCase()==="stylesheet")&&(c=v),e.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(c=p)}if(!c||!l[c])return!1;const d=l[c].toLowerCase();return r[c]||(r[c]={}),o[c]||(o[c]={}),r[c][d]?!1:(o[c][d]=!0,!0)}).reverse().forEach(l=>s.push(l));const a=Object.keys(o);for(let l=0;l<a.length;l+=1){const c=a[l],u={...r[c],...o[c]};r[c]=u}return s},[]).reverse()},d2=(t,e)=>{if(Array.isArray(t)&&t.length){for(let n=0;n<t.length;n+=1)if(t[n][e])return!0}return!1},h2=t=>({baseTag:c2(["href"],t),bodyAttributes:lh("bodyAttributes",t),defer:Wi(t,Hi.DEFER),encode:Wi(t,Hi.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:lh("htmlAttributes",t),linkTags:Ho("link",["rel","href"],t),metaTags:Ho("meta",["name","charset","http-equiv","property","itemprop"],t),noscriptTags:Ho("noscript",["innerHTML"],t),onChangeClientState:l2(t),scriptTags:Ho("script",["src","innerHTML"],t),styleTags:Ho("style",["cssText"],t),title:a2(t),titleAttributes:lh("titleAttributes",t),prioritizeSeoTags:d2(t,Hi.PRIORITIZE_SEO_TAGS)}),L_=t=>Array.isArray(t)?t.join(""):t,f2=(t,e)=>{const n=Object.keys(t);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&e[n[r]].includes(t[n[r]]))return!0;return!1},ch=(t,e)=>Array.isArray(t)?t.reduce((n,r)=>(f2(r,e)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:t,priority:[]},Zv=(t,e)=>({...t,[e]:void 0}),p2=["noscript","script","style"],zf=(t,e=!0)=>e===!1?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),D_=t=>Object.keys(t).reduce((e,n)=>{const r=typeof t[n]<"u"?`${n}
214="${t[n]}"`:`${n}`;return e?`${e} ${r}`:r},""),m2=(t,e,n,r)=>{const s=D_(n),i=L_(e);return s?`<${t} ${wn}="true" ${s}>${zf(i,r)}</${t}>`:`<${t} ${wn}="true">${zf(i,r)}</${t}>`},g2=(t,e,n=!0)=>e.reduce((r,s)=>{const i=s,o=Object.keys(i).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,u)=>{const d=typeof i[u]>"u"?u:`${u}="${zf(i[u],n)}"`;return c?`${c} ${d}`:d},""),a=i.innerHTML||i.cssText||"",l=p2.indexOf(t)===-1;return`${r}<${t} ${wn}="true" ${o}${l?"/>":`>${a}</${t}>`}`},""),M_=(t,e={})=>Object.keys(t).reduce((n,r)=>{const s=id[r];return n[s||r]=t[r],n},e),y2=(t,e,n)=>{const r={key:e,[wn]:!0},s=M_(n,r);return[P.createElement("title",s,e)]},Tc=(t,e)=>e.map((n,r)=>{const s={key:r,[wn]:!0};return Object.keys(n).forEach(i=>{const a=id[i]||i;if(a==="innerHTML"||a==="cssText"){const l=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:l}}else s[a]=n[i]}),P.createElement(t,s)}),Wt=(t,e,n=!0)=>{switch(t){case"title":return{toComponent:()=>y2(t,e.title,e.titleAttributes),toString:()=>m2(t,e.title,e.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>M_(e),toString:()=>D_(e)};default:return{toComponent:()=>Tc(t,e),toString:()=>g2(t,e,n)}}},v2=({metaTags:t,linkTags:e,scriptTags:n,encode:r})=>{const s=ch(t,ah.meta),i=ch(e,ah.link),o=ch(n,ah.script);return{priorityMethods:{toComponent:()=>[...Tc("meta",s.priority),...Tc("link",i.priority),...Tc("script",o.priority)],toString:()=>`${Wt("meta",s.priority,r)} ${Wt("link",i.priority,r)} ${Wt("script",o.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:o.default}},w2=t=>{const{baseTag:e,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:o,title:a="",titleAttributes:l,prioritizeSeoTags:c}=t;let{linkTags:u,metaTags:d,scriptTags:f}=t,p={toComponent:()=>[],toString:()=>""};return c&&({priorityMethods:p,linkTags:u,metaTags:d,scriptTags:f}=v2(t)),{priority:p,base:Wt("base",e,r),bodyAttributes:Wt("bodyAttributes",n,r),htmlAttributes:Wt("htmlAttributes",s,r),link:Wt("link",u,r),meta:Wt("meta",d,r),noscript:Wt("noscript",i,r),script:Wt("script",f,r),style:Wt("style",o,r),title:Wt("title",{title:a,titleAttributes:l},r)}},Hf=w2,Jl=[],eg=!!(typeof window<"u"&&window.document&&window.document.createElement),Wf=class{constructor(t,e){qn(this,"instances",[]);qn(this,"canUseDOM",eg);qn(this,"context");qn(this,"value",{setHelmet:t=>{this.context.helmet=t},helmetInstances:{get:()=>this.canUseDOM?Jl:this.instances,add:t=>{(this.canUseDOM?Jl:this.instances).push(t)},remove:t=>{const e=(this.canUseDOM?Jl:this.instances).indexOf(t);(this.canUseDOM?Jl:this.instances).splice(e,1)}}});this.context=t,this.canUseDOM=e||!1,e||(t.helmet=Hf({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},x2=parseInt(P.version.split(".")[0],10),qf=x2>=19,b2={},$_=P.createContext(b2),Fs,V_=(Fs=class extends x.Component{constructor(n){super(n);qn(this,"helmetData");qf?this.helmetData=null:this.helmetData=new Wf(this.props.context||{},Fs.canUseDOM)}render(){return qf?P.createElement(P.Fragment,null,this.props.children):P.createElement($_.Provider,{value:this.helmetData.value},this.props.children)}},qn(Fs,"canUseDOM",eg),Fs),ai=(t,e)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${t}[${wn}]`),s=[].slice.call(r),i=[];let o;return e&&e.length&&e.forEach(a=>{const l=document.createElement(t);for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c))if(c==="innerHTML")l.innerHTML=a.innerHTML;else if(c==="cssText"){const u=a.cssText;l.appendChild(document.createTextNode(u))}else{const u=c,d=typeof a[u]>
214"u"?"":a[u];l.setAttribute(c,d)}l.setAttribute(wn,"true"),s.some((c,u)=>(o=u,l.isEqualNode(c)))?s.splice(o,1):i.push(l)}),s.forEach(a=>{var l;return(l=a.parentNode)==null?void 0:l.removeChild(a)}),i.forEach(a=>n.appendChild(a)),{oldTags:s,newTags:i}},Kf=(t,e)=>{const n=document.getElementsByTagName(t)[0];if(!n)return;const r=n.getAttribute(wn),s=r?r.split(","):[],i=[...s],o=Object.keys(e);for(const a of o){const l=e[a]||"";n.getAttribute(a)!==l&&n.setAttribute(a,l),s.indexOf(a)===-1&&s.push(a);const c=i.indexOf(a);c!==-1&&i.splice(c,1)}for(let a=i.length-1;a>=0;a-=1)n.removeAttribute(i[a]);s.length===i.length?n.removeAttribute(wn):n.getAttribute(wn)!==o.join(",")&&n.setAttribute(wn,o.join(","))},S2=(t,e)=>{typeof t<"u"&&document.title!==t&&(document.title=L_(t)),Kf("title",e)},Jv=(t,e)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:o,noscriptTags:a,onChangeClientState:l,scriptTags:c,styleTags:u,title:d,titleAttributes:f}=t;Kf("body",r),Kf("html",s),S2(d,f);const p={baseTag:ai("base",n),linkTags:ai("link",i),metaTags:ai("meta",o),noscriptTags:ai("noscript",a),scriptTags:ai("script",c),styleTags:ai("style",u)},v={},w={};Object.keys(p).forEach(b=>{const{newTags:y,oldTags:m}=p[b];y.length&&(v[b]=y),m.length&&(w[b]=p[b].oldTags)}),e&&e(),l(t,v,w)},Wo=null,_2=t=>{Wo&&cancelAnimationFrame(Wo),t.defer?Wo=requestAnimationFrame(()=>{Jv(t,()=>{Wo=null})}):(Jv(t),Wo=null)},k2=_2,Qv=class extends x.Component{constructor(){super(...arguments);qn(this,"rendered",!1)}shouldComponentUpdate(e){return!o2(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:n}=this.props.context;let r=null;const s=h2(e.get().map(i=>{const{context:o,...a}=i.props;return a}));V_.canUseDOM?k2(s):Hf&&(r=Hf(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Cc=[],Yv=t=>{const e={};for(const n of Object.keys(t))e[I_[n]||n]=t[n];return e},ws=t=>{const e={};for(const n of Object.keys(t)){const r=id[n];e[r||n]=t[n]}return e},Xv=(t,e)=>{if(!eg)return;const n=document.getElementsByTagName(t)[0];if(!n)return;const r="data-rh-managed",s=n.getAttribute(r),i=s?s.split(","):[],o=Object.keys(e);for(const a of i)o.includes(a)||n.removeAttribute(a);for(const a of o){const l=e[a];l==null||l===!1?n.removeAttribute(a):l===!0?n.setAttribute(a,""):n.setAttribute(a,String(l))}o.length>0?n.setAttribute(r,o.join(",")):n.removeAttribute(r)},uh=()=>{const t={},e={};for(const n of Cc){const{htmlAttributes:r,bodyAttributes:s}=n.props;r&&Object.assign(t,Yv(r)),s&&Object.assign(e,Yv(s))}Xv("html",t),Xv("body",e)},E2=class extends x.Component{componentDidMount(){Cc.push(this),uh()}componentDidUpdate(){uh()}componentWillUnmount(){const t=Cc.indexOf(this);t!==-1&&Cc.splice(t,1),uh()}resolveTitle(){const{title:t,titleTemplate:e,defaultTitle:n}=this.props;return t&&e?e.replace(/%s/g,()=>Array.isArray(t)?t.join(""):t):t||n||void 0}renderTitle(){const t=this.resolveTitle();if(t===void 0)return null;const e=this.props.titleAttributes||{};return P.createElement("title",ws(e),t)}renderBase(){const{base:t}=this.props;return t?P.createElement("base",ws(t)):null}renderMeta(){const{meta:t}=this.props;return!t||!Array.isArray(t)?null:t.map((e,n)=>P.createElement("meta",{key:n,...ws(e)}))}renderLink(){const{link:t}=this.props;return!t||!Array.isArray(t)?null:t.map((e,n)=>P.createElement("link",{key:n,...ws(e)}))}renderScript(){const{script:t}=this.props;return!t||!Array.isArray(t)?null:t.map((e,n)=>{const{innerHTML:r,...s}=e,i=ws(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),P.createElement("script",{key:n,...i})})}renderStyle(){const{style:t}=this.props;return!t||!Array.isArray(t)?null:t.map((e,n)=>{const{cssText:r,...s}=e,i=ws(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),P.createElement("style",{key:n,...i})})}renderNoscript(){const{noscript:t}=this.props;return!t||!Array.isArray(t)?null:t.map((e,n)=>{const{innerHTML:r,...s}=e,i=ws(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),P.createElement("noscript",{key:n,...i})})}render(){return P.createElement(P.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Nh,F_=(Nh=class extends x.Component{shouldComponentUpdate(t){return!n2(Zv(this.props,"helmetData"),Zv(t,"helmetData"))}mapNestedChildrenToProps(t,e){if(!e)return null;switch(t.type){case"script":case"noscript":return{innerHTML:e};case"style":return{cssText:e};default:throw new Error(`<${t.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(t,e,n,r){return{...e,[t.type]:[...e[t.type]||[],{...n,...this.mapNestedChildrenToProps(t,r)}]}}mapObjectTypeChildren(t,e,n,r){switch(t.type){case"title":return{...e,[t.type]:r,titleAttributes:{...n}};case"body":return{...e,bodyAttributes:{...n}};case"html":return{...e,htmlAttributes:{...n}};default:return{...e,[t.type]:{...n}}}}mapArrayTypeChildrenToProps(t,e){let n={...e};return Object.keys(t).forEach(r=>{n={...n,[r]:t[r]}}),n}
214warnOnInvalidChildren(t,e){return Kv(Gv.some(n=>t.type===n),typeof t.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Gv.join(", ")} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`),Kv(!e||typeof e=="string"||Array.isArray(e)&&!e.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${t.type}>. Did you forget to wrap your children in braces? ( <${t.type}>{\`\`}</${t.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(t,e){let n={};return P.Children.forEach(t,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,o=Object.keys(i).reduce((l,c)=>(l[I_[c]||c]=i[c],l),{});let{type:a}=r;switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,s),a){case"Symbol(react.fragment)":e=this.mapChildrenToProps(s,e);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,s);break;default:e=this.mapObjectTypeChildren(r,e,o,s);break}}),this.mapArrayTypeChildrenToProps(n,e)}render(){const{children:t,...e}=this.props;let n={...e},{helmetData:r}=e;if(t&&(n=this.mapChildrenToProps(t,n)),r&&!(r instanceof Wf)){const s=r;r=new Wf(s.context,!0),delete n.helmetData}return qf?P.createElement(E2,{...n}):r?P.createElement(Qv,{...n,context:r.value}):P.createElement($_.Consumer,null,s=>P.createElement(Qv,{...n,context:s}))}},qn(Nh,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Nh);const tg=x.createContext({});function ng(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const U_=typeof window<"u",B_=U_?x.useLayoutEffect:x.useEffect,od=x.createContext(null);function rg(t,e){t.indexOf(e)===-1&&t.push(e)}function vl(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Hn=(t,e,n)=>n>e?e:n<t?t:n;let ad=()=>{},is=()=>{};const hr={},z_=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function H_(t){return typeof t=="object"&&t!==null}const W_=t=>/^0[^.\s]+$/u.test(t);function sg(t){let e;return()=>(e===void 0&&(e=t()),e)}const Yt=t=>t,T2=(t,e)=>n=>e(t(n)),wl=(...t)=>t.reduce(T2),fo=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class ig{constructor(){this.subscriptions=[]}add(e){return rg(this.subscriptions,e),()=>vl(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Sn=t=>t*1e3,Jt=t=>t/1e3;function q_(t,e){return e?t*(1e3/e):0}const C2=(t,e,n)=>{const r=e-t;return((n-t)%r+r)%r+t},K_=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,A2=1e-7,P2=12;function R2(t,e,n,r,s){let i,o,a=0;do o=e+(n-e)/2,i=K_(o,r,s)-t,i>0?n=o:e=o;while(Math.abs(i)>A2&&++a<P2);return o}function xl(t,e,n,r){if(t===e&&n===r)return Yt;const s=i=>R2(i,0,1,t,n);return i=>i===0||i===1?i:K_(s(i),e,r)}const G_=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Z_=t=>e=>1-t(1-e),J_=xl(.33,1.53,.69,.99),og=Z_(J_),Q_=G_(og),Y_=t=>(t*=2)<1?.5*og(t):.5*(2-Math.pow(2,-10*(t-1))),ag=t=>1-Math.sin(Math.acos(t)),X_=Z_(ag),ek=G_(ag),j2=xl(.42,0,1,1),N2=xl(0,0,.58,1),tk=xl(.42,0,.58,1),nk=t=>Array.isArray(t)&&typeof t[0]!="number";function rk(t,e){return nk(t)?t[C2(0,t.length,e)]:t}const sk=t=>Array.isArray(t)&&typeof t[0]=="number",e0={linear:Yt,easeIn:j2,easeInOut:tk,easeOut:N2,circIn:ag,circInOut:ek,circOut:X_,backIn:og,backInOut:Q_,backOut:J_,anticipate:Y_},O2=t=>typeof t=="string",t0=t=>{if(sk(t)){is(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,r,s]=t;return xl(e,n,r,s)}else if(O2(t))return is(e0[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),e0[t];return t},Ql=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],n0={value:null,addProjectionMetrics:null};function I2(t,e){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){o.has(d)&&(u.schedule(d),t()),l++,d(a)}const u={schedule:(d,f=!1,p=!1)=>{const w=p&&s?n:r;return f&&o.add(d),w.has(d)||w.add(d),d},cancel:d=>
vendor: 26,630 bytes, line 214
214{r.delete(d),o.delete(d)},process:d=>{if(a=d,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),e&&n0.value&&n0.value.frameloop[e].push(l),l=0,n.clear(),s=!1,i&&(i=!1,u.process(d))}};return u}const L2=40;function ik(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Ql.reduce((g,S)=>(g[S]=I2(i,e?S:void 0),g),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:v}=o,w=()=>{const g=hr.useManualTiming?s.timestamp:performance.now();n=!1,hr.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(g-s.timestamp,L2),1)),s.timestamp=g,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),p.process(s),v.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(w))},b=()=>{n=!0,r=!0,s.isProcessing||t(w)};return{schedule:Ql.reduce((g,S)=>{const _=o[S];return g[S]=(k,E=!1,T=!1)=>(n||b(),_.schedule(k,E,T)),g},{}),cancel:g=>{for(let S=0;S<Ql.length;S++)o[Ql[S]].cancel(g)},state:s,steps:o}}const{schedule:ke,cancel:os,state:it,steps:dh}=ik(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yt,!0);let Ac;function D2(){Ac=void 0}const yt={now:()=>(Ac===void 0&&yt.set(it.isProcessing||hr.useManualTiming?it.timestamp:performance.now()),Ac),set:t=>{Ac=t,queueMicrotask(D2)}},ok=t=>e=>typeof e=="string"&&e.startsWith(t),ak=ok("--"),M2=ok("var(--"),lg=t=>M2(t)?$2.test(t.split("/*")[0].trim()):!1,$2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function r0(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Ao={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ha={...Ao,transform:t=>Hn(0,1,t)},Yl={...Ao,default:1},fa=t=>Math.round(t*1e5)/1e5,cg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function V2(t){return t==null}const F2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ug=(t,e)=>n=>!!(typeof n=="string"&&F2.test(n)&&n.startsWith(t)||e&&!V2(n)&&Object.prototype.hasOwnProperty.call(n,e)),lk=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(cg);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},U2=t=>Hn(0,255,t),hh={...Ao,transform:t=>Math.round(U2(t))},js={test:ug("rgb","red"),parse:lk("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+hh.transform(t)+", "+hh.transform(e)+", "+hh.transform(n)+", "+fa(Ha.transform(r))+")"};function B2(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Gf={test:ug("#"),parse:B2,transform:js.transform},bl=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Tr=bl("deg"),Fn=bl("%"),z=bl("px"),z2=bl("vh"),H2=bl("vw"),s0={...Fn,parse:t=>Fn.parse(t)/100,transform:t=>Fn.transform(t*100)},ji={test:ug("hsl","hue"),parse:lk("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Fn.transform(fa(e))+", "+Fn.transform(fa(n))+", "+fa(Ha.transform(r))+")"},We={test:t=>js.test(t)||Gf.test(t)||ji.test(t),parse:t=>js.test(t)?js.parse(t):ji.test(t)?ji.parse(t):Gf.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?js.transform(t):ji.transform(t),getAnimatableNone:t=>{const e=We.parse(t);return e.alpha=0,We.transform(e)}},W2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function q2(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(cg))==null?void 0:e.length)||0)+(((n=t.match(W2))==null?void 0:n.length)||0)>0}const ck="number",uk="color",K2="var",G2="var(",i0="${}",Z2=/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 Wa(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=e.replace(Z2,l=>(We.test(l)?(r.color.push(i),s.push(uk),n.push(We.parse(l))):l.startsWith(G2)?(r.var.push(i),s.push(K2),n.push(l)):(r.number.push(i),s.push(ck),n.push(parseFloat(l))),++i,i0)).split(i0);return{values:n,split:a,indexes:r,types:s}}function dk(t){return Wa(t).values}function hk(t){const{split:e,types:n}=Wa(t),r=e.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=e[o],s[o]!==void 0){const a=n[o];a===ck?i+=fa(s[o]):a===uk?i+=We.transform(s[o]):i+=s[o]}return i}}const J2=t=>typeof t=="number"?0:We.test(t)?We.getAnimatableNone(t):t;function Q2(t){const e=dk(t);return hk(t)(e.map(J2))}const as={test:q2,parse:dk,createTransformer:hk,getAnimatableNone:Q2};function fh(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Y2({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,o=0;if(!e)s=i=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=fh(l,a,t+1/3),i=fh(l,a,t),o=fh(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function hu(t,e){return n=>n>0?e:t}const Ae=(t,e,n)=>t+(e-t)*n,ph=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},X2=[Gf,js,ji],eL=t=>X2.find(e=>e.test(t));function o0(t){const e=eL(t);if(ad(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===ji&&(n=Y2(n)),n}const a0=(t,e)=>{const n=o0(t),r=o0(e);if(!n||!r)return hu(t,e);const s={...n};return i=>(s.red=ph(n.red,r.red,i),s.green=ph(n.green,r.green,i),s.blue=ph(n.blue,r.blue,i),s.alpha=Ae(n.alpha,r.alpha,i),js.transform(s))},Zf=new Set(["none","hidden"]);function tL(t,e){return Zf.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function nL(t,e){return n=>Ae(t,e,n)}function dg(t){return typeof t=="number"?nL:typeof t=="string"?lg(t)?hu:We.test(t)?a0:iL:Array.isArray(t)?fk:typeof t=="object"?We.test(t)?a0:rL:hu}function fk(t,e){const n=[...t],r=n.length,s=t.map((i,o)=>dg(i)(i,e[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function rL(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=dg(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function sL(t,e){const n=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const i=e.types[s],o=t.indexes[i][r[i]],a=t.values[o]??0;n[s]=a,r[i]++}return n}const iL=(t,e)=>{const n=as.createTransformer(e),r=Wa(t),s=Wa(e);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?Zf.has(t)&&!s.values.length||Zf.has(e)&&!r.values.length?tL(t,e):wl(fk(sL(r,s),s.values),n):(ad(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),hu(t,e))};function pk(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Ae(t,e,n):dg(t)(t,e)}const oL=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>ke.update(e,n),stop:()=>os(e),now:()=>it.isProcessing?it.timestamp:yt.now()}},mk=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i<s;i++)r+=Math.round(t(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},fu=2e4;function hg(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<fu;)e+=n,r=t.next(e);return e>=fu?1/0:e}function gk(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(hg(r),fu);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:Jt(s)}}const aL=5;function yk(t,e,n){const r=Math.max(e-aL,0);return q_(n-t(r),e-r)}const Pe={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},mh=.001;function lL({duration:t=Pe.duration,bounce:e=Pe.bounce,velocity:n=Pe.velocity,mass:r=Pe.mass}){let s,i;ad(t<=Sn(Pe.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=Hn(Pe.minDamping,Pe.maxDamping,o),t=Hn(Pe.minDuration,Pe.maxDuration,Jt(t)),o<1?(s=c=>{const u=c*o,d=u*t,f=u-n,p=Jf(c,o),v=Math.exp(-d);return mh-f/p*v},i=c=>{const d=c*o*t,f=d*n+n,p=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-d),w=Jf(Math.pow(c,2),o);return(-s(c)+mh>0?-1:1)*((f-p)*v)/w}):(s=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-mh+u*d},i=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=uL(s,i,a);if(t=Sn(t),isNaN(l))return{stiffness:Pe.stiffness,damping:Pe.damping,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:t}}}const cL=12;function uL(t,e,n){let r=n;for(let s=1;s<cL;s++)r=r-t(r)/e(r);return r}function Jf(t,e){return t*Math.sqrt(1-e*e)}const dL=["duration","bounce"],hL=["stiffness","damping","mass"];function l0(t,e){return e.some(n=>t[n]!==void 0)}function fL(t){let e={velocity:Pe.velocity,stiffness:Pe.stiffness,damping:Pe.damping,mass:Pe.mass,isResolvedFromDuration:!1,...t};if(!l0(t,hL)&&l0(t,dL))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Hn(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Pe.mass,stiffness:s,damping:i}}else{const n=lL(t);e={...e,...n,mass:Pe.mass},e.isResolvedFromDuration=!0}return e}function qa(t=Pe.visualDuration,e=Pe.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=fL({...n,velocity:-Jt(n.velocity||0)}),v=f||0,w=c/(2*Math.sqrt(l*u)),b=o-i,y=Jt(Math.sqrt(l/u)),m=Math.abs(b)<5;r||(r=m?Pe.restSpeed.granular:Pe.restSpeed.default),s||(s=m?Pe.restDelta.granular:Pe.restDelta.default);let g;if(w<1){const _=Jf(y,w);g=k=>{const E=Math.exp(-w*y*k);return o-E*((v+w*y*b)/_*Math.sin(_*k)+b*Math.cos(_*k))}}else if(w===1)g=_=>o-Math.exp(-y*_)*(b+(v+y*b)*_);else{const _=y*Math.sqrt(w*w-1);g=k=>{const E=Math.exp(-w*y*k),T=Math.min(_*k,300);return o-E*((v+w*y*b)*Math.sinh(T)+_*b*Math.cosh(T))/_}}const S={calculatedDuration:p&&d||null,next:_=>{const k=g(_);if(p)a.done=_>=d;else{let E=_===0?v:0;w<1&&(E=_===0?Sn(v):yk(g,_,k));const T=Math.abs(E)<=r,C=Math.abs(o-k)<=s;a.done=T&&C}return a.value=a.done?o:k,a},toString:()=>{const _=Math.min(hg(S),fu),k=mk(E=>S.next(_*E).value,_,30);return _+"ms "+k},toTransition:()=>{}};return S}qa.applyToOptions=t=>{const e=gk(t,100,qa);return t.ease=e.ease,t.duration=Sn(e.duration),t.type="keyframes",t};function Qf({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],f={done:!1,value:d},p=T=>a!==void 0&&T<a||l!==void 0&&T>l,v=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let w=n*e;const b=d+w,y=o===void 0?b:o(b);y!==b&&(w=y-d);const m=T=>-w*Math.exp(-T/r),g=T=>y+m(T),S=T=>{const C=m(T),N=g(T);f.done=Math.abs(C)<=c,f.value=f.done?y:N};let _,k;const E=T=>{p(f.value)&&(_=T,k=qa({keyframes:[f.value,v(f.value)],velocity:yk(g,T,f.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:T=>{let C=!1;return!k&&_===void 0&&(C=!0,S(T),E(T)),_!==void 0&&T>=_?k.next(T-_):(!C&&S(T),f)}}}function pL(t,e,n){const r=[],s=n||hr.mix||pk,i=t.length-1;for(let o=0;o<i;o++){let a=s(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Yt:e;a=wl(l,a)}r.push(a)}return r}function mL(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if(is(i===e.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=pL(e,r,s),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const f=fo(t[d],t[d+1],u);return a[d](f)};return n?u=>c(Hn(t[0],t[i-1],u)):c}function vk(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=fo(0,e,r);t.push(Ae(n,1,s))}}function wk(t){const e=[0];return vk(e,t.length-1),e}function gL(t,e){return t.map(n=>n*e)}function yL(t,e){return t.map(()=>e||tk).splice(0,t.length-1)}function pa({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=nk(r)?r.map(t0):t0(r),i={done:!1,value:e[0]},o=gL(n&&n.length===e.length?n:wk(e),t),a=mL(o,e,{ease:Array.isArray(s)?s:yL(e,s)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const vL=t=>t!==null;function fg(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(vL),a=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const wL={decay:Qf,inertia:Qf,tween:pa,keyframes:pa,spring:qa};function xk(t){typeof t.type=="string"&&(t.type=wL[t.type])}class pg{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const xL=t=>t/100;class mg extends pg{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==yt.now()&&this.tick(yt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;xk(e);const{type:n=pa,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const l=n||pa;l!==pa&&typeof a[0]!="number"&&(this.mixKeyframes=wl(xL,pk(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=hg(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:v,onUpdate:w,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),m=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let g=this.currentTime,S=r;if(d){const T=Math.min(this.currentTime,s)/a;let C=Math.floor(T),N=T%1;!N&&T>=1&&(N=1),N===1&&C--,C=Math.min(C,d+1),!!(C%2)&&(f==="reverse"?(N=1-N,p&&(N-=p/a)):f==="mirror"&&(S=o)),g=Hn(0,1,N)*a}const _=m?{done:!1,value:u[0]}:S.next(g);i&&(_.value=i(_.value));let{done:k}=_;!m&&l!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return E&&v!==Qf&&(_.value=fg(u,this.options,b,this.speed)),w&&w(_.value),E&&this.finish(),_}then(e,n){return this.finished.then(e,n)}get duration(){return Jt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Jt(e)}get time(){return Jt(this.currentTime)}set time(e){var n;e=Sn(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(yt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Jt(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:e=oL,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(yt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function bL(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ns=t=>t*180/Math.PI,Yf=t=>{const e=Ns(Math.atan2(t[1],t[0]));return Xf(e)},SL={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Yf,rotateZ:Yf,skewX:t=>Ns(Math.atan(t[1])),skewY:t=>Ns(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Xf=t=>(t=t%360,t<0&&(t+=360),t),c0=Yf,u0=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),d0=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),_L={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:u0,scaleY:d0,scale:t=>(u0(t)+d0(t))/2,rotateX:t=>Xf(Ns(Math.atan2(t[6],t[5]))),rotateY:t=>Xf(Ns(Math.atan2(-t[2],t[0]))),rotateZ:c0,rotate:c0,skewX:t=>Ns(Math.atan(t[4])),skewY:t=>Ns(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ep(t){return t.includes("scale")?1:0}function tp(t,e){if(!t||t==="none")return ep(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=_L,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=SL,s=a}if(!s)return ep(e);const i=r[e],o=s[1].split(",").map(EL);return typeof i=="function"?i(o):o[i]}const kL=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return tp(n,e)};function EL(t){return parseFloat(t.trim())}const Po=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ro=new Set(Po),h0=t=>t===Ao||t===z,TL=new Set(["x","y","z"]),CL=Po.filter(t=>!TL.has(t));function AL(t){const e=[];return CL.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Br={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>tp(e,"x"),y:(t,{transform:e})=>tp(e,"y")};Br.translateX=Br.x;Br.translateY=Br.y;const zs=new Set;let np=!1,rp=!1,sp=!1;function bk(){if(rp){const t=Array.from(zs).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=AL(r);s.length&&(n.set(r,s),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}rp=!1,np=!1,zs.forEach(t=>t.complete(sp)),zs.clear()}function Sk(){zs.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(rp=!0)})}function PL(){sp=!0,Sk(),bk(),sp=!1}class gg{constructor(e,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(zs.add(this),np||(np=!0,ke.read(Sk),ke.resolveKeyframes(bk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:s}=this;if(e[0]===null){const i=s==null?void 0:s.get(),o=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&i===void 0&&s.set(e[0])}bL(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),zs.delete(this)}cancel(){this.state==="scheduled"&&(zs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const RL=t=>t.startsWith("--");function jL(t,e,n){RL(e)?t.style.setProperty(e,n):t.style[e]=n}const NL=sg(()=>window.ScrollTimeline!==void 0),OL={};function IL(t,e){const n=sg(t);return()=>OL[e]??n()}const _k=IL(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Yo=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,f0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Yo([0,.65,.55,1]),circOut:Yo([.55,0,1,.45]),backIn:Yo([.31,.01,.66,-.59]),backOut:Yo([.33,1.53,.69,.99])};function kk(t,e){if(t)return typeof t=="function"?_k()?mk(t,e):"ease-out":sk(t)?Yo(t):Array.isArray(t)?t.map(n=>kk(n,e)||f0.easeOut):f0[t]}function LL(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const d=kk(a,s);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function yg(t){return typeof t=="function"&&"applyToOptions"in t}function DL({type:t,...e}){return yg(t)&&_k()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class ML extends pg{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,is(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=DL(e);this.animation=LL(n,r,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=fg(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):jL(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Jt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Jt(e)}get time(){return Jt(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Sn(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&NL()?(this.animation.timeline=e,Yt):n(this)}}const Ek={anticipate:Y_,backInOut:Q_,circInOut:ek};function $L(t){return t in Ek}function VL(t){typeof t.ease=="string"&&$L(t.ease)&&(t.ease=Ek[t.ease])}const gh=10;class FL extends ML{constructor(e){VL(e),xk(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new mg({...o,autoplay:!1}),l=Math.max(gh,yt.now()-this.startTime),c=Hn(0,gh,l-gh);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const p0=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(as.test(t)||t==="0")&&!t.startsWith("url("));function UL(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function BL(t,e,n,r){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],o=p0(s,e),a=p0(i,e);return ad(o===a,`You are trying to animate ${e} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:UL(t)||(n==="spring"||yg(n))&&r}function ip(t){t.duration=0,t.type="keyframes"}const zL=new Set(["opacity","clipPath","filter","transform"]),HL=sg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function WL(t){var u;const{motionValue:e,name:n,repeatDelay:r,repeatType:s,damping:i,type:o}=t;if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return HL()&&n&&zL.has(n)&&(n!=="transform"||!c)&&!l&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const qL=40;class KL extends pg{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:
214o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var v;super(),this.stop=()=>{var w,b;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=yt.now();const f={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:c,element:u,...d},p=(u==null?void 0:u.KeyframeResolver)||gg;this.keyframeResolver=new p(a,(w,b,y)=>this.onKeyframesResolved(w,b,f,!y),l,c,u),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,r,s){var b,y;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=yt.now(),BL(e,i,o,a)||((hr.instantAnimations||!l)&&(u==null||u(fg(e,r,n))),e[0]=e[e.length-1],ip(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>qL?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},p=!c&&WL(f),v=(y=(b=f.motionValue)==null?void 0:b.owner)==null?void 0:y.current,w=p?new FL({...f,element:v}):new mg(f);w.finished.then(()=>{this.notifyFinished()}).catch(Yt),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),PL()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}class GL{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e){const n=this.animations.map(r=>r.attachTimeline(e));return()=>{n.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return m0(this.animations,"duration")}get iterationDuration(){return m0(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function m0(t,e){let n=0;for(let r=0;r<t.length;r++){const s=t[r][e];s!==null&&s>n&&(n=s)}return n}class ZL extends GL{then(e,n){return this.finished.finally(e).then(()=>{})}}function Tk(t,e,n,r=0,s=1){const i=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const JL=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function QL(t){const e=JL.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}const YL=4;function Ck(t,e,n=1){is(n<=YL,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=QL(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const o=i.trim();return z_(o)?parseFloat(o):o}return lg(s)?Ck(s,e,n+1):s}const XL={type:"spring",stiffness:500,damping:25,restSpeed:10},eD=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),tD={type:"keyframes",duration:.8},nD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rD=(t,{keyframes:e})=>e.length>2?tD:Ro.has(t)?t.startsWith("scale")?eD(e[1]):XL:nD,sD=t=>t!==null;function iD(t,{repeat:e,repeatType:n="loop"},r){const s=t.filter(sD),i=e&&n!=="loop"&&e%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}function vg(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}function oD({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:
vendor: 23,744 bytes, line 214
214o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const wg=(t,e,n,r={},s,i)=>o=>{const a=vg(r,t)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Sn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:s};oD(a)||Object.assign(u,rD(t,u)),u.duration&&(u.duration=Sn(u.duration)),u.repeatDelay&&(u.repeatDelay=Sn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ip(u),u.delay===0&&(d=!0)),(hr.instantAnimations||hr.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,ip(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&e.get()!==void 0){const f=iD(u.keyframes,a);if(f!==void 0){ke.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new mg(u):new KL(u)};function g0(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function xg(t,e,n,r){if(typeof e=="function"){const[s,i]=g0(r);e=e(n!==void 0?n:t.custom,s,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,i]=g0(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function qi(t,e,n){const r=t.getProps();return xg(r,e,n!==void 0?n:r.custom,t)}const Ak=new Set(["width","height","top","left","right","bottom",...Po]),y0=30,aD=t=>!isNaN(parseFloat(t));class lD{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=yt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=yt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=aD(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ig);const r=this.events[e].add(n);return e==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=yt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>y0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,y0);return q_(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function po(t,e){return new lD(t,e)}const op=t=>Array.isArray(t);function cD(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,po(n))}function uD(t){return op(t)?t[t.length-1]||0:t}function dD(t,e){const n=qi(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=uD(i[o]);cD(t,o,a)}}const et=t=>!!(t&&t.getVelocity);function hD(t){return!!(et(t)&&t.add)}function ap(t,e){const n=t.getValue("willChange");if(hD(n))return n.add(e);if(!n&&hr.WillChange){const r=new hr.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function bg(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const fD="framerAppearId",Pk="data-"+bg(fD);function Rk(t){return t.props[Pk]}function pD({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Sg(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=e;const l=i==null?void 0:i.reduceMotion;r&&(i=r);const c=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const d in a){const f=t.getValue(d,t.latestValues[d]??null),p=a[d];if(p===void 0||u&&pD(u,d))continue;const v={delay:n,...vg(i||{},d)},w=f.get();if(w!==void 0&&!f.isAnimating&&!Array.isArray(p)&&p===w&&!v.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const g=Rk(t);if(g){const S=window.MotionHandoffAnimation(g,d,ke);S!==null&&(v.startTime=S,b=!0)}}ap(t,d);const y=l??t.shouldReduceMotion;f.start(wg(d,f,p,y&&Ak.has(d)?{type:!1}:v,t,b));const m=f.animation;m&&c.push(m)}return o&&Promise.all(c).then(()=>{ke.update(()=>{o&&dD(t,o)})}),c}function lp(t,e,n={}){var l;const r=qi(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(Sg(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return mD(t,e,c,u,d,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function mD(t,e,n=0,r=0,s=0,i=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(lp(l,e,{...o,delay:n+(typeof r=="function"?0:r)+Tk(t.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function gD(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>lp(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=lp(t,e,n);else{const s=typeof e=="function"?qi(t,e,n.custom):e;r=Promise.all(Sg(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const yD={test:t=>t==="auto",parse:t=>t},jk=t=>e=>e.test(t),Nk=[Ao,z,Fn,Tr,H2,z2,yD],v0=t=>Nk.find(jk(t));function vD(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||W_(t):!0}const wD=new Set(["brightness","contrast","saturate","opacity"]);function xD(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(cg)||[];if(!r)return t;const s=n.replace(r,"");let i=wD.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const bD=/\b([a-z-]*)\(.*?\)/gu,cp={...as,getAnimatableNone:t=>{const e=t.match(bD);return e?e.map(xD).join(" "):t}},w0={...Ao,transform:Math.round},SD={rotate:Tr,rotateX:Tr,rotateY:Tr,rotateZ:Tr,scale:Yl,scaleX:Yl,scaleY:Yl,scaleZ:Yl,skew:Tr,skewX:Tr,skewY:Tr,distance:z,translateX:z,translateY:z,translateZ:z,x:z,y:z,z,perspective:z,transformPerspective:z,opacity:Ha,originX:s0,originY:s0,originZ:z},_g={borderWidth:z,borderTopWidth:z,borderRightWidth:z,borderBottomWidth:z,borderLeftWidth:z,borderRadius:z,borderTopLeftRadius:z,borderTopRightRadius:z,borderBottomRightRadius:z,borderBottomLeftRadius:z,width:z,maxWidth:z,height:z,maxHeight:z,top:z,right:z,bottom:z,left:z,inset:z,insetBlock:z,insetBlockStart:z,insetBlockEnd:z,insetInline:z,insetInlineStart:z,insetInlineEnd:z,padding:z,paddingTop:z,paddingRight:z,paddingBottom:z,paddingLeft:z,paddingBlock:z,paddingBlockStart:z,paddingBlockEnd:z,paddingInline:z,paddingInlineStart:z,paddingInlineEnd:z,margin:z,marginTop:z,marginRight:z,marginBottom:z,marginLeft:z,marginBlock:z,marginBlockStart:z,marginBlockEnd:z,marginInline:z,marginInlineStart:z,marginInlineEnd:z,fontSize:z,backgroundPositionX:z,backgroundPositionY:z,...SD,zIndex:w0,fillOpacity:Ha,strokeOpacity:Ha,numOctaves:w0},_D={..._g,color:We,backgroundColor:We,outlineColor:We,fill:We,stroke:We,borderColor:We,borderTopColor:We,borderRightColor:We,borderBottomColor:We,borderLeftColor:We,filter:cp,WebkitFilter:cp},Ok=t=>_D[t];function Ik(t,e){let n=Ok(t);return n!==cp&&(n=as),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const kD=new Set(["auto","none","0"]);function ED(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!kD.has(i)&&Wa(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=Ik(n,s)}class TD extends gg{constructor(e,n,r,s,i){super(e,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let d=e[u];if(typeof d=="string"&&(d=d.trim(),lg(d))){const f=Ck(d,n.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ak.has(r)||e.length!==2)return;const[s,i]=e,o=v0(s),a=v0(i),l=r0(s),c=r0(i);if(l!==c&&Br[r]){this.needsMeasurement=!0;return}if(o!==a)if(h0(o)&&h0(a))for(let u=0;u<e.length;u++){const d=e[u];typeof d=="string"&&(e[u]=parseFloat(d))}else Br[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||vD(e[s]))&&r.push(s);r.length&&ED(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Br[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Br[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function kg(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let r=document;e&&(r=e.current);const s=(n==null?void 0:n[t])??r.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(r=>r!=null)}const Lk=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function up(t){return H_(t)&&"offsetHeight"in t}const{schedule:Eg,cancel:W3}=ik(queueMicrotask,!1),cn={x:!1,y:!1};function Dk(){return cn.x||cn.y}function CD(t){return t==="x"||t==="y"?cn[t]?null:(cn[t]=!0,()=>{cn[t]=!1}):cn.x||cn.y?null:(cn.x=cn.y=!0,()=>{cn.x=cn.y=!1})}function Mk(t,e){const n=kg(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function x0(t){return!(t.pointerType==="touch"||Dk())}function AD(t,e,n={}){const[r,s,i]=Mk(t,n),o=a=>{if(!x0(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{x0(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const $k=(t,e)=>e?t===e?!0:$k(t,e.parentElement):!1,Tg=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,PD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Vk(t){return PD.has(t.tagName)||t.isContentEditable===!0}const Pc=new WeakSet;function b0(t){return e=>{e.key==="Enter"&&t(e)}}function yh(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const RD=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=b0(()=>{if(Pc.has(n))return;yh(n,"down");const s=b0(()=>{yh(n,"up")}),i=()=>yh(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",i,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function S0(t){return Tg(t)&&!Dk()}function jD(t,e,n={}){const[r,s,i]=Mk(t,n),o=a=>{const l=a.currentTarget;if(!S0(a))return;Pc.add(l);const c=e(l,a),u=(p,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Pc.has(l)&&Pc.delete(l),S0(p)&&typeof c=="function"&&c(p,{success:v})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||$k(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),up(a)&&(a.addEventListener("focus",c=>RD(c,s)),!Vk(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Cg(t){return H_(t)&&"ownerSVGElement"in t}function Fk(t){return Cg(t)&&t.tagName==="svg"}const ND=[...Nk,We,as],OD=t=>ND.find(jk(t)),_0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ni=()=>({x:_0(),y:_0()}),k0=()=>({min:0,max:0}),ze=()=>({x:k0(),y:k0()}),dp={current:null},Uk={current:!1},ID=typeof window<"u";function LD(){if(Uk.current=!0,!!ID)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>dp.current=t.matches;t.addEventListener("change",e),e()}else dp.current=!1}const Ka=new WeakMap;function ld(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ga(t){return typeof t=="string"||Array.isArray(t)}const Ag=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Pg=["initial",...Ag];function cd(t){return ld(t.animate)||Pg.some(e=>Ga(t[e]))}function Bk(t){return!!(cd(t)||t.variants)}function DD(t,e,n){for(const r in e){const s=e[r],i=n[r];if(et(s))t.addValue(r,s);else if(et(i))t.addValue(r,po(s,{owner:t}));else if(i!==s)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(r);t.addValue(r,po(o!==void 0?o:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const E0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let pu={};function zk(t){pu=t}function MD(){return pu}class Hk{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=gg,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 p=yt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ke.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=cd(n),this.isVariantNode=Bk(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const v=f[p];c[p]!==void 0&&et(v)&&v.set(c[p])}}mount(e){var n;this.current=e,Ka.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,s)=>this.bindToMotionValue(s,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Uk.current||LD(),this.shouldReduceMotion=dp.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),os(this.notifyUpdate),os(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Ro.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in pu){const n=pu[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];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):ze()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<E0.length;r++){const s=E0[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=e[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=DD(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=po(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(z_(r)||W_(r))?r=parseFloat(r):!OD(r)&&as.test(n)&&(r=Ik(e,n)),this.setBaseTarget(e,et(r)?r.get():r)),et(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=xg(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[e])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!et(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ig),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Eg.render(this.render)}}class Wk extends Hk{constructor(){super(...arguments),this.KeyframeResolver=TD}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const r=e.style;return r?r[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;et(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ms{constructor(e){this.isMounted=!1,this.node=e}update(){}}function qk({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function $D({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function VD(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function vh(t){return t===void 0||t===1}function hp({scale:t,scaleX:e,scaleY:n}){return!vh(t)||!vh(e)||!vh(n)}function Es(t){return hp(t)||Kk(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Kk(t){return T0(t.x)||T0(t.y)}function T0(t){return t&&t!=="0%"}function mu(t,e,n){const r=t-n,s=e*r;return n+s}function C0(t,e,n,r,s){return s!==void 0&&(t=mu(t,s,r)),mu(t,n,r)+e}function fp(t,e=0,n=1,r,s){t.min=C0(t.min,e,n,r,s),t.max=C0(t.max,e,n,r,s)}function Gk(t,{x:e,y:n}){fp(t.x,e.translate,e.scale,e.originPoint),fp(t.y,n.translate,n.scale,n.originPoint)}const A0=.999999999999,P0=1.0000000000001;function FD(t,e,n,r=!1){const s=n.length;if(!s)return;e.x=e.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&&Ii(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Gk(t,o)),r&&Es(i.latestValues)&&Ii(t,i.latestValues))}e.x<P0&&e.x>A0&&(e.x=1),e.y<P0&&e.y>A0&&(e.y=1)}function Oi(t,e){t.min=t.min+e,t.max=t.max+e}function R0(t,e,n,r,s=.5){const i=Ae(t.min,t.max,s);fp(t,e,n,i,r)}function Ii(t,e){R0(t.x,e.x,e.scaleX,e.scale,e.originX),R0(t.y,e.y,e.scaleY,e.scale,e.originY)}function Zk(t,e){return qk(VD(t.getBoundingClientRect(),e))}function UD(t,e,n){const r=Zk(t,n),{scroll:s}=e;return s&&(Oi(r.x,s.offset.x),Oi(r.y,s.offset.y)),r}const BD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zD=Po.length;function HD(t,e,n){let r="",s=!0;for(let i=0;i<zD;i++){const o=Po[i],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const c=parseFloat(a);l=o.startsWith("scale")?c===1:c===0}if(!l||n){const c=Lk(a,_g[o]);if(!l){s=!1;const u=BD[o]||o;r+=`${u}(${c}) `}n&&(e[o]=c)}}return r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function Rg(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let o=!1,a=!1;for(const l in e){const c=e[l];
vendor: 4,582 bytes, line 214
214if(Ro.has(l)){o=!0;continue}else if(ak(l)){s[l]=c;continue}else{const u=Lk(c,_g[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(e.transform||(o||n?r.transform=HD(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function Jk(t,{style:e,vars:n},r,s){const i=t.style;let o;for(o in e)i[o]=e[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function j0(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const qo={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(z.test(t))t=parseFloat(t);else return t;const n=j0(t,e.target.x),r=j0(t,e.target.y);return`${n}% ${r}%`}},WD={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=as.parse(t);if(s.length>5)return r;const i=as.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const c=Ae(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}},pp={borderRadius:{...qo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qo,borderTopRightRadius:qo,borderBottomLeftRadius:qo,borderBottomRightRadius:qo,boxShadow:WD};function Qk(t,{layout:e,layoutId:n}){return Ro.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!pp[t]||t==="opacity")}function jg(t,e,n){var o;const r=t.style,s=e==null?void 0:e.style,i={};if(!r)return i;for(const a in r)(et(r[a])||s&&et(s[a])||Qk(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function qD(t){return window.getComputedStyle(t)}class Yk extends Wk{constructor(){super(...arguments),this.type="html",this.renderInstance=Jk}readValueFromInstance(e,n){var r;if(Ro.has(n))return(r=this.projection)!=null&&r.isProjecting?ep(n):kL(e,n);{const s=qD(e),i=(ak(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Zk(e,n)}build(e,n,r){Rg(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return jg(e,n,r)}}function KD(t,e){return t in e}class GD extends Hk{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(KD(n,e)){const r=e[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return ze()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}const ZD={offset:"stroke-dashoffset",array:"stroke-dasharray"},JD={offset:"strokeDashoffset",array:"strokeDasharray"};function QD(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?ZD:JD;t[i.offset]=`${-r}`,t[i.array]=`${e} ${n}`}const YD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Xk(t,{attrX:e,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,c,u){if(Rg(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox);for(const p of YD)d[p]!==void 0&&(f[p]=d[p],delete d[p]);e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&QD(d,s,i,o,!1)}const eE=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"]),tE=t=>typeof t=="string"&&t.toLowerCase()==="svg";function XD(t,e,n,r){Jk(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(eE.has(s)?s:bg(s),e.attrs[s])}function nE(t,e,n){const r=jg(t,e,n);for(const s in t)if(et(t[s])||et(e[s])){const i=Po.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}class rE extends Wk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ze}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ro.has(n)){const r=Ok(n);return r&&r.default||0}return n=eE.has(n)?n:bg(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return nE(e,n,r)}build(e,n,r){Xk(e,n,this.isSVGTag,r.transformTemplate,r.style)}
vendor: 20,201 bytes, line 214
214renderInstance(e,n,r,s){XD(e,n,r,s)}mount(e){this.isSVGTag=tE(e.tagName),super.mount(e)}}const eM=Pg.length;function sE(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?sE(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<eM;n++){const r=Pg[n],s=t.props[r];(Ga(s)||s===!1)&&(e[r]=s)}return e}function iE(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const tM=[...Ag].reverse(),nM=Ag.length;function rM(t){return e=>Promise.all(e.map(({animation:n,options:r})=>gD(t,n,r)))}function sM(t){let e=rM(t),n=N0(),r=!0;const s=l=>(c,u)=>{var f;const d=qi(t,u,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:p,transitionEnd:v,...w}=d;c={...c,...w,...v}}return c};function i(l){e=l(t)}function o(l){const{props:c}=t,u=sE(t.parent)||{},d=[],f=new Set;let p={},v=1/0;for(let b=0;b<nM;b++){const y=tM[b],m=n[y],g=c[y]!==void 0?c[y]:u[y],S=Ga(g),_=y===l?m.isActive:null;_===!1&&(v=b);let k=g===u[y]&&g!==c[y]&&S;if(k&&r&&t.manuallyAnimateOnMount&&(k=!1),m.protectedKeys={...p},!m.isActive&&_===null||!g&&!m.prevProp||ld(g)||typeof g=="boolean")continue;const E=iM(m.prevProp,g);let T=E||y===l&&m.isActive&&!k&&S||b>v&&S,C=!1;const N=Array.isArray(g)?g:[g];let V=N.reduce(s(y),{});_===!1&&(V={});const{prevResolvedValues:L={}}=m,K={...L,...V},D=F=>{T=!0,f.has(F)&&(C=!0,f.delete(F)),m.needsAnimating[F]=!0;const A=t.getValue(F);A&&(A.liveStyle=!1)};for(const F in K){const A=V[F],j=L[F];if(p.hasOwnProperty(F))continue;let M=!1;op(A)&&op(j)?M=!iE(A,j):M=A!==j,M?A!=null?D(F):f.add(F):A!==void 0&&f.has(F)?D(F):m.protectedKeys[F]=!0}m.prevProp=g,m.prevResolvedValues=V,m.isActive&&(p={...p,...V}),r&&t.blockInitialAnimation&&(T=!1);const re=k&&E;T&&(!re||C)&&d.push(...N.map(F=>{const A={type:y};if(typeof F=="string"&&r&&!re&&t.manuallyAnimateOnMount&&t.parent){const{parent:j}=t,M=qi(j,F);if(j.enteringChildren&&M){const{delayChildren:Q}=M.transition||{};A.delay=Tk(j.enteringChildren,t,Q)}}return{animation:F,options:A}}))}if(f.size){const b={};if(typeof c.initial!="boolean"){const y=qi(t,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(b.transition=y.transition)}f.forEach(y=>{const m=t.getBaseTarget(y),g=t.getValue(y);g&&(g.liveStyle=!0),b[y]=m??null}),d.push({animation:b})}let w=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(w=!1),r=!1,w?e(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(l,c)}),n[l].isActive=c;const u=o(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=N0()}}}function iM(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!iE(e,t):!1}function xs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function N0(){return{animate:xs(!0),whileInView:xs(),whileHover:xs(),whileTap:xs(),whileDrag:xs(),whileFocus:xs(),exit:xs()}}function O0(t,e){t.min=e.min,t.max=e.max}function ln(t,e){O0(t.x,e.x),O0(t.y,e.y)}function I0(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const oE=1e-4,oM=1-oE,aM=1+oE,aE=.01,lM=0-aE,cM=0+aE;function vt(t){return t.max-t.min}function uM(t,e,n){return Math.abs(t-e)<=n}function L0(t,e,n,r=.5){t.origin=r,t.originPoint=Ae(e.min,e.max,t.origin),t.scale=vt(n)/vt(e),t.translate=Ae(n.min,n.max,t.origin)-t.originPoint,(t.scale>=oM&&t.scale<=aM||isNaN(t.scale))&&(t.scale=1),(t.translate>=lM&&t.translate<=cM||isNaN(t.translate))&&(t.translate=0)}function ma(t,e,n,r){L0(t.x,e.x,n.x,r?r.originX:void 0),L0(t.y,e.y,n.y,r?r.originY:void 0)}function D0(t,e,n){t.min=n.min+e.min,t.max=t.min+vt(e)}function dM(t,e,n){D0(t.x,e.x,n.x),D0(t.y,e.y,n.y)}function M0(t,e,n){t.min=e.min-n.min,t.max=t.min+vt(e)}function gu(t,e,n){M0(t.x,e.x,n.x),M0(t.y,e.y,n.y)}function $0(t,e,n,r,s){return t-=e,t=mu(t,1/n,r),s!==void 0&&(t=mu(t,1/s,r)),t}function hM(t,e=0,n=1,r=.5,s,i=t,o=t){if(Fn.test(e)&&(e=parseFloat(e),e=Ae(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Ae(i.min,i.max,r);t===i&&(a-=e),t.min=$0(t.min,e,n,a,s),t.max=$0(t.max,e,n,a,s)}function V0(t,e,[n,r,s],i,o){hM(t,e[n],e[r],e[s],e.scale,i,o)}const fM=["x","scaleX","originX"],pM=["y","scaleY","originY"];function F0(t,e,n,r){V0(t.x,e,fM,n?n.x:void 0,r?r.x:void 0),V0(t.y,e,pM,n?n.y:void 0,r?r.y:void 0)}function U0(t){return t.translate===0&&t.scale===1}function lE(t){return U0(t.x)&&U0(t.y)}function B0(t,e){return t.min===e.min&&t.max===e.max}function mM(t,e){return B0(t.x,e.x)&&B0(t.y,e.y)}function z0(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function cE(t,e){return z0(t.x,e.x)&&z0(t.y,e.y)}function H0(t){return vt(t.x)/vt(t.y)}function W0(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Ht(t){return[t("x"),t("y")]}function gM(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const uE=["TopLeft","TopRight","BottomLeft","BottomRight"],yM=uE.length,q0=t=>typeof t=="string"?parseFloat(t):t,K0=t=>typeof t=="number"||z.test(t);function vM(t,e,n,r,s,i){s?(t.opacity=Ae(0,n.opacity??1,wM(r)),t.opacityExit=Ae(e.opacity??1,0,xM(r))):i&&(t.opacity=Ae(e.opacity??1,n.opacity??1,r));for(let o=0;o<yM;o++){const a=`border${uE[o]}Radius`;let l=G0(e,a),c=G0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||K0(l)===K0(c)?(t[a]=Math.max(Ae(q0(l),q0(c),r),0),(Fn.test(c)||Fn.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=Ae(e.rotate||0,n.rotate||0,r))}function G0(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const wM=dE(0,.5,X_),xM=dE(.5,.95,Yt);function dE(t,e,n){return r=>r<t?0:r>e?1:n(fo(t,e,r))}function hE(t,e,n){const r=et(t)?t:po(t);return r.start(wg("",r,e,n)),r.animation}function Za(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const bM=(t,e)=>t.depth-e.depth;class SM{constructor(){this.children=[],this.isDirty=!1}add(e){rg(this.children,e),this.isDirty=!0}remove(e){vl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(bM),this.isDirty=!1,this.children.forEach(e)}}function _M(t,e){const n=yt.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(os(r),t(i-e))};return ke.setup(r,!0),()=>os(r)}function Rc(t){return et(t)?t.get():t}class kM{constructor(){this.members=[]}add(e){rg(this.members,e),e.scheduleRender()}remove(e){if(vl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===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(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender();const s=r.options.layoutDependency,i=e.options.layoutDependency;s!==void 0&&i!==void 0&&s===i||(e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0));const{crossfade:a}=e.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const jc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},wh=["","X","Y","Z"],EM=1e3;let TM=0;function xh(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function fE(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Rk(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&fE(r)}function pE({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=TM++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(PM),this.nodes.forEach(OM),this.nodes.forEach(IM),this.nodes.forEach(RM)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 SM)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ig),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Cg(o)&&!Fk(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{d=window.innerWidth}),t(o,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=_M(f,250),jc.hasAnimatedSinceResize&&(jc.hasAnimatedSinceResize=!1,this.nodes.forEach(Q0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||VM,{onLayoutAnimationStart:w,onLayoutAnimationComplete:b}=c.getProps(),y=!this.targetLayout||!cE(this.targetLayout,p),m=!d&&f;if(this.options.layoutRoot||this.resumeFrom||m||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const g={...vg(v,"layout"),onPlay:w,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(g.delay=0,g.type=!1),this.startAnimation(g),this.setAnimationOrigin(u,m)}else d||Q0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),os(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(LM),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&&fE(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Z0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(J0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(NM),this.nodes.forEach(CM),this.nodes.forEach(AM)):this.nodes.forEach(J0),this.clearAllSnapshots();const a=yt.now();it.delta=Hn(0,1e3/60,a-it.timestamp),it.timestamp=a,it.isProcessing=!0,dh.update.process(it),dh.preRender.process(it),dh.render.process(it),it.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Eg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jM),this.sharedNodes.forEach(DM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!vt(this.snapshot.measuredBox.x)&&!vt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=ze(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!lE(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||Es(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),FM(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return ze();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(UM))){const{scroll:u}=this.root;u&&(Oi(a.x,u.offset.x),Oi(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=ze();if(ln(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ln(a,o),Oi(a.x,d.offset.x),Oi(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=ze();ln(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ii(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Es(u.latestValues)&&Ii(l,u.latestValues)}return Es(this.latestValues)&&Ii(l,this.latestValues),l}removeTransform(o){const a=ze();ln(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Es(c.latestValues))continue;hp(c.latestValues)&&c.updateSnapshot();const u=ze(),d=c.measurePageBox();ln(u,d),F0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Es(this.latestValues)&&F0(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!==it.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=it.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ze(),this.targetWithTransforms=ze()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ln(this.target,this.layout.layoutBox),Gk(this.target,this.targetDelta)):ln(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||hp(this.parent.latestValues)||Kk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ze(),this.relativeTargetOrigin=ze(),gu(this.relativeTargetOrigin,a,l),ln(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&
vendor: 5,271 bytes, line 214
214(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===it.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;ln(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;FD(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=ze());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(I0(this.prevProjectionDelta.x,this.projectionDelta.x),I0(this.prevProjectionDelta.y,this.projectionDelta.y)),ma(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!W0(this.projectionDelta.x,this.prevProjectionDelta.x)||!W0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ni(),this.projectionDelta=Ni(),this.projectionDeltaWithTransform=Ni()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ni();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=ze(),p=l?l.source:void 0,v=this.layout?this.layout.source:void 0,w=p!==v,b=this.getStack(),y=!b||b.members.length<=1,m=!!(w&&!y&&this.options.crossfade===!0&&!this.path.some($M));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const _=S/1e3;Y0(d.x,o.x,_),Y0(d.y,o.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gu(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MM(this.relativeTarget,this.relativeTargetOrigin,f,_),g&&mM(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=ze()),ln(g,this.relativeTarget)),w&&(this.animationValues=u,vM(u,c,this.latestValues,_,m,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(os(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{jc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=po(0)),this.currentAnimation=hE(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(EM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&mE(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ze();const d=vt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=vt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}ln(a,l),Ii(a,u),ma(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new kM),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}
vendor: 35,220 bytes, lines 214-222
214resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&xh("z",o,c,this.animationValues);for(let u=0;u<wh.length;u++)xh(`rotate${wh[u]}`,o,c,this.animationValues),xh(`skew${wh[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Rc(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Rc(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Es(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=gM(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in pp){if(u[v]===void 0)continue;const{correct:w,applyTo:b,isCSSVariable:y}=pp[v],m=d==="none"?u[v]:w(u[v],c);if(b){const g=b.length;for(let S=0;S<g;S++)o[b[S]]=m}else y?this.options.visualElement.renderState.vars[v]=m:o[v]=m}this.options.layoutId&&(o.pointerEvents=c===this?Rc(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Z0),this.root.sharedNodes.clear()}}}function CM(t){t.updateLayout()}function AM(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?Ht(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],p=vt(f);f.min=r[d].min,f.max=f.min+p}):mE(i,e.layoutBox,r)&&Ht(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],p=vt(r[d]);f.max=f.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+p)});const a=Ni();ma(a,r,e.layoutBox);const l=Ni();o?ma(l,t.applyTransform(s,!0),e.measuredBox):ma(l,r,e.layoutBox);const c=!lE(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const v=ze();gu(v,e.layoutBox,f.layoutBox);const w=ze();gu(w,r,p.layoutBox),cE(v,w)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=v,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function PM(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function RM(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function jM(t){t.clearSnapshot()}function Z0(t){t.clearMeasurements()}function J0(t){t.isLayoutDirty=!1}function NM(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Q0(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function OM(t){t.resolveTargetDelta()}function IM(t){t.calcProjection()}function LM(t){t.resetSkewAndRotation()}function DM(t){t.removeLeadSnapshot()}function Y0(t,e,n){t.translate=Ae(e.translate,0,n),t.scale=Ae(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function X0(t,e,n,r){t.min=Ae(e.min,n.min,r),t.max=Ae(e.max,n.max,r)}function MM(t,e,n,r){X0(t.x,e.x,n.x,r),X0(t.y,e.y,n.y,r)}function $M(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const VM={duration:.45,ease:[.4,0,.1,1]},ew=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),tw=ew("applewebkit/")&&!ew("chrome/")?Math.round:Yt;function nw(t){t.min=tw(t.min),t.max=tw(t.max)}function FM(t){nw(t.x),nw(t.y)}function mE(t,e,n){return t==="position"||t==="preserve-aspect"&&!uM(H0(e),H0(n),.2)}function UM(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const BM=pE({attachResizeListener:(t,e)=>Za(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),bh={current:void 0},gE=pE({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!bh.current){const t=new BM({});t.mount(window),t.setOptions({layoutScroll:!0}),bh.current=t}return bh.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Ng=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function rw(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function zM(...t){return e=>{let n=!1;const r=t.map(s=>{const i=rw(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():rw(t[s],null)}}}}function HM(...t){return x.useCallback(zM(...t),t)}class WM extends x.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=up(r)&&r.offsetWidth||0,i=up(r)&&r.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left,o.bottom=i-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function qM({children:t,isPresent:e,anchorX:n,anchorY:r,root:s}){var d;const i=x.useId(),o=x.useRef(null),a=x.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=x.useContext(Ng),c=((d=t.props)==null?void 0:d.ref)??(t==null?void 0:t.ref),u=HM(o,c);return x.useInsertionEffect(()=>{const{width:f,height:p,top:v,left:w,right:b,bottom:y}=a.current;if(e||!o.current||!f||!p)return;const m=n==="left"?`left: ${w}`:`right: ${b}`,g=r==="bottom"?`bottom: ${y}`:`top: ${v}`;o.current.dataset.motionPopId=i;const S=document.createElement("style");l&&(S.nonce=l);const _=s??document.head;return _.appendChild(S),S.sheet&&S.sheet.insertRule(`
215          [data-motion-pop-id="${i}"] {
216            position: absolute !important;
217            width: ${f}px !important;
218            height: ${p}px !important;
219            ${m}px !important;
220            ${g}px !important;
221          }
222        `),()=>{_.contains(S)&&_.removeChild(S)}},[e]),h.jsx(WM,{isPresent:e,childRef:o,sizeRef:a,children:x.cloneElement(t,{ref:u})})}const KM=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:a,anchorY:l,root:c})=>{const u=ng(GM),d=x.useId();let f=!0,p=x.useMemo(()=>(f=!1,{id:d,initial:e,isPresent:n,custom:s,onExitComplete:v=>{u.set(v,!0);for(const w of u.values())if(!w)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return i&&f&&(p={...p}),x.useMemo(()=>{u.forEach((v,w)=>u.set(w,!1))},[n]),x.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),o==="popLayout"&&(t=h.jsx(qM,{isPresent:n,anchorX:a,anchorY:l,root:c,children:t})),h.jsx(od.Provider,{value:p,children:t})};function GM(){return new Map}function yE(t=!0){const e=x.useContext(od);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=e,i=x.useId();x.useEffect(()=>{if(t)return s(i)},[t]);const o=x.useCallback(()=>t&&r&&r(i),[i,r,t]);return!n&&r?[!1,o]:[!0]}const Xl=t=>t.key||"";function sw(t){const e=[];return x.Children.forEach(t,n=>{x.isValidElement(n)&&e.push(n)}),e}const sr=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=yE(o),f=x.useMemo(()=>sw(t),[t]),p=o&&!u?[]:f.map(Xl),v=x.useRef(!0),w=x.useRef(f),b=ng(()=>new Map),y=x.useRef(new Set),[m,g]=x.useState(f),[S,_]=x.useState(f);B_(()=>{v.current=!1,w.current=f;for(let T=0;T<S.length;T++){const C=Xl(S[T]);p.includes(C)?(b.delete(C),y.current.delete(C)):b.get(C)!==!0&&b.set(C,!1)}},[S,p.length,p.join("-")]);const k=[];if(f!==m){let T=[...f];for(let C=0;C<S.length;C++){const N=S[C],V=Xl(N);p.includes(V)||(T.splice(C,0,N),k.push(N))}return i==="wait"&&k.length&&(T=k),_(sw(T)),g(f),null}const{forceRender:E}=x.useContext(tg);return h.jsx(h.Fragment,{children:S.map(T=>{const C=Xl(T),N=o&&!u?!1:f===S||p.includes(C),V=()=>{if(y.current.has(C))return;if(y.current.add(C),b.has(C))b.set(C,!0);else return;let L=!0;b.forEach(K=>{K||(L=!1)}),L&&(E==null||E(),_(w.current),o&&(d==null||d()),r&&r())};return h.jsx(KM,{isPresent:N,initial:!v.current||n?void 0:!1,custom:e,presenceAffectsLayout:s,mode:i,root:c,onExitComplete:N?void 0:V,anchorX:a,anchorY:l,children:T},C)})})},vE=x.createContext({strict:!1}),iw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ow=!1;function ZM(){if(ow)return;const t={};for(const e in iw)t[e]={isEnabled:n=>iw[e].some(r=>!!n[r])};zk(t),ow=!0}function wE(){return ZM(),MD()}function JM(t){const e=wE();for(const n in t)e[n]={...e[n],...t[n]};zk(e)}const QM=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 yu(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||QM.has(t)}let xE=t=>!yu(t);function YM(t){typeof t=="function"&&(xE=e=>e.startsWith("on")?!yu(e):t(e))}try{YM(require("@emotion/is-prop-valid").default)}catch{}function XM(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||(xE(s)||n===!0&&yu(s)||!e&&!yu(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}const ud=x.createContext({});function e$(t,e){if(cd(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Ga(n)?n:void 0,animate:Ga(r)?r:void 0}}return t.inherit!==!1?e:{}}function t$(t){const{initial:e,animate:n}=e$(t,x.useContext(ud));return x.useMemo(()=>({initial:e,animate:n}),[aw(e),aw(n)])}function aw(t){return Array.isArray(t)?t.join(" "):t}const Og=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bE(t,e,n){for(const r in e)!et(e[r])&&!Qk(r,n)&&(t[r]=e[r])}function n$({transformTemplate:t},e){return x.useMemo(()=>{const n=Og();return Rg(n,e,t),Object.assign({},n.vars,n.style)},[e])}function r$(t,e){const n=t.style||{},r={};return bE(r,n,t),Object.assign(r,n$(t,e)),r}function s$(t,e){const n={},r=r$(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const SE=()=>({...Og(),attrs:{}});function i$(t,e,n,r){const s=x.useMemo(()=>{const i=SE();return Xk(i,e,tE(r),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};bE(i,t.style,t),s.style={...i,...s.style}}return s}const o$=["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 Ig(t){return typeof t!="string"||t.includes("-")?!1:!!(o$.indexOf(t)>-1||/[A-Z]/u.test(t))}function a$(t,e,n,{latestValues:r},s,i=!1,o){const l=(o??Ig(t)?i$:s$)(e,r,s,t),c=XM(e,typeof t=="string",i),u=t!==x.Fragment?{...c,...l,ref:n}:{},{children:d}=e,f=x.useMemo(()=>et(d)?d.get():d,[d]);return x.createElement(t,{...u,children:f})}function l$({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,s){return{latestValues:c$(n,r,s,t),renderState:e()}}function c$(t,e,n,r){const s={},i=r(t,{});for(const f in i)s[f]=Rc(i[f]);let{initial:o,animate:a}=t;const l=cd(t),c=Bk(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!ld(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const v=xg(t,f[p]);if(v){const{transitionEnd:w,transition:b,...y}=v;for(const m in y){let g=y[m];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(s[m]=g)}for(const m in w)s[m]=w[m]}}}return s}const _E=t=>(e,n)=>{const r=x.useContext(ud),s=x.useContext(od),i=()=>l$(t,e,r,s);return n?i():ng(i)},u$=_E({scrapeMotionValuesFromProps:jg,createRenderState:Og}),d$=_E({scrapeMotionValuesFromProps:nE,createRenderState:SE}),h$=Symbol.for("motionComponentSymbol");function f$(t,e,n){const r=x.useRef(n);x.useInsertionEffect(()=>{r.current=n});const s=x.useRef(null);return x.useCallback(i=>{var a;i&&((a=t.onMount)==null||a.call(t,i)),e&&(i?e.mount(i):e.unmount());const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[e])}const kE=x.createContext({});function Xo(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function p$(t,e,n,r,s,i){var g,S;const{visualElement:o}=x.useContext(ud),a=x.useContext(vE),l=x.useContext(od),c=x.useContext(Ng),u=c.reducedMotion,d=c.skipAnimations,f=x.useRef(null),p=x.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const v=f.current,w=x.useContext(kE);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&m$(f.current,n,s,w);const b=x.useRef(!1);x.useInsertionEffect(()=>{v&&b.current&&v.update(n,l)});const y=n[Pk],m=x.useRef(!!y&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,y))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,y)));return B_(()=>{p.current=!0,v&&(b.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),m.current&&v.animationState&&v.animationState.animateChanges())}),x.useEffect(()=>{v&&(!m.current&&v.animationState&&v.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,y)}),m.current=!1),v.enteringChildren=void 0)}),v}function m$(t,e,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:EE(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Xo(a),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function EE(t){if(t)return t.options.allowProjection!==!1?t.projection:EE(t.parent)}function Sh(t,{forwardMotionProps:e=!1,type:n}={},r,s){r&&JM(r);const i=n?n==="svg":Ig(t),o=i?d$:u$;function a(c,u){let d;const f={...x.useContext(Ng),...c,layoutId:g$(c)},{isStatic:p}=f,v=t$(c),w=o(c,p);if(!p&&U_){y$();const b=v$(f);d=b.MeasureLayout,v.visualElement=p$(t,w,f,s,b.ProjectionNode,i)}return h.jsxs(ud.Provider,{value:v,children:[d&&v.visualElement?h.jsx(d,{visualElement:v.visualElement,...f}):null,a$(t,c,f$(w,v.visualElement,u),w,p,e,i)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=x.forwardRef(a);return l[h$]=t,l}function g$({layoutId:t}){const e=x.useContext(tg).id;return e&&t!==void 0?e+"-"+t:t}function y$(t,e){x.useContext(vE).strict}function v$(t){const e=wE(),{drag:n,layout:r}=e;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(t)||r!=null&&r.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function w$(t,e){if(typeof Proxy>"u")return Sh;const n=new Map,r=(i,o)=>Sh(i,o,t,e),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,Sh(o,void 0,t,e)),n.get(o))})}const x$=(t,e)=>e.isSVG??Ig(t)?new rE(e):new Yk(e,{allowProjection:t!==x.Fragment});class b$ extends ms{constructor(e){super(e),e.animationState||(e.animationState=sM(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ld(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let S$=0;class _$ extends ms{constructor(){super(...arguments),this.id=S$++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const k$={animation:{Feature:b$},exit:{Feature:_$}};function Sl(t){return{point:{x:t.pageX,y:t.pageY}}}const E$=t=>e=>Tg(e)&&t(e,Sl(e));function ga(t,e,n,r){return Za(t,e,E$(n),r)}const TE=({current:t})=>t?t.ownerDocument.defaultView:null,lw=(t,e)=>Math.abs(t-e);function T$(t,e){const n=lw(t.x,e.x),r=lw(t.y,e.y);return Math.sqrt(n**2+r**2)}const cw=new Set(["auto","scroll"]);class CE{constructor(e,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=kh(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,w=T$(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!w)return;const{point:b}=p,{timestamp:y}=it;this.history.push({...b,timestamp:y});const{onStart:m,onMove:g}=this.handlers;v||(m&&m(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=_h(v,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:w,onSessionEnd:b,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=kh(p.type==="pointercancel"?this.lastMoveEventInfo:_h(v,this.transformPagePoint),this.history);this.startEvent&&w&&w(p,m),b&&b(p,m)},!Tg(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=Sl(e),c=_h(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=it;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(e,kh(c,this.history)),this.removeListeners=wl(ga(this.contextWindow,"pointermove",this.handlePointerMove),ga(this.contextWindow,"pointerup",this.handlePointerUp),ga(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(cw.has(r.overflowX)||cw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,s),ke.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),os(this.updatePoint)}}function _h(t,e){return e?{point:e(t.point)}:t}function uw(t,e){return{x:t.x-e.x,y:t.y-e.y}}function kh({point:t},e){return{point:t,delta:uw(t,AE(e)),offset:uw(t,C$(e)),velocity:A$(e,.1)}}function C$(t){return t[0]}function AE(t){return t[t.length-1]}function A$(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=AE(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>Sn(e)));)n--;if(!r)return{x:0,y:0};const i=Jt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function P$(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Ae(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Ae(n,t,r.max):Math.min(t,n)),t}function dw(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function R$(t,{top:e,left:n,bottom:r,right:s}){return{x:dw(t.x,n,s),y:dw(t.y,e,r)}}function hw(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function j$(t,e){return{x:hw(t.x,e.x),y:hw(t.y,e.y)}}function N$(t,e){let n=.5;const r=vt(t),s=vt(e);return s>r?n=fo(e.min,e.max-r,t.min):r>s&&(n=fo(t.min,t.max-s,e.min)),Hn(0,1,n)}function O$(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const mp=.35;function I$(t=mp){return t===!1?t=0:t===!0&&(t=mp),{x:fw(t,"left","right"),y:fw(t,"top","bottom")}}function fw(t,e,n){return{min:pw(t,e),max:pw(t,n)}}function pw(t,e){return typeof t=="number"?t:t[e]||0}const L$=new WeakMap;class D${constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ze(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(Sl(d).point)):this.pauseAnimation()},o=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:v,onDragStart:w}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=CD(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ht(y=>{let m=this.getAxisMotionValue(y).get()||0;if(Fn.test(m)){const{projection:g}=this.visualElement;if(g&&g.layout){const S=g.layout.layoutBox[y];S&&(m=vt(S)*(parseFloat(m)/100))}}this.originPoint[y]=m}),w&&ke.postRender(()=>w(d,f)),ap(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:w,onDrag:b}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=M$(y),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),b&&b(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Ht(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new CE(e,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:TE(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ke.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:s}=this.getProps();if(!r||!ec(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=P$(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;e&&Xo(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=R$(r.layoutBox,e):this.constraints=!1,this.elastic=I$(n),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ht(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=O$(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Xo(e))return!1;const r=e.current;is(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=UD(r,s.root,this.visualElement.getTransformPagePoint());let o=j$(s.layout.layoutBox,i);if(n){const a=n($D(o));this.hasMutatedConstraints=!!a,a&&(o=qk(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ht(u=>{if(!ec(u,n,this.currentDirection))return;let d=l&&l[u]||{};o&&(d={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,v={type:"inertia",velocity:r?e[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return ap(this.visualElement,e),r.start(wg(e,r,0,n,this.visualElement,!1))}stopAnimation(){Ht(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Ht(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Ht(n=>{const{drag:r}=this.getProps();if(!ec(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],l=i.get()||0;i.set(e[n]-Ae(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Xo(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ht(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=N$({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(),Ht(o=>{if(!ec(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(Ae(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;L$.set(this.visualElement,this);const e=this.visualElement.current,n=ga(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==e&&Vk(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Xo(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()),ke.read(r);const o=Za(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ht(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=mp,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function ec(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function M$(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class $$ extends ms{constructor(e){super(e),this.removeGroupControls=Yt,this.removeListeners=Yt,this.controls=new D$(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Yt}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const mw=t=>(e,n)=>{t&&ke.postRender(()=>t(e,n))};class V$ extends ms{constructor(){super(...arguments),this.removePointerDownListener=Yt}onPointerDown(e){this.session=new CE(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:TE(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:mw(e),onStart:mw(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&ke.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=ga(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Eh=!1;class F$ extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Eh&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),jc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Eh=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||ke.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Eg.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;Eh=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function PE(t){const[e,n]=yE(),r=x.useContext(tg);return h.jsx(F$,{...t,layoutGroup:r,switchLayoutGroup:x.useContext(kE),isPresent:e,safeToRemove:n})}const U$={pan:{Feature:V$},drag:{Feature:$$,ProjectionNode:gE,MeasureLayout:PE}};function gw(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ke.postRender(()=>i(e,Sl(e)))}class B$ extends ms{mount(){const{current:e}=this.node;e&&(this.unmount=AD(e,(n,r)=>(gw(this.node,r,"Start"),s=>gw(this.node,s,"End"))))}unmount(){}}class z$ extends ms{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=wl(Za(this.node.current,"focus",()=>this.onFocus()),Za(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yw(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ke.postRender(()=>i(e,Sl(e)))}class H$ extends ms{mount(){const{current:e}=this.node;e&&(this.unmount=jD(e,(n,r)=>(yw(this.node,r,"Start"),(s,{success:i})=>yw(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const gp=new WeakMap,Th=new WeakMap,W$=t=>{const e=gp.get(t.target);e&&e(t)}
vendor: 4,412 bytes, line 222
222,q$=t=>{t.forEach(W$)};function K$({root:t,...e}){const n=t||document;Th.has(n)||Th.set(n,{});const r=Th.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(q$,{root:t,...e})),r[s]}function G$(t,e,n){const r=K$(e);return gp.set(t,n),r.observe(t),()=>{gp.delete(t),r.unobserve(t)}}const Z$={some:0,all:1};class J$ extends ms{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Z$[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return G$(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Q$(e,n))&&this.startObserver()}unmount(){}}function Q$({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Y$={inView:{Feature:J$},tap:{Feature:H$},focus:{Feature:z$},hover:{Feature:B$}},X$={layout:{ProjectionNode:gE,MeasureLayout:PE}},e4={...k$,...Y$,...U$,...X$},ue=w$(e4,x$);function Lg(t){return typeof t=="object"&&!Array.isArray(t)}function RE(t,e,n,r){return t==null?[]:typeof t=="string"&&Lg(e)?kg(t,n,r):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(s=>s!=null):[t]}function t4(t,e,n){return t*(e+1)}function vw(t,e,n,r){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):r.get(e)??t}function n4(t,e,n){for(let r=0;r<t.length;r++){const s=t[r];s.at>e&&s.at<n&&(vl(t,s),r--)}}function r4(t,e,n,r,s,i){n4(t,s,i);for(let o=0;o<e.length;o++)t.push({value:e[o],at:Ae(s,i,r[o]),easing:rk(n,o)})}function s4(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function i4(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const o4="easeInOut",a4=20;function l4(t,{defaultTransition:e={},...n}={},r,s){const i=e.duration||.3,o=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<t.length;p++){const v=t[p];if(typeof v=="string"){c.set(v,d);continue}else if(!Array.isArray(v)){c.set(v.name,vw(d,v.at,u,c));continue}let[w,b,y={}]=v;y.at!==void 0&&(d=vw(d,y.at,u,c));let m=0;const g=(S,_,k,E=0,T=0)=>{const C=c4(S),{delay:N=0,times:V=wk(C),type:L=e.type||"keyframes",repeat:K,repeatType:D,repeatDelay:re=0,...Z}=_;let{ease:F=e.ease||"easeOut",duration:A}=_;const j=typeof N=="function"?N(E,T):N,M=C.length,Q=yg(L)?L:s==null?void 0:s[L||"keyframes"];if(M<=2&&Q){let ye=100;if(M===2&&h4(C)){const Ut=C[1]-C[0];ye=Math.abs(Ut)}const Me={...e,...Z};A!==void 0&&(Me.duration=Sn(A));const ce=gk(Me,ye,Q);F=ce.ease,A=ce.duration}A??(A=i);const G=d+j;V.length===1&&V[0]===0&&(V[1]=1);const ie=V.length-C.length;if(ie>0&&vk(V,ie),C.length===1&&C.unshift(null),K){is(K<a4,"Repeat count too high, must be less than 20","repeat-count-high"),A=t4(A,K);const ye=[...C],Me=[...V];F=Array.isArray(F)?[...F]:[F];const ce=[...F];for(let Ut=0;Ut<K;Ut++){C.push(...ye);for(let St=0;St<ye.length;St++)V.push(Me[St]+(Ut+1)),F.push(St===0?"linear":rk(ce,St-1))}s4(V,K)}const oe=G+A;r4(k,C,F,V,G,oe),m=Math.max(j+A,m),f=Math.max(oe,f)};if(et(w)){const S=ww(w,a);g(b,y,xw("default",S))}else{const S=RE(w,b,r,l),_=S.length;for(let k=0;k<_;k++){b=b,y=y;const E=S[k],T=ww(E,a);for(const C in b)g(b[C],u4(y,C),xw(C,T),k,_)}}u=d,d+=m}return a.forEach((p,v)=>{for(const w in p){const b=p[w];b.sort(i4);const y=[],m=[],g=[];for(let E=0;E<b.length;E++){const{at:T,value:C,easing:N}=b[E];y.push(C),m.push(fo(0,f,T)),g.push(N||"easeOut")}m[0]!==0&&(m.unshift(0),y.unshift(y[0]),g.unshift(o4)),m[m.length-1]!==1&&(m.push(1),y.push(null)),o.has(v)||o.set(v,{keyframes:{},transition:{}});const S=o.get(v);S.keyframes[w]=y;const{type:_,...k}=e;S.transition[w]={...k,duration:f,ease:g,times:m,...n}}}),o}function ww(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function xw(t,e){return e[t]||(e[t]=[]),e[t]}function c4(t){return Array.isArray(t)?t:[t]}function u4(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const d4=t=>typeof t=="number",h4=t=>t.every(d4);function f4(t){const e={presenceContext:null,props:{}
222,visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Cg(t)&&!Fk(t)?new rE(e):new Yk(e);n.mount(t),Ka.set(t,n)}function p4(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new GD(e);n.mount(t),Ka.set(t,n)}function m4(t,e){return et(t)||typeof t=="number"||typeof t=="string"&&!Lg(e)}function jE(t,e,n,r){const s=[];if(m4(t,e))s.push(hE(t,Lg(e)&&e.default||e,n&&(n.default||n)));else{if(t==null)return s;const i=RE(t,e,r),o=i.length;is(!!o,"No valid elements provided.","no-valid-elements");for(let a=0;a<o;a++){const l=i[a],c=l instanceof Element?f4:p4;Ka.has(l)||c(l);const u=Ka.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,o)),s.push(...Sg(u,{...e,transition:d},{}))}}return s}function g4(t,e,n){const r=[];return l4(t,e,n,{spring:qa}).forEach(({keyframes:i,transition:o},a)=>{r.push(...jE(a,i,o))}),r}function y4(t){return Array.isArray(t)&&t.some(Array.isArray)}function v4(t={}){const{scope:e,reduceMotion:n}=t;function r(s,i,o){let a=[],l;if(y4(s))a=g4(s,n!==void 0?{reduceMotion:n,...i}:i,e);else{const{onComplete:u,...d}=o||{};typeof u=="function"&&(l=u),a=jE(s,i,n!==void 0?{reduceMotion:n,...d}:d,e)}const c=new ZL(a);return l&&c.finished.then(l),e&&(e.animations.push(c),c.finished.then(()=>{vl(e.animations,c)})),c}return r}const w4=v4(),x4={some:0,all:1};function b4(t,e,{root:n,margin:r,amount:s="some"}={}){const i=kg(t),o=new WeakMap,a=c=>{c.forEach(u=>{const d=o.get(u.target);if(u.isIntersecting!==!!d)if(u.isIntersecting){const f=e(u.target,u);typeof f=="function"?o.set(u.target,f):l.unobserve(u.target)}else typeof d=="function"&&(d(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:r,threshold:typeof s=="number"?s:x4[s]});return i.forEach(c=>l.observe(c)),()=>l.disconnect()}function ei(t,{root:e,margin:n,amount:r,once:s=!1,initial:i=!1}={}){const[o,a]=x.useState(i);return x.useEffect(()=>{if(!t.current||s&&o)return;const l=()=>(a(!0),s?void 0:()=>a(!1)),c={root:e&&e.current||void 0,margin:n,amount:r};return b4(t.current,l,c)},[e,t,n,s,r]),o}const S4=()=>{const{pathname:t}=ps();return x.useEffect(()=>{window.scrollTo(0,0)},[t]),null},_4={initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12}},Be=({children:t})=>h.jsx(ue.div,{variants:_4,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.3,ease:[.25,.4,.25,1]},children:t}),k4=Lm("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"}}),Je=x.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const o=r?wP:"button";return h.jsx(o,{className:we(k4({variant:e,size:n,className:t})),ref:i,...s})});Je.displayName="Button";const NE="/assets/logo-DC1p0Tpo.png",bw=[{label:"Domestic",href:"/domestic"},{label:"Commercial",href:"/commercial"},{label:"Electrical",href:"/electrical"},{label:"Plumbing & Heating",href:"/plumbing"},{label:"Solar & Renewables",href:"/renewables"},{label:"Safety & Compliance",href:"/compliance"},{label:"Landlords",href:"/landlords"}],E4=()=>{const[t,e]=x.useState(!1),[n,r]=x.useState(!1);return h.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 bg-background/95 backdrop-blur-sm border-b border-border",children:h.jsxs("div",{className:"container mx-auto px-4",children:[h.jsxs("div",{className:"flex items-center justify-between h-20",children:[h.jsx(Y,{to:"/",className:"flex-shrink-0",children:h.jsx("img",{loading:"lazy",decoding:"async",src:NE,alt:"SES Hereford Ltd",className:"h-14 w-auto"})}),h.jsxs("nav",{className:"hidden lg:flex items-center gap-8",children:[h.jsx(Y,{to:"/",className:"text-sm font-medium text-foreground
222/80 hover:text-foreground transition-colors",children:"Home"}),h.jsxs("div",{className:"relative group",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[h.jsxs("button",{className:"flex items-center gap-1 text-sm font-medium text-foreground/80 hover:text-foreground transition-colors",children:["Services ",h.jsx(Dm,{className:`h-3.5 w-3.5 transition-transform duration-200 ${n?"rotate-180":""}`})]}),h.jsx(sr,{children:n&&h.jsx(ue.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{duration:.15},className:"absolute top-full left-0 pt-2",children:h.jsx("div",{className:"bg-card border border-border rounded-xl shadow-xl py-2 min-w-[220px]",children:bw.map(s=>h.jsx(Y,{to:s.href,className:"block px-4 py-2.5 text-sm text-foreground/80 hover:text-foreground hover:bg-accent/10 transition-colors",onClick:()=>r(!1),children:s.label},s.label))})})})]}),h.jsx(Y,{to:"/projects",className:"text-sm font-medium text-foreground/80 hover:text-foreground transition-colors",children:"Projects"}),h.jsx(Y,{to:"/insights",className:"text-sm font-medium text-foreground/80 hover:text-foreground transition-colors",children:"Insights"}),h.jsx(Y,{to:"/reviews",className:"text-sm font-medium text-foreground/80 hover:text-foreground transition-colors",children:"Reviews"}),h.jsx(Y,{to:"/contact",className:"text-sm font-medium text-foreground/80 hover:text-foreground transition-colors",children:"Contact"})]}),h.jsxs("div",{className:"hidden lg:flex items-center gap-4",children:[h.jsx(Je,{variant:"outline",size:"sm",className:"gap-2",asChild:!0,children:h.jsxs("a",{href:"tel:01432508579",children:[h.jsx(cr,{className:"h-4 w-4"}),"Call Now"]})}),h.jsx(Je,{size:"sm",className:"bg-accent hover:bg-accent/90 text-accent-foreground",asChild:!0,children:h.jsx(Y,{to:"/contact",children:"Get a Quote"})})]}),h.jsx("button",{className:"lg:hidden p-2",onClick:()=>e(!t),"aria-label":"Toggle menu",children:t?h.jsx(gl,{className:"h-6 w-6"}):h.jsx(wR,{className:"h-6 w-6"})})]}),h.jsx(sr,{children:t&&h.jsx(ue.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:[.25,.4,.25,1]},className:"lg:hidden overflow-hidden border-t border-border",children:h.jsxs("nav",{className:"flex flex-col gap-1 py-4",children:[h.jsx(Y,{to:"/",className:"text-sm font-medium text-foreground/80 hover:text-foreground hover:bg-accent/5 transition-colors py-2.5 px-2 rounded-lg",onClick:()=>e(!1),children:"Home"}),h.jsxs("div",{className:"py-1",children:[h.jsx("p",{className:"text-xs font-semibold text-accent uppercase tracking-wider px-2 py-2",children:"Services"}),bw.map(s=>h.jsx(Y,{to:s.href,className:"block text-sm text-foreground/80 hover:text-foreground hover:bg-accent/5 transition-colors py-2.5 px-4 rounded-lg",onClick:()=>e(!1),children:s.label},s.label))]}),h.jsx(Y,{to:"/projects",className:"text-sm font-medium text-foreground/80 hover:text-foreground hover:bg-accent/5 transition-colors py-2.5 px-2 rounded-lg",onClick:()=>e(!1),children:"Projects"}),h.jsx(Y,{to:"/insights",className:"text-sm font-medium text-foreground/80 hover:text-foreground hover:bg-accent/5 transition-colors py-2.5 px-2 rounded-lg",onClick:()=>e(!1),children:"Insights"}),h.jsx(Y,{to:"/reviews",className:"text-sm font-medium text-foreground/80 hover:text-foreground hover:bg-accent/5 transition-colors py-2.5 px-2 rounded-lg",onClick:()=>e(!1),children:"Reviews"}),h.jsx(Y,{to:"/contact",className:"text-sm font-medium text-foreground/80 hover:text-foreground hover:bg-accent/5 transition-colors py-2.5 px-2 rounded-lg",onClick:()=>e(!1),children:"Contact"}),h.jsxs("div",{className:"flex flex-col gap-2 pt-4 border-t border-border mt-2",children:[h.jsx(Je,{variant:"outline",className:"gap-2 w-full",asChild:!0,children:h.jsxs("a",{href:"tel:01432508579",children:[h.jsx(cr,{className:"h-4 w-4"}),"Call Now"]})}),h.jsx(Je,{className:"bg-accent hover:bg-accent/90 text-accent-foreground w-full",asChild:!0,children:h.jsx(Y,{to:"/contact",children:"Get a Quote"})})]})]})})})]})})},T4=()=>h.jsxs("footer",{className:"bg-primary text-primary-foreground",children:[h.jsx("div",{className:"border-b border-primary-foreground
222/10",children:h.jsx("div",{className:"container mx-auto px-4 py-6",children:h.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 text-sm text-primary-foreground/70",children:[h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(T1,{className:"h-4 w-4 text-accent"})," 25 Years Experience"]}),h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(E1,{className:"h-4 w-4 text-accent"})," Fully Certified"]}),h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(k1,{className:"h-4 w-4 text-accent"})," NICEIC Approved"]})]})})}),h.jsxs("div",{className:"container mx-auto px-4 py-16",children:[h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12",children:[h.jsxs("div",{children:[h.jsx("img",{loading:"lazy",decoding:"async",src:NE,alt:"SES Hereford Ltd",className:"h-12 w-auto mb-6"}),h.jsx("p",{className:"text-primary-foreground/70 text-sm leading-relaxed",children:"Hereford's trusted electrical, plumbing, and renewable energy specialists. Serving domestic, commercial, and landlord clients across Herefordshire for over 25 years."})]}),h.jsxs("div",{children:[h.jsx("h4",{className:"font-semibold mb-4",children:"Services"}),h.jsxs("ul",{className:"space-y-2 text-sm text-primary-foreground/70",children:[h.jsx("li",{children:h.jsx(Y,{to:"/domestic",className:"hover:text-primary-foreground transition-colors",children:"Domestic"})}),h.jsx("li",{children:h.jsx(Y,{to:"/commercial",className:"hover:text-primary-foreground transition-colors",children:"Commercial"})}),h.jsx("li",{children:h.jsx(Y,{to:"/electrical",className:"hover:text-primary-foreground transition-colors",children:"Electrical"})}),h.jsx("li",{children:h.jsx(Y,{to:"/plumbing",className:"hover:text-primary-foreground transition-colors",children:"Plumbing & Heating"})}),h.jsx("li",{children:h.jsx(Y,{to:"/renewables",className:"hover:text-primary-foreground transition-colors",children:"Solar & Renewables"})}),h.jsx("li",{children:h.jsx(Y,{to:"/compliance",className:"hover:text-primary-foreground transition-colors",children:"Safety & Compliance"})}),h.jsx("li",{children:h.jsx(Y,{to:"/landlords",className:"hover:text-primary-foreground transition-colors",children:"Landlords"})})]})]}),h.jsxs("div",{children:[h.jsx("h4",{className:"font-semibold mb-4",children:"Quick Links"}),h.jsxs("ul",{className:"space-y-2 text-sm text-primary-foreground/70",children:[h.jsx("li",{children:h.jsx(Y,{to:"/projects",className:"hover:text-primary-foreground transition-colors",children:"Our Projects"})}),h.jsx("li",{children:h.jsx(Y,{to:"/reviews",className:"hover:text-primary-foreground transition-colors",children:"Reviews"})}),h.jsx("li",{children:h.jsx(Y,{to:"/insights",className:"hover:text-primary-foreground transition-colors",children:"Insights & Guides"})}),h.jsx("li",{children:h.jsx(Y,{to:"/pricing",className:"hover:text-primary-foreground transition-colors",children:"Pricing Guide"})}),h.jsx("li",{children:h.jsx(Y,{to:"/contact",className:"hover:text-primary-foreground transition-colors",children:"Contact Us"})}),h.jsx("li",{children:h.jsx(Y,{to:"/contact",className:"hover:text-primary-foreground transition-colors",children:"Request a Quote"})})]}),h.jsx("h4",{className:"font-semibold mt-6 mb-3",children:"Areas Covered"}),h.jsxs("ul",{className:"space-y-2 text-sm text-primary-foreground/70",children:[h.jsx("li",{children:h.jsx(Y,{to:"/areas/hereford",className:"hover:text-primary-foreground transition-colors",children:"Hereford"})}),h.jsx("li",{children:h.jsx(Y,{to:"/areas/leominster",className:"hover:text-primary-foreground transition-colors",children:"Leominster"})}),h.jsx("li",{children:h.jsx(Y,{to:"/areas/ross-on-wye",className:"hover:text-primary-foreground transition-colors",children:"Ross-on-Wye"})}),h.jsx("li",{children:h.jsx(Y,{to:"/areas/ledbury",className:"hover:text-primary-foreground transition-colors",children:"Ledbury"})}),h.jsx("li",{children:h.jsx(Y,{to:"/areas/bromyard",className:"hover:text-primary-foreground transition-colors",children:"Bromyard"})}),h.jsx("li",{children:h.jsx(Y,{to:"/areas/kington",className:"hover:text-primary-foreground transition-colors",children:"Kington"})})]})]}),h.jsxs("div",{children:[h.jsx("h4",{className:"font-semibold mb-4",children:"Contact"}),h.jsxs("ul",{className:"space-y-3 text-sm text-primary-foreground
222/70",children:[h.jsxs("li",{className:"flex items-center gap-3",children:[h.jsx(cr,{className:"h-4 w-4 text-accent"}),h.jsx("a",{href:"tel:01432508579",className:"hover:text-primary-foreground transition-colors",children:"01432 508579"})]}),h.jsxs("li",{className:"flex items-center gap-3",children:[h.jsx(Ma,{className:"h-4 w-4 text-accent"}),h.jsx("a",{href:"mailto:[email protected]",className:"hover:text-primary-foreground transition-colors",children:"[email protected]"})]}),h.jsxs("li",{className:"flex items-start gap-3",children:[h.jsx(Ju,{className:"h-4 w-4 text-accent flex-shrink-0 mt-0.5"}),h.jsx("span",{children:"Hereford, Herefordshire"})]})]})]})]}),h.jsxs("div",{className:"border-t border-primary-foreground/10 mt-12 pt-8",children:[h.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center gap-4 text-sm text-primary-foreground/50",children:[h.jsxs("div",{className:"text-center md:text-left",children:[h.jsxs("p",{children:["© ",new Date().getFullYear()," SES Hereford Ltd. All rights reserved."]}),h.jsx("p",{className:"mt-1",children:"Company Registration Number: 08563155"})]}),h.jsxs("div",{className:"flex gap-6",children:[h.jsx(Y,{to:"/privacy",className:"hover:text-primary-foreground transition-colors",children:"Privacy Policy"}),h.jsx(Y,{to:"/terms",className:"hover:text-primary-foreground transition-colors",children:"Terms of Service"})]})]}),h.jsx("div",{className:"mt-8 pt-6 border-t border-primary-foreground/10 flex justify-center",children:h.jsxs("p",{className:"text-[11px] tracking-[0.28em] uppercase text-primary-foreground/50 flex items-center gap-2",children:[h.jsx("span",{children:"Created by"}),h.jsx("a",{href:"https://www.beeconfident.online",target:"_blank",rel:"noopener noreferrer",className:"font-serif not-italic tracking-[0.18em] text-sm bg-gradient-to-r from-[hsl(45,75%,72%)] via-[hsl(40,85%,58%)] to-[hsl(36,70%,48%)] bg-clip-text text-transparent hover:from-accent hover:to-accent transition-all",children:"Bee Confident"})]})})]})]})]}),Sw=[{name:"Alex Powell",text:"Went above and beyond for us. Job estimated last minute Wednesday, scheduled Thursday due to cancellation. When access issues prevented completion, they returned Friday evening to ensure we had power for next stage of works. Work completed looks perfect. Office staff and site team faultless. 100% recommend."},{name:"Tracy Davies",text:"Electrical work in kitchen completed efficiently, professionally and friendly. Competitive pricing and high standard. So impressed they returned to complete bathroom work. Highly recommend."},{name:"J A D",text:"Incredible team, thorough and super competent from the start. Felt entirely at ease. Due diligence, clarity and integrity throughout. Totally exceeded expectations."},{name:"Ally Sheppard",subtitle:"Neon Heating",text:"Always helpful, responsive and professional. Nothing is too much trouble. Consistently go above and beyond. Reliable and genuinely committed to high standards."},{name:"Dave Adby",text:"Needed domestic electrical work at short notice. They went above and beyond. Found solutions to every challenge. Highly recommend."},{name:"Kay Hurdidge",text:"PAT testing prior to fire safety audit. Efficient, thorough, high-quality reporting. Excellent service at reasonable price."},{name:"Mark Turner",text:"Work completed to high standard on two occasions. Great communication. Reliable and punctual."},{name:"David Cooke",text:"New 20 amp supply installed. Great price, tidy work, polite and punctual. Highly recommend."},{name:"Tom Collis",text:"Electrical work completed to high standard. Professional and knowledgeable team. Competitive price."}],_w=120,C4=({name:t,subtitle:e,text:n})=>{const[r,s]=x.useState(!1),i=n.length>_w,o=!r&&i?n.slice(0,_w)+"…":n;return h.jsxs("div",{className:"flex-shrink-0 w-[300px] md:w-[340px] bg-card border border-border rounded-xl p-5 flex flex-col gap-3 select-none",children:[h.jsx("div",{className:"flex gap-0.5",children:Array.from({length:5}).map((a,l)=>h.jsx(C1,{className:"h-3.5 w-3.5 fill-accent text-accent"},l))}),h.jsxs("p",{className:"text-sm text-muted-foreground leading-relaxed",children:['"',o,'"',i&&h.jsx("button",{onClick:a=>{a.stopPropagation(),s(!r)},className:"inline-flex items-center gap-0.5 ml-1 text-accent hover:text-foreground transition-colors text-xs font-medium",children:r?h.jsxs(h.Fragment,{children:["Less ",h.jsx(pR,{className:"h-3 w-3"})]}):h.jsxs(h.Fragment,{children:["Read more ",h.jsx(Dm,{className:"h-3 w-3"})]})})]}),h.jsxs("div",{className:"border-t border-border pt-2 mt-auto",children:[h.jsx("p",{className:"text-sm font-semibold text-foreground",children:t}),e&&h.jsx("p",{className:"text-xs text-muted-foreground",children:e})]})]})},A4=()=>{const t=x.useRef(null),[e,n]=x.useState(!1),r=x.useRef(),s=x.useRef(0),i=[...Sw,...Sw];x.useEffect(()=>{const a=t.current;if(!a)return;const l=.5,c=()=>
222{if(!e&&a){s.current+=l;const u=a.scrollWidth/2;s.current>=u&&(s.current=0),a.scrollLeft=s.current}r.current=requestAnimationFrame(c)};return r.current=requestAnimationFrame(c),()=>{r.current&&cancelAnimationFrame(r.current)}},[e]);const o=()=>{t.current&&e&&(s.current=t.current.scrollLeft)};return h.jsxs("section",{className:"py-8 bg-secondary/50 border-t border-border",children:[h.jsx("div",{className:"container mx-auto px-4 mb-4",children:h.jsx("p",{className:"text-center text-xs uppercase tracking-widest text-muted-foreground font-medium",children:"Trusted by Homeowners & Businesses"})}),h.jsx("div",{ref:t,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),onTouchStart:()=>n(!0),onTouchEnd:()=>n(!1),onScroll:o,className:"flex gap-4 overflow-x-auto scrollbar-hide px-4 cursor-grab active:cursor-grabbing",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:i.map((a,l)=>h.jsx(C4,{name:a.name,subtitle:a.subtitle,text:a.text},`${a.name}-${l}`))})]})},P4=()=>{const[t,e]=x.useState(!1),[n,r]=x.useState(!1);return x.useEffect(()=>{const s=()=>r(window.scrollY>300);return window.addEventListener("scroll",s,{passive:!0}),()=>window.removeEventListener("scroll",s)},[]),h.jsx(sr,{children:n&&h.jsxs(ue.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},className:"fixed bottom-20 right-6 z-50 flex flex-col items-end gap-3 sm:bottom-24",children:[h.jsx(sr,{children:t&&h.jsxs(ue.div,{initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.2},className:"flex flex-col gap-2 mb-1",children:[h.jsxs("a",{href:"tel:01432508579",className:"flex items-center gap-3 bg-card border border-border rounded-full pl-4 pr-5 py-3 shadow-lg hover:shadow-xl transition-shadow group",children:[h.jsx("div",{className:"w-10 h-10 rounded-full bg-accent flex items-center justify-center",children:h.jsx(cr,{className:"h-5 w-5 text-accent-foreground"})}),h.jsxs("div",{className:"text-left",children:[h.jsx("p",{className:"text-xs text-muted-foreground",children:"Call us now"}),h.jsx("p",{className:"text-sm font-semibold text-foreground",children:"01432 508579"})]})]}),h.jsxs(Y,{to:"/contact",onClick:()=>e(!1),className:"flex items-center gap-3 bg-card border border-border rounded-full pl-4 pr-5 py-3 shadow-lg hover:shadow-xl transition-shadow group",children:[h.jsx("div",{className:"w-10 h-10 rounded-full bg-accent flex items-center justify-center",children:h.jsx(Ma,{className:"h-5 w-5 text-accent-foreground"})}),h.jsxs("div",{className:"text-left",children:[h.jsx("p",{className:"text-xs text-muted-foreground",children:"Get a quote"}),h.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Free Estimate"})]})]}),h.jsxs("a",{href:"mailto:[email protected]",className:"flex items-center gap-3 bg-card border border-border rounded-full pl-4 pr-5 py-3 shadow-lg hover:shadow-xl transition-shadow group",children:[h.jsx("div",{className:"w-10 h-10 rounded-full bg-accent flex items-center justify-center",children:h.jsx(Ma,{className:"h-5 w-5 text-accent-foreground"})}),h.jsxs("div",{className:"text-left",children:[h.jsx("p",{className:"text-xs text-muted-foreground",children:"Email us"}),h.jsx("p",{className:"text-sm font-semibold text-foreground",children:"[email protected]"})]})]})]})}),h.jsx(ue.button,{whileHover:{scale:1.1},whileTap:{scale:.95},onClick:()=>e(!t),className:"w-14 h-14 rounded-full bg-accent text-accent-foreground shadow-lg shadow-accent/30 flex items-center justify-center","aria-label":"Contact us",children:h.jsx(sr,{mode:"wait",children:t?h.jsx(ue.div,{initial:{rotate:-90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:90,opacity:0},transition:{duration:.15},children:h.jsx(gl,{className:"h-6 w-6"})},"close"):h.jsx(ue.div,{initial:{rotate:90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:-90,opacity:0},transition:{duration:.15},children:h.jsx(cr,{className:"h-6 w-6"})},"phone")})})]})})},R4=()=>{const[t,e]=x.useState(!1),[n,r]=x.useState(!1);return x.useEffect(()=>{const s=()=>{e(window.scrollY>600)};return window.addEventListener("scroll",s,{passive:!0}),()=>window.removeEventListener("scroll",s)},[]),n?null:h.jsx(sr,{children:t&&h.jsx(ue.div,{initial:{y:100,opacity:0}
222,animate:{y:0,opacity:1},exit:{y:100,opacity:0},transition:{duration:.3},className:"fixed bottom-0 left-0 right-0 z-50 bg-primary/95 backdrop-blur-sm border-t border-border shadow-2xl",children:h.jsxs("div",{className:"container mx-auto px-4 py-3 flex items-center justify-between gap-4",children:[h.jsx("p",{className:"text-primary-foreground text-sm font-medium hidden sm:block",children:"Need a quote? Contact our team today."}),h.jsxs("div",{className:"flex items-center gap-3 ml-auto",children:[h.jsx(Je,{size:"sm",className:"bg-accent hover:bg-accent/90 text-accent-foreground gap-2",asChild:!0,children:h.jsx(Y,{to:"/contact",children:"Request a Quote"})}),h.jsx(Je,{size:"sm",variant:"outline",className:"border-primary-foreground/30 text-primary-foreground hover:bg-primary-foreground/10 gap-2",asChild:!0,children:h.jsxs("a",{href:"tel:01432508579",children:[h.jsx(cr,{className:"h-4 w-4"}),h.jsx("span",{className:"hidden sm:inline",children:"Call"})]})}),h.jsx(Je,{size:"sm",variant:"ghost",className:"text-primary-foreground hover:bg-primary-foreground/10 gap-2 hidden md:inline-flex",asChild:!0,children:h.jsxs("a",{href:"mailto:[email protected]",children:[h.jsx(Ma,{className:"h-4 w-4"}),h.jsx("span",{children:"Email"})]})}),h.jsx("button",{onClick:()=>r(!0),className:"text-primary-foreground/50 hover:text-primary-foreground p-1","aria-label":"Dismiss",children:h.jsx(gl,{className:"h-4 w-4"})})]})]})})})},j4=()=>{const[t,e]=x.useState(!1);x.useEffect(()=>{const r=()=>e(window.scrollY>500);return window.addEventListener("scroll",r,{passive:!0}),()=>window.removeEventListener("scroll",r)},[]);const n=()=>{window.scrollTo({top:0,behavior:"smooth"})};return h.jsx(sr,{children:t&&h.jsx(ue.button,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},whileHover:{scale:1.1},whileTap:{scale:.95},onClick:n,className:"fixed bottom-20 left-6 z-40 w-10 h-10 rounded-full bg-card border border-border text-foreground shadow-lg flex items-center justify-center hover:border-accent/40 transition-colors sm:bottom-24","aria-label":"Back to top",children:h.jsx(fR,{className:"h-4 w-4"})})})},N4=({children:t})=>h.jsxs("div",{className:"min-h-screen flex flex-col",children:[h.jsx(E4,{}),h.jsx("main",{className:"flex-1 pt-20",children:t}),h.jsx(A4,{}),h.jsx(P4,{}),h.jsx(j4,{}),h.jsx(R4,{}),h.jsx(T4,{})]}),Js="https://ses-hereford-hub.lovable.app",O4=({title:t,description:e,path:n,type:r="website",jsonLd:s})=>{const i=`${Js}${n}`;return h.jsxs(F_,{children:[h.jsx("title",{children:t}),h.jsx("meta",{name:"description",content:e}),h.jsx("link",{rel:"canonical",href:i}),h.jsx("meta",{property:"og:title",content:t}),h.jsx("meta",{property:"og:description",content:e}),h.jsx("meta",{property:"og:url",content:i}),h.jsx("meta",{property:"og:type",content:r}),h.jsx("meta",{property:"og:image",content:`${Js}/favicon.png`}),h.jsx("meta",{name:"twitter:card",content:"summary"}),h.jsx("meta",{name:"twitter:title",content:t}),h.jsx("meta",{name:"twitter:description",content:e}),s&&h.jsx("script",{type:"application/ld+json",children:JSON.stringify((Array.isArray(s),s))})]})},K3=t=>({"@context":"https://schema.org","@type":"FAQPage",mainEntity:t.map(e=>({"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}))}),I4={"@context":"https://schema.org","@type":["Electrician","Plumber","GeneralContractor"],name:"SES Hereford Ltd",description:"Electrical, plumbing, heating & renewable energy specialists in Hereford. NICEIC approved, MCS certified. 25 years experience.",url:Js,telephone:"01432 508579",email:"[email protected]",address:{"@type":"PostalAddress",addressLocality:"Hereford",addressRegion:"Herefordshire",addressCountry:"GB"},areaServed:{"@type":"Place",name:"Herefordshire"},openingHoursSpecification:[{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday"],opens:"08:00",closes:"17:00"}],aggregateRating:{"@type":"AggregateRating",ratingValue:"5.0",reviewCount:"50",bestRating:"5"},sameAs:[]},G3=(t,e)=>({"@context":"https://schema.org","@type":"Service",name:t,description:e,provider:{"@type":"LocalBusiness",name:"SES Hereford Ltd",telephone:"01432 508579",address:{"@type":"PostalAddress",addressLocality:"Hereford",addressRegion:"Herefordshire",addressCountry:"GB"}},areaServed:{"@type":"Place",name:"Herefordshire"}}),Z3=t=>({"@context":"https://schema.org","@type":["Electrician","Plumber","GeneralContractor"],name:`SES Hereford Ltd — ${t.name}`,description:`Electrical, plumbing, heating and renewable energy services in ${t.name} (${t.postcodes.join(", ")}). NICEIC approved, MCS certified.`,url:`${Js}/areas/${t.slug}`,telephone:"01432 508579",email:"[email protected]",image:`${Js}/favicon.png`,address:{"@type":"PostalAddress",addressLocality:"Hereford",addressRegion:"Herefordshire",addressCountry:"GB"},areaServed:[{"@type":"City",name:t.name},...t.postcodes.map(e=>({"@type":"PostalCodeSpecification",postalCode:e,addressCountry:"GB"}
222))],hasOfferCatalog:{"@type":"OfferCatalog",name:`Services in ${t.name}`,itemListElement:t.popularServices.map(e=>({"@type":"Offer",itemOffered:{"@type":"Service",name:e}}))},openingHoursSpecification:[{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday"],opens:"08:00",closes:"17:00"}],aggregateRating:{"@type":"AggregateRating",ratingValue:"5.0",reviewCount:"50",bestRating:"5"}}),J3=t=>({"@context":"https://schema.org","@type":"Article",headline:t.title,description:t.description,datePublished:t.datePublished,author:{"@type":"Organization",name:t.author??"SES Hereford Ltd"},publisher:{"@type":"Organization",name:"SES Hereford Ltd",logo:{"@type":"ImageObject",url:`${Js}/favicon.png`}},mainEntityOfPage:{"@type":"WebPage","@id":`${Js}/insights/${t.slug}`}}),L4="/assets/hero-ses-van-BqtF3Vo1.jpg",D4=()=>h.jsxs("section",{className:"relative min-h-[80vh] flex items-center overflow-hidden",children:[h.jsxs("div",{className:"absolute inset-0",children:[h.jsx(ue.img,{src:L4,alt:"SES branded van on site in Herefordshire",className:"w-full h-full object-cover",initial:{scale:1.1},animate:{scale:1},transition:{duration:1.5,ease:"easeOut"},fetchPriority:"high"}),h.jsx("div",{className:"absolute inset-0 bg-primary/70"})]}),h.jsx("div",{className:"container mx-auto px-4 relative z-10",children:h.jsxs("div",{className:"max-w-3xl",children:[h.jsx(ue.h1,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,ease:[.25,.4,.25,1]},className:"text-4xl md:text-5xl lg:text-6xl font-bold text-primary-foreground leading-tight mb-6",children:"Hereford's Trusted Electrical, Plumbing & Renewable Specialists"}),h.jsx(ue.p,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,delay:.15,ease:[.25,.4,.25,1]},className:"text-lg md:text-xl text-primary-foreground/80 mb-6",children:"Domestic • Commercial • Landlords"}),h.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.22},className:"inline-flex items-center gap-3 px-4 py-2 rounded-full bg-primary-foreground/10 backdrop-blur-sm border border-primary-foreground/15 mb-8",children:[h.jsx("div",{className:"flex items-center gap-0.5",children:[0,1,2,3,4].map(t=>h.jsx(C1,{className:"h-4 w-4 fill-accent text-accent"},t))}),h.jsx("span",{className:"text-sm font-semibold text-primary-foreground",children:"5.0"}),h.jsx("span",{className:"text-sm text-primary-foreground/70",children:"· Rated by 50+ local clients"})]}),h.jsxs(ue.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,delay:.3,ease:[.25,.4,.25,1]},className:"flex flex-col sm:flex-row gap-4",children:[h.jsx(Je,{size:"lg",className:"bg-accent hover:bg-accent/90 text-accent-foreground text-lg px-8 py-6 transition-transform hover:scale-105",asChild:!0,children:h.jsx(Y,{to:"/contact",children:"Request a Quote"})}),h.jsx(Je,{size:"lg",variant:"outline",className:"border-primary-foreground/30 text-primary-foreground hover:bg-primary-foreground/10 text-lg px-8 py-6 gap-2 transition-transform hover:scale-105",asChild:!0,children:h.jsxs("a",{href:"tel:01432508579",children:[h.jsx(cr,{className:"h-5 w-5"}),"Call Now"]})})]}),h.jsxs(ue.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.8,delay:.5,type:"spring",stiffness:150},className:"flex flex-wrap gap-6 mt-12 text-sm text-primary-foreground/60",children:[h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"w-2 h-2 bg-accent rounded-full animate-pulse"}),"25 Years Experience"]}),h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"w-2 h-2 bg-accent rounded-full animate-pulse"}),"NICEIC Approved"]}),h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"w-2 h-2 bg-accent rounded-full animate-pulse"}),"Fully Certified"]})]})]})})]}),Dg=x.forwardRef(({className:t,...e},n)=>h.jsx("div",{ref:n,className:we("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));Dg.displayName="Card";const M4=x.forwardRef(({className:t,...e},n)=>h.jsx("div",{ref:n,className:we("flex flex-col space-y-1.5 p-6",t),...e}));
222M4.displayName="CardHeader";const $4=x.forwardRef(({className:t,...e},n)=>h.jsx("h3",{ref:n,className:we("text-2xl font-semibold leading-none tracking-tight",t),...e}));$4.displayName="CardTitle";const V4=x.forwardRef(({className:t,...e},n)=>h.jsx("p",{ref:n,className:we("text-sm text-muted-foreground",t),...e}));V4.displayName="CardDescription";const Mg=x.forwardRef(({className:t,...e},n)=>h.jsx("div",{ref:n,className:we("p-6 pt-0",t),...e}));Mg.displayName="CardContent";const F4=x.forwardRef(({className:t,...e},n)=>h.jsx("div",{ref:n,className:we("flex items-center p-6 pt-0",t),...e}));F4.displayName="CardFooter";const dd=({children:t,className:e="",delay:n=0,direction:r="up",duration:s=.6})=>{const i=x.useRef(null),o=ei(i,{once:!0,margin:"-100px"}),a={up:{y:40,x:0},down:{y:-40,x:0},left:{y:0,x:40},right:{y:0,x:-40}};return h.jsx(ue.div,{ref:i,className:e,initial:{opacity:0,...a[r]},animate:o?{opacity:1,y:0,x:0}:{opacity:0,...a[r]},transition:{duration:s,delay:n,ease:[.25,.4,.25,1]},children:t})},hd=({children:t,className:e="",staggerDelay:n=.1})=>{const r=x.useRef(null),s=ei(r,{once:!0,margin:"-50px"});return h.jsx(ue.div,{ref:r,className:e,initial:"hidden",animate:s?"visible":"hidden",variants:{visible:{transition:{staggerChildren:n}}},children:t})},fd=({children:t,className:e=""})=>h.jsx(ue.div,{className:e,variants:{hidden:{opacity:0,y:30,scale:.95},visible:{opacity:1,y:0,scale:1,transition:{duration:.5,ease:[.25,.4,.25,1]}}},children:t}),U4="/assets/homeowner-new-d09xg4mA.webp",B4="/assets/real-optician-fitout-_NC1-xwd.png",z4="/assets/landlord-property-CAbEQnkc.jpg",H4="/assets/solar-renewables-CK7I4iLZ.jpg",W4=[{title:"Homeowners",description:"Complete electrical, plumbing, and heating solutions for your home.",href:"/domestic",image:U4},{title:"Businesses & Commercial",description:"Professional services for offices, retail, and industrial premises.",href:"/commercial",image:B4},{title:"Landlords & Letting Agents",description:"Compliance certificates, maintenance, and emergency repairs.",href:"/landlords",image:z4},{title:"Solar & Renewable Customers",description:"Expert solar PV installation and renewable energy solutions.",href:"/renewables",image:H4}],q4=()=>h.jsx("section",{className:"py-20 bg-secondary overflow-hidden",children:h.jsxs("div",{className:"container mx-auto px-4",children:[h.jsxs(dd,{className:"text-center mb-12",children:[h.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Who We Help"}),h.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Whether you're a homeowner, business, or landlord, we have the expertise to help."})]}),h.jsx(hd,{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:W4.map(t=>h.jsx(fd,{children:h.jsx(Y,{to:t.href,children:h.jsxs(Dg,{className:"h-full group hover:shadow-xl hover:shadow-accent/10 transition-all duration-300 hover:-translate-y-2 border-border/50 overflow-hidden",children:[h.jsx("div",{className:"aspect-[4/3] overflow-hidden",children:h.jsx("img",{loading:"lazy",decoding:"async",src:t.image,alt:t.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),h.jsxs(Mg,{className:"p-6",children:[h.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:t.title}),h.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),h.jsxs("span",{className:"inline-flex items-center text-sm font-medium text-accent group-hover:gap-2 transition-all",children:["Learn more",h.jsx(co,{className:"h-4 w-4 ml-1"})]})]})]})})},t.title))})]})}),K4="/assets/ses-logo-sections-DKnPmPGH.png",pd=({className:t=""})=>h.jsxs("div",{className:`flex items-center justify-center gap-4 mb-8 ${t}`,children:[h.jsx("div",{className:"h-px w-10 md:w-16 bg-accent/60"}),h.jsx("img",{loading:"lazy",decoding:"async",src:K4,alt:"SES - Specialised Electrical Services Ltd",className:"h-20 md:h-16 w-auto brightness-200 contrast-125 opacity-80"}),h.jsx("div",{className:"h-px w-10 md:w-16 bg-accent/60"})]}),G4="/assets/real-linear-lighting-keNwqfuG.jpg",Z4="/assets/service-plumbing-pzqF_zZp.jpg",J4="/assets/service-solar-BUReTbWX.jpg",Q4="/assets/real-consumer-unit-closed-ses-2DcPObKK.jpg",Y4=[{icon:P1,title:"Electrical Services",items:["Full & partial rewires","Consumer unit upgrades","Fault finding & repairs","Lighting design & installation","EV charger installation"],href:"/electrical",image:G4},{icon:gR,title:"Plumbing & Heating",items:["Boiler installation & servicing","Central heating systems","Bathroom installations","Plumbing repairs","Underfloor heating"],href:"/plumbing",image:Z4},{icon:A1,title:"Solar & Renewables",items:["Solar PV installation","Battery storage systems","Heat pumps","Energy efficie
222ncy audits","Smart home integration"],href:"/renewables",image:J4},{icon:bR,title:"Safety & Compliance",items:["EICR electrical certificates","PAT testing","Legionella risk assessments","Fire alarm installation","Emergency lighting"],href:"/compliance",image:Q4}],X4=()=>h.jsx("section",{className:"py-20 bg-background overflow-hidden",children:h.jsxs("div",{className:"container mx-auto px-4",children:[h.jsxs(dd,{className:"text-center mb-12",children:[h.jsx(pd,{}),h.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Our Core Services"}),h.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Comprehensive electrical, plumbing, and renewable energy services delivered by qualified professionals."})]}),h.jsx(hd,{className:"grid grid-cols-1 md:grid-cols-2 gap-8",staggerDelay:.15,children:Y4.map(t=>h.jsx(fd,{children:h.jsxs(Y,{to:t.href,className:"block rounded-xl border overflow-hidden transition-shadow hover:shadow-lg cursor-pointer bg-card border-border",children:[h.jsx("div",{className:"aspect-[16/9] overflow-hidden",children:h.jsx("img",{loading:"lazy",decoding:"async",src:t.image,alt:t.title,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-500"})}),h.jsxs("div",{className:"p-8",children:[h.jsxs("div",{className:"flex items-start gap-4 mb-6",children:[h.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center bg-accent/20",children:h.jsx(t.icon,{className:"h-6 w-6 text-accent"})}),h.jsx("h3",{className:"text-xl font-semibold text-foreground pt-2",children:t.title})]}),h.jsx("ul",{className:"space-y-2 mb-6",children:t.items.map(e=>h.jsxs("li",{className:"text-muted-foreground flex items-center gap-2",children:[h.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent"}),e]},e))}),h.jsxs("span",{className:"inline-flex items-center text-sm font-medium hover:gap-2 transition-all text-accent",children:["View Services",h.jsx(co,{className:"h-4 w-4 ml-1"})]})]})]})},t.title))})]})}),eV="/assets/ses-van-DE9glC4f.webp",tV=[{value:1500,suffix:"+",label:"Projects Completed"},{value:25,suffix:"+",label:"Years Experience"},{value:500,suffix:"+",label:"Properties Managed"},{value:24,suffix:"h",label:"Response Time"}],nV=({value:t,suffix:e,inView:n})=>{const[r,s]=x.useState(0);return x.useEffect(()=>n?w4(0,t,{duration:2,ease:"easeOut",onUpdate:o=>s(Math.round(o))}).stop:void 0,[n,t]),h.jsxs("span",{className:"text-4xl md:text-5xl font-bold text-accent",children:[r.toLocaleString(),e]})},rV=()=>{const t=x.useRef(null),e=ei(t,{once:!0,margin:"-100px"});return h.jsxs("section",{className:"relative py-16 overflow-hidden",ref:t,children:[h.jsxs("div",{className:"absolute inset-0",children:[h.jsx("img",{loading:"lazy",decoding:"async",src:eV,alt:"",className:"w-full h-full object-cover opacity-10"}),h.jsx("div",{className:"absolute inset-0 bg-primary/85"})]}),h.jsx("div",{className:"container mx-auto px-4 relative z-10",children:h.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8",children:tV.map((n,r)=>h.jsxs(ue.div,{className:"text-center",initial:{opacity:0,y:20,scale:.9},animate:e?{opacity:1,y:0,scale:1}:{},transition:{duration:.6,delay:r*.15,type:"spring",stiffness:200},children:[h.jsx(nV,{value:n.value,suffix:n.suffix,inView:e}),h.jsx("p",{className:"text-primary-foreground/70 mt-2 text-sm",children:n.label})]},n.label))})})]})},sV="/assets/ses-engineer-BAnzs5Ox.jpg",iV=[{icon:k1,title:"NICEIC Approved",description:"Certified electrical contractor"},{icon:T1,title:"25 Years Experience",description:"Delivering professional electrical, mechanical, plumbing and renewable energy solutions since 2013."},{icon:E1,title:"Fully Certified",description:"Fully certified where necessary for the services provided"},{icon:Ju,title:"Local Team",description:"Based in Hereford"}],oV=()=>h.jsxs("section",{className:"relative py-20 overflow-hidden",children:[h.jsxs("div",{className:"absolute inset-0",children:[h.jsx("img",{loading:"lazy",decoding:"async",src:sV,alt:"SES engineer with service van",className:"w-full h-full object-cover opacity-15"}),h.jsx("div",{className:"absolute inset-0 bg-secondary/90"})]}),h.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[h.jsxs(dd,{className:"text-center mb-12",children:[h.jsx(pd,{}),h.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Why Choose SES Hereford?"}),h.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:"Trusted by homeowners, businesses, and landlords across Herefordshire for over 25 years."})]}),h.jsx(hd,{className:"grid grid-cols-2 md:grid-cols-4 gap-6 mb-16",children:iV.map(t=>h.jsx(fd,{children:h.jsxs("div",{className:"text-center p-6 bg-background rounded-xl border border-border transition-transform hover:scale-105",children:[h.jsx("div",{className:"w-14 h-14 mx-auto rounded-full bg-accent/10 flex items-center justify-center mb-4",children:h.jsx(t.icon,{className:"h-7 w-7 text-accent"})}),h.jsx("h3",{className:"font-semibold text-foreground mb-1",children:t.title}),h.jsx("p",{className:"text-sm text-muted-foreground",children:t.description})]})},t.title))})]})]}),aV="/assets/project-clintons-1-CAragDCj.jpg",lV="/assets/project-clintons-2-CcuhfOLe.jpg",cV="/assets/project-clintons-3-BmxKDkao.jpg",uV="/assets/project-clintons-4-C_6xJkrM.jpg",dV="/assets/project-ev-1-DNfCZh6A.jpg",hV="/assets/project-ev-2-NeQrXyXc.jpg",fV="/assets/project-ev-3-DTA6UcLN.jpg",pV="/assets/hero-ses-van-BqtF3Vo1.jpg",mV="/assets/project-residential-1-DL0Bm9rt.jpg",gV="/assets/project-residential-2-C-j1uruu.jpg",yV="/assets/real-fuseboard-bidirectional-DhG6SsGS.jpg",vV="/assets/real-ev-pillar-charger-C8YTI8HC.jpg",wV="/assets/real-stairwell-lighting-Bf83cAgu.jpg",xV="/assets/real-solar-banner-D0JnWWJx.jpg",bV="/assets/real-bus-shelter-DdQS_hLm.jpg",SV="/assets/real-huawei-inverter-battery-CUig6jAp.jpg",_V="/assets/real-pendant-lights-1-wEJXktxZ.jpg",kw="/assets/real-solar-roof-array-B1DfkdVL.jpg",kV="/assets/real-kitchen-brick-BMIR8KJ1.jpg",EV="/assets/real-van-scaffold-solar-Crv-JT1Y.jpg",TV="/assets/real-huawei-inverter-ses-Pz3FYkFy.jpg",CV="/assets/real-huawei-inverter-closeup-CqpWoNPP.jpg",AV="/assets/real-van-barn-conversion-CAPeFAuy.jpg",PV="/assets/real-huawei-inverter-loft-4lv8YMf8.jpg",RV="/assets/real-abb-outdoor-cabinet-tpWpGUQG.jpg",jV="/assets/real-vans-leisure-site-D9lBgdhG.jpg",NV="/assets/real-electrician-floor-socket-DBF5eO7f.jpg",OV="/assets/real-old-mk-fuseboard-Dlq4TsBc.jpg",IV="/assets/real-van-house-front-QsfP1sm0.jpg",LV="/assets/real-kitchen-white-7eH9sKes.jpg",DV="/assets/real-ses-hivis-panel-CM6yqQh7.jpg",MV="/assets/real-pendant-lights-2-CeP_M-xa.jpg",Ew="/assets/real-fusebox-ev-circuit-BGz4fyU6.jpg",Tw="/assets/real-zappi-charger-Dawj2pO9.jpg",$V="/assets/real-yankee-candle-store-OD7sQIvG.jpg",VV="/assets/real-skechers-fitout-DxnnNynJ.jpg",Cw="/assets/real-retail-fitout-1-GotmhckE.jpg",Aw="/assets/real-retail-fitout-2-P7b-5ZSE.jpg",FV="/assets/real-old-consumer-unit-CjlGq28E.jpg",UV="/assets/real-ceiling-downlights-xYE3aOLP.jpg",BV="/assets/real-outdoor-wall-light-eIB51oBq.jpg",zV="/assets/real-hallway-downlights-BTZHFCJ0.jpg",HV="/assets/real-house-exterior-pIf2IkkB.jpg",WV="/assets/real-exterior-conduit-C21S4CMm.jpg",Pw="/assets/real-ev-fusebox-outdoor-BGO03T_I.jpg",qV="/assets/real-outlet-retail-parade-C-9HCXRY.jpg",KV="/assets/real-skechers-fitout-2-DprtNqyw.jpg",GV="/assets/real-old-wylex-board-CJ4-CUbB.jpg",ZV="/assets/real-ev-supply-board-Bge0RN6k.jpg",JV="/assets/real-ev-charger-bungalow-DLApA-Yp.jpg",QV="/assets/real-ses-van-depot-BMScL4cQ.jpg",YV="/assets/real-ses-van-office-CeU32ewt.jpg",XV="/assets/real-van-barn-frost-iEu9kbAK.jpg",eF="/assets/real-commercial-lighting-data-YSJxIhVE.png",OE=[{slug:"clintons-yankee-candle-retail-fit-out",title:"Retail Fit-Out: Clintons & Yankee Candle",category:"Commercial",location:"Cotswold Designer Outlet",partners:"C-Inside and ID Shopfitting",overview:"SES Hereford Ltd completed a full electrical installation for a new combined Clintons and Yankee Candle store, transforming the unit from an empty shell into a fully operational, stylish retail space.",scope:["Complete electrical fit-out","Lighting installation","Power distribution","Retail-compliant systems installation"],highlights:["Transformed empty shell to fully operational retail unit","High-traffic outlet location delivered on schedule","Collaborated with C-Inside and ID Shopfitting"],heroImage:aV,galleryImages:[lV,cV,uV,$V,qV]},{slug:"skechers-store-fit-out",title:"Skechers Store Fit-Out",category:"Commercial",location:"Town Centre Retail Unit",overview:"Full electrical and lighting installation for a new Skechers retail store, including feature LED display lighting, track lighting, power distribution and air-conditioning power supplies.",scope:["Track lighting and feature LED installation","Display unit power feeds","Air-conditioning isolators and power","Final testing and certification"],highlights:["Delivered ahead of store opening","Clean, retail-grade finish","Coordinated with national shopfitting team"],heroImage:VV,galleryImages:[Cw,Aw,KV,eF]},{slug:"retail-fit-out-shopping-centre",title:"Retail Fit-Out — Shopping Centre Unit",category:"Commercial",location:"Herefordshire",overview:"Complete electrical first-fix and second-fix for a large retail unit, including full LED track lighting, slatwall display power, air-conditioning supplies and stockroom installation.",scope:["LED track lighting installation","Slatwall and display power","Stockroom power and lighting","Air-conditioning supplies","Final certification"],highlights:["Bright, even lighting across full retail floor","Herringbone-floor friendly cable management","Delivered to tight handover deadline"],heroImage:Aw,galleryImages:[Cw]},{slug:"bus-shelter-electrical-hereford",title:"Hereford Bus Station — Shelter Electrical Works",category:"Commercial",location:"Hereford",overview:"Power and lighting installation for the green-roofed passenger shelters at Hereford bus station, including illuminated timetable panels and integrated lighting.",scope:["Mains supply to 
222shelter units","Integrated LED shelter lighting","Illuminated timetable display power","External-rated installation"],highlights:["Robust IP-rated installation","Public realm specification","Improved passenger safety after dark"],heroImage:bV,galleryImages:[vV]},{slug:"abb-outdoor-distribution-cabinet",title:"ABB Outdoor Distribution Cabinet",category:"Commercial",location:"Herefordshire",overview:"Installation of an outdoor ABB distribution panel for a commercial site, delivering robust, weatherproof power distribution with full isolation and safety labelling.",scope:["IP-rated outdoor enclosure","ABB switchgear installation","Cable terminations and labelling","Test and commissioning"],highlights:["Compliant with BS 7671 latest amendment","Future-expansion capacity","Full handover documentation"],heroImage:RV,galleryImages:[DV,QV,YV]},{slug:"leisure-site-electrical-maintenance",title:"Leisure Site Electrical Maintenance",category:"Commercial",location:"Riverside Leisure Site, Herefordshire",overview:"Ongoing electrical maintenance and reactive call-outs across a multi-pitch leisure site, keeping facilities safe, compliant and operational year-round.",scope:["Periodic inspection and testing","Reactive maintenance call-out
222s","External lighting upgrades","Site power upgrades"],highlights:["Multi-van team on site","Minimal disruption to guests","Maintained compliance documentation"],heroImage:jV,galleryImages:[]},{slug:"ev-charger-installation-bodenham",title:"EV Charger Installation – Bodenham",category:"Renewable",location:"Bodenham",overview:"Installation of a Zappi 7kW EV charger with upgraded electrical infrastructure to safely support increased load demand. EV charging installations completed to the highest electrical safety standards.",scope:["New consumer unit installed in carport","New supply run approximately 40m from main house","Groundworks completed","Full testing and commissioning"],highlights:["Safe, compliant EV charging solution","Tailored to client requirements","40m supply run with full groundworks","Completed to the highest electrical safety standards"],heroImage:hV,galleryImages:[dV,fV,pV,Tw,Pw,JV]},{slug:"zappi-ev-charger-garage-install",title:"Zappi EV Charger — Garage Installation",category:"Renewable",location:"Hereford",overview:"Wall-mounted myenergi Zappi charger installed in the customer's garage with dedicated EV consumer unit, surge protection and clean cable management.",scope:["Dedicated EV-rated consumer unit","Type A RCBO with surge protection","myenergi Zappi 7kW unit","Full OZEV-style certification"],highlights:["Smart solar-aware EV charging","Tidy, professional installation","Future-ready for solar integration"],heroImage:Tw,galleryImages:[Ew,Pw,ZV]},{slug:"solar-pv-battery-storage-domestic",title:"Solar PV & Huawei Battery Storage",category:"Renewable",location:"Herefordshire",overview:"Full-roof solar PV array with Huawei hybrid inverter and battery storage system, branded SES, delivering long-term energy independence for a domestic customer.",scope:["All-black solar PV array","Huawei hybrid inverter installation","Battery storage system","Isolators, surge protection and DC-side compliance","MCS certification and DNO notification"],highlights:["MCS-certified installation","Battery-ready hybrid system","Smart energy monitoring","Reduced grid dependence"],heroImage:kw,galleryImages:[SV,TV,CV,xV,EV]},{slug:"solar-pv-new-build-barn",title:"Solar PV — New Build Barn-Style Home",category:"Renewable",location:"Rural Herefordshire",overview:"Roof-integrated solar PV with Huawei hybrid inverter installed during the build phase of a contemporary timber-clad home, allowing fully concealed cable runs.",scope:["Pre-construction PV planning","Concealed first-fix cabling","Huawei hybrid inverter in plant room","DC isolators and SES-branded labelling","Commissioning and handover"],highlights:["Architecturally integrated install","Minimal visible cabling","Future battery upgrade ready"],heroImage:AV,galleryImages:[PV,kw]},{slug:"residential-electrical-works-broomy-hill",title:"Residential Electrical Works – Broomy Hill",category:"Residential",location:"Broomy Hill",overview:"Electrical services delivered to residential clients with exceptional feedback regarding quality and professionalism.",scope:["Electrical installations","Repairs","Safety inspections"],highlights:["Exceptional client feedback on quality","Professional, tidy workmanship","Comprehensive safety inspections completed"],testimonial:"Work completed to a very high standard. Friendly, professional, and tidy. Would highly recommend SES to anyone.",heroImage:mV,galleryImages:[gV,IV,XV]},{slug:"consumer-unit-upgrade-fusebox",title:"Consumer Unit Upgrade — Bi-Directional FuseBox",category:"Residential",location:"Hereford",overview:"Replacement of a legacy MK Sentry consumer unit with a modern 18th-Edition FuseBox board featuring full RCBO protection, surge protection and solar/EV-ready bi-directional terminals.",scope:["Removal of legacy MK Sentry board","Install of FuseBox 18th-Edition consumer unit","RCBO-per-circuit protection","SPD (surge protection device)","Bi-directional terminals for solar/EV","Full circuit testing and EICR"],highlights:["Latest BS 7671 amendment compliant","Surge and transient protection","Solar / EV-ready","Tidy, labelled installation"],heroImage:yV,galleryImages:[OV,FV,Ew,GV]},{slug:"kitchen-rewire-feature-pendants",title:"Kitchen Rewire & Feature Pendant Lighting",category:"Residential",location:"Herefordshire",overview:"Full kitchen-diner electrical refit including feature pendant lighting over the island, recessed downlights, induction hob supply and exposed-brick wall sockets.",scope:["New circuits for induction hob and ovens","Three-pendant feature lighting over island","Recessed LED downlights","Exposed-brick wall socket installation","Fan/extractor isolators"],highlights:["Architecturally sympathetic finish","Warm-glow pendant feature","Compliant with kitchen zone regulations"],heroImage:_V,galleryImages:[MV,kV,LV]},{slug:"communal-stairwell-lighting-upgrade",title:"Communal Stairwell Lighting Upgrade",category:"Residential",location:"Hereford Town Centre",overview:"Replacement emergency-rated bulkhead lighting and smoke detection upgrade for a residential communal stairwell, improving safety for tenants.",scope:["Emergency-rated LED bulkheads","Linked smoke detection","New switching arrangement","Test and certification"],highlights:["Maintained-emergency lighting","Tenant-safety compliant","Long-life LED fittings"],heroImage:wV,galleryImages:[]},{slug:"downlight-installation-hallway",title:"Downlight Installation & Ceiling Repair",category:"Residential",location:"Hereford",overview:"Installation of recessed LED downlights through a previously un-lit ceiling, with full ceiling repair and redecoration coordination.",scope:["Cable runs above existing ceiling","Fire-rated LED downlights","Ceiling access and repair","Switching and dimming"],highlights:["Fire-rated, IP-rated fittings","Minimal disruption","Clean ceiling reinstatement"],heroImage:UV,galleryImages:[zV]},{slug:"external-lighting-power-installation",title:"External Lighting & Outdoor Power",category:"Residential",location:"Hereford",overview:"Outdoor wall-pack lighting, weatherproof sockets and tidy external 
222conduit runs for a domestic property — improving security and outdoor usability.",scope:["IP-rated wall-pack lighting","Weatherproof external sockets","Surface conduit cable management","PIR-controlled switching"],highlights:["Discrete, paint-friendly conduit","Dusk-to-dawn security lighting","Garden-ready power"],heroImage:BV,galleryImages:[WV,HV]},{slug:"socket-installation-fault-finding",title:"Socket Installation & Fault Finding",category:"Residential",location:"Herefordshire",overview:"Reactive call-out for fault finding on a domestic ring final circuit, followed by replacement of damaged sockets and re-termination of cabling beneath floorboards.",scope:["Live fault finding","Floorboard lift and re-termination","Replacement socket outlets","Insulation-resistance testing"],highlights:["Same-day diagnosis","Tidy reinstatement","Minor Works Certificate issued"],heroImage:NV,galleryImages:[]}],Q3=t=>OE.find(e=>e.slug===t),tF=OE.slice(0,3),nF=()=>h.jsx("section",{className:"py-20 bg-background overflow-hidden",children:h.jsxs("div",{className:"container mx-auto px-4",children:[h.jsx(dd,{children:h.jsxs("div",{className:"flex flex-col md:flex-row md:items-end md:justify-between mb-12 gap-4",children:[h.jsxs("div",{children:[h.jsx(pd,{className:"mx-0"}),h.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Featured Projects"}),h.jsx("p",{className:"text-muted-foreground max-w-xl",children:"Real work, real results. Explore our latest case studies across commercial, renewable, and residential sectors."})]}),h.jsx(Y,{to:"/projects",children:h.jsxs(Je,{variant:"outline",className:"gap-2 transition-transform hover:scale-105",children:["View All Projects",h.jsx(co,{className:"h-4 w-4"})]})})]})}),h.jsx(hd,{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:tF.map(t=>h.jsx(fd,{children:h.jsx(Y,{to:`/projects/${t.slug}`,children:h.jsxs(Dg,{className:"group overflow-hidden border-border/50 hover:shadow-xl hover:shadow-accent/5 transition-all duration-300 h-full cursor-pointer",children:[h.jsxs("div",{className:"aspect-[16/10] overflow-hidden bg-muted relative",children:[h.jsx("img",{loading:"lazy",decoding:"async",src:t.heroImage,alt:t.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),h.jsx("span",{className:"absolute top-3 left-3 px-3 py-1 rounded-full text-xs font-semibold bg-accent text-accent-foreground",children:t.category})]}),h.jsxs(Mg,{className:"p-5",children:[h.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2 group-hover:text-accent transition-colors",children:t.title}),h.jsx("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2",children:t.overview}),h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[h.jsx(Ju,{className:"h-3 w-3"})," ",t.location]}),h.jsxs("span",{className:"text-xs font-medium text-accent flex items-center gap-1 group-hover:gap-2 transition-all",children:["View Project ",h.jsx(co,{className:"h-3 w-3"})]})]})]})]})})},t.slug))})]})});var pe;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.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},t.find=(s,i)=>{for(const o of s)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(pe||(pe={}));var Rw;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Rw||(Rw={}));const W=pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Pr=t=>{switch(typeof t){case"undefined":return W.undefined;case"string":return W.string;case"number":return Number.isNaN(t)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":return Array.isArray(t)?W.array:t===null?W.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?W.promise:typeof Map<"u"&&t instanceof Map?W.map:typeof Set<"u"&&t instanceof Set?W.set:typeof Date<"u"&&t instanceof Date?W.date:W.object;default:return W.unknown}}
vendor: 4,685 bytes, line 222
222,I=pe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class fr extends Error{get errors(){return this.issues}constructor(e){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=e}format(e){const n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),r}static assert(e){if(!(e instanceof fr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,pe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];n[i]=n[i]||[],n[i].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}fr.create=t=>new fr(t);const yp=(t,e)=>{let n;switch(t.code){case I.invalid_type:t.received===W.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case I.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,pe.jsonStringifyReplacer)}`;break;case I.unrecognized_keys:n=`Unrecognized key(s) in object: ${pe.joinValues(t.keys,", ")}`;break;case I.invalid_union:n="Invalid input";break;case I.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${pe.joinValues(t.options)}`;break;case I.invalid_enum_value:n=`Invalid enum value. Expected ${pe.joinValues(t.options)}, received '${t.received}'`;break;case I.invalid_arguments:n="Invalid function arguments";break;case I.invalid_return_type:n="Invalid function return type";break;case I.invalid_date:n="Invalid date";break;case I.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:pe.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case I.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case I.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case I.custom:n="Invalid input";break;case I.invalid_intersection_types:n="Intersection results could not be merged";break;case I.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case I.not_finite:n="Number must be finite";break;default:n=e.defaultError,pe.assertNever(t)}return{message:n}};let rF=yp;function sF(){return rF}const iF=t=>
vendor: 7,202 bytes, line 222
222{const{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:e,defaultError:a}).message;return{...s,path:i,message:a}};function U(t,e){const n=sF(),r=iF({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===yp?void 0:yp].filter(s=>!!s)});t.common.issues.push(r)}class $t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return X;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return $t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return X;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:e.value,value:r}}}const X=Object.freeze({status:"aborted"}),ea=t=>({status:"dirty",value:t}),tn=t=>({status:"valid",value:t}),jw=t=>t.status==="aborted",Nw=t=>t.status==="dirty",mo=t=>t.status==="valid",vu=t=>typeof Promise<"u"&&t instanceof Promise;var q;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(q||(q={}));class ls{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ow=(t,e)=>{if(mo(e))return{success:!0,data:e.value};if(!t.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 fr(t.common.issues);return this._error=n,this._error}}};function ae(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>{const{message:l}=t;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:s}}class he{get description(){return this._def.description}_getType(e){return Pr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Pr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new $t,ctx:{common:e.parent.common,data:e.data,parsedType:Pr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(vu(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Pr(e)},s=this._parseSync({data:e,path:r.path,parent:r});return Ow(r,s)}"~validate"(e){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Pr(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return mo(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(s=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>mo(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,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:e,parsedType:Pr(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(vu(s)?s:Promise.resolve(s));return Ow(r,i)}refine(e,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=e(s),a=()=>i.addIssue({code:I.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new yo({schema:this,typeName:ee.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Xr.create(this,this._def)}nullable(){return vo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Un.create(this)}promise(){return Su.create(this,this._def)}or(e){return xu.create([this,e],this._def)}and(e){return bu.create(this,e,this._def)}transform(e){return new yo({...ae(this._def),schema:this,typeName:ee.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new wp({...ae(this._def),innerType:this,defaultValue:n,typeName:ee.ZodDefault})}brand(){return new AF({typeName:ee.ZodBranded,type:this,...ae(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new xp({...ae(this._def),innerType:this,catchValue:n,typeName:ee.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return $g.create(this,e)}readonly(){return bp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const oF=/^c[^\s-]{8,}
vendor: 4,643 bytes, line 222
222$/i,aF=/^[0-9a-z]+$/,lF=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cF=/^[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,uF=/^[a-z0-9_-]{21}$/i,dF=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hF=/^[-+]?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)?)??$/,fF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,pF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ch;const mF=/^(?:(?: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])$/,gF=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,yF=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,vF=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xF=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,IE="((\\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])))",bF=new RegExp(`^${IE}$`);function LE(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function SF(t){return new RegExp(`^${LE(t)}$`)}function _F(t){let e=`${IE}T${LE(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function kF(t,e){return!!((e==="v4"||!e)&&mF.test(t)||(e==="v6"||!e)&&yF.test(t))}function EF(t,e){if(!dF.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function TF(t,e){return!!((e==="v4"||!e)&&gF.test(t)||(e==="v6"||!e)&&vF.test(t))}class zr extends he{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==W.string){const i=this._getOrReturnCtx(e);return U(i,{code:I.invalid_type,expected:W.string,received:i.parsedType}),X}const r=new $t;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),U(s,{code:I.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),U(s,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?U(s,{code:I.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&U(s,{code:I.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")fF.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"email",code:I.invalid_string,message:i.message}),r.dirty());
vendor: 17,213 bytes, line 222
222else if(i.kind==="emoji")Ch||(Ch=new RegExp(pF,"u")),Ch.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"emoji",code:I.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")cF.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"uuid",code:I.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")uF.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"nanoid",code:I.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")oF.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"cuid",code:I.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")aF.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"cuid2",code:I.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")lF.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"ulid",code:I.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),U(s,{validation:"url",code:I.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"regex",code:I.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),U(s,{code:I.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),U(s,{code:I.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),U(s,{code:I.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?_F(i).test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{code:I.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?bF.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{code:I.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?SF(i).test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{code:I.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?hF.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"duration",code:I.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?kF(e.data,i.version)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"ip",code:I.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?EF(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"jwt",code:I.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?TF(e.data,i.version)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"cidr",code:I.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?wF.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"base64",code:I.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?xF.test(e.data)||(s=this._getOrReturnCtx(e,s),U(s,{validation:"base64url",code:I.invalid_string,message:i.message}),r.dirty()):pe.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:I.invalid_string,...q.errToObj(r)})}_addCheck(e){return new zr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...q.errToObj(e)})}url(e){return this._addCheck({kind:"url",...q.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...q.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...q.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...q.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...q.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...q.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...q.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...q.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...q.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...q.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...q.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...q.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...q.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...q.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...q.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...q.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...q.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...q.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...q.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...q.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...q.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...q.errToObj(n)})}nonempty(e){return this.min(1,q.errToObj(e))}trim(){return new zr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new zr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new zr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}zr.create=t=>new zr({checks:[],typeName:ee.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...ae(t)});function CF(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(t.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return i%o/10**s}class Ja extends he{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==W.number){const i=this._getOrReturnCtx(e);return U(i,{code:I.invalid_type,expected:W.number,received:i.parsedType}),X}let r;const s=new $t;for(const i of this._def.checks)i.kind==="int"?pe.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),U(r,{code:I.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),U(r,{code:I.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),U(r,{code:I.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?CF(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),U(r,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),U(r,{code:I.not_finite,message:i.message}),s.dirty()):pe.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,q.toString(n))}gt(e,n){return this.setLimit("min",e,!1,q.toString(n))}lte(e,n){return this.setLimit("max",e,!0,q.toString(n))}lt(e,n){return this.setLimit("max",e,!1,q.toString(n))}setLimit(e,n,r,s){return new Ja({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:q.toString(s)}]})}_addCheck(e){return new Ja({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:q.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:q.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:q.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:q.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:q.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:q.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&pe.isInteger(e.value))}get isFinite(){let e=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"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Ja.create=t=>new Ja({checks:[],typeName:ee.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ae(t)});class Qa extends he{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==W.bigint)return this._getInvalidInput(e);let r;const s=new $t;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),U(r,{code:I.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),U(r,{code:I.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),U(r,{code:I.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):pe.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return U(n,{code:I.invalid_type,expected:W.bigint,received:n.parsedType}),X}gte(e,n){return this.setLimit("min",e,!0,q.toString(n))}gt(e,n){return this.setLimit("min",e,!1,q.toString(n))}lte(e,n){return this.setLimit("max",e,!0,q.toString(n))}lt(e,n){return this.setLimit("max",e,!1,q.toString(n))}setLimit(e,n,r,s){return new Qa({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:q.toString(s)}]})}_addCheck(e){return new Qa({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:q.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:q.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Qa.create=t=>new Qa({checks:[],typeName:ee.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...ae(t)});class Iw extends he{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==W.boolean){const r=this._getOrReturnCtx(e);return U(r,{code:I.invalid_type,expected:W.boolean,received:r.parsedType}),X}return tn(e.data)}}Iw.create=t=>new Iw({typeName:ee.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ae(t)});class wu extends he{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==W.date){const i=this._getOrReturnCtx(e);return U(i,{code:I.invalid_type,expected:W.date,received:i.parsedType}),X}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return U(i,{code:I.invalid_date}),X}const r=new $t;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),U(s,{code:I.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),U(s,{code:I.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):pe.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new wu({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:q.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:q.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}wu.create=t=>new wu({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ee.ZodDate,...ae(t)});class Lw extends he{_parse(e){if(this._getType(e)!==W.symbol){const r=this._getOrReturnCtx(e);return U(r,{code:I.invalid_type,expected:W.symbol,received:r.parsedType}),X}return tn(e.data)}}Lw.create=t=>new Lw({typeName:ee.ZodSymbol,...ae(t)});class Dw extends he{_parse(e){if(this._getType(e)!==W.undefined){const r=this._getOrReturnCtx(e);return U(r,{code:I.invalid_type,expected:W.undefined,received:r.parsedType}),X}return tn(e.data)}}Dw.create=t=>new Dw({typeName:ee.ZodUndefined,...ae(t)});class Mw extends he{_parse(e){if(this._getType(e)!==W.null){const r=this._getOrReturnCtx(e);return U(r,{code:I.invalid_type,expected:W.null,received:r.parsedType}),X}return tn(e.data)}}Mw.create=t=>new Mw({typeName:ee.ZodNull,...ae(t)});class $w extends he{constructor(){super(...arguments),this._any=!0}_parse(e){return tn(e.data)}}$w.create=t=>new $w({typeName:ee.ZodAny,...ae(t)});class Vw extends he{constructor(){super(...arguments),this._unknown=!0}_parse(e){return tn(e.data)}}Vw.create=t=>new Vw({typeName:ee.ZodUnknown,...ae(t)});class cs extends he{_parse(e){const n=this._getOrReturnCtx(e);return U(n,{code:I.invalid_type,expected:W.never,received:n.parsedType}),X}}cs.create=t=>new cs({typeName:ee.ZodNever,...ae(t)});class Fw extends he{_parse(e){if(this._getType(e)!==W.undefined){const r=this._getOrReturnCtx(e);return U(r,{code:I.invalid_type,expected:W.void,received:r.parsedType}),X}return tn(e.data)}}Fw.create=t=>new Fw({typeName:ee.ZodVoid,...ae(t)});class Un extends he{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==W.array)return U(n,{code:I.invalid_type,expected:W.array,received:n.parsedType}),X;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(U(n,{code:o?I.too_big:I.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&&(U(n,{code:I.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&&(U(n,{code:I.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 ls(n,o,n.path,a)))).then(o=>$t.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new ls(n,o,n.path,a)));return $t.mergeArray(r,i)}
vendor: 5,073 bytes, line 222
222get element(){return this._def.type}min(e,n){return new Un({...this._def,minLength:{value:e,message:q.toString(n)}})}max(e,n){return new Un({...this._def,maxLength:{value:e,message:q.toString(n)}})}length(e,n){return new Un({...this._def,exactLength:{value:e,message:q.toString(n)}})}nonempty(e){return this.min(1,e)}}Un.create=(t,e)=>new Un({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ee.ZodArray,...ae(e)});function pi(t){if(t instanceof Le){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Xr.create(pi(r))}return new Le({...t._def,shape:()=>e})}else return t instanceof Un?new Un({...t._def,type:pi(t.element)}):t instanceof Xr?Xr.create(pi(t.unwrap())):t instanceof vo?vo.create(pi(t.unwrap())):t instanceof Qs?Qs.create(t.items.map(e=>pi(e))):t}class Le extends he{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=pe.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==W.object){const c=this._getOrReturnCtx(e);return U(c,{code:I.invalid_type,expected:W.object,received:c.parsedType}),X}const{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof cs&&this._def.unknownKeys==="strip"))for(const c in s.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=i[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ls(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof cs){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")a.length>0&&(U(s,{code:I.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ls(s,d,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>$t.mergeObjectSync(r,c)):$t.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return q.errToObj,new Le({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:q.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new Le({...this._def,unknownKeys:"strip"})}passthrough(){return new Le({...this._def,unknownKeys:"passthrough"})}extend(e){return new Le({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Le({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ee.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Le({...this._def,catchall:e})}pick(e){const n={};for(const r of pe.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Le({...this._def,shape:()=>n})}omit(e){const n={};for(const r of pe.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new Le({...this._def,shape:()=>n})}deepPartial(){return pi(this)}partial(e){const n={};for(const r of pe.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new Le({...this._def,shape:()=>n})}required(e){const n={};for(const r of pe.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Xr;)i=i._def.innerType;n[r]=i}return new Le({...this._def,shape:()=>n})}keyof(){return DE(pe.objectKeys(this.shape))}}Le.create=(t,e)=>new Le({shape:()=>t,unknownKeys:"strip",catchall:cs.create(),typeName:ee.ZodObject,...ae(e)});Le.strictCreate=(t,e)=>new Le({shape:()=>t,unknownKeys:"strict",catchall:cs.create(),typeName:ee.ZodObject,...ae(e)});Le.lazycreate=(t,e)=>new Le({shape:t,unknownKeys:"strip",catchall:cs.create(),typeName:ee.ZodObject,...ae(e)});class xu extends he{_parse(e){const{ctx:n}=this._processInputParams(e),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 fr(a.ctx.common.issues));return U(n,{code:I.invalid_union,unionErrors:o}),X}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;
vendor: 4,999 bytes, line 222
222const a=o.map(l=>new fr(l));return U(n,{code:I.invalid_union,unionErrors:a}),X}}get options(){return this._def.options}}xu.create=(t,e)=>new xu({options:t,typeName:ee.ZodUnion,...ae(e)});function vp(t,e){const n=Pr(t),r=Pr(e);if(t===e)return{valid:!0,data:t};if(n===W.object&&r===W.object){const s=pe.objectKeys(e),i=pe.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(const a of i){const l=vp(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===W.array&&r===W.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],a=e[i],l=vp(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===W.date&&r===W.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class bu extends he{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(i,o)=>{if(jw(i)||jw(o))return X;const a=vp(i.value,o.value);return a.valid?((Nw(i)||Nw(o))&&n.dirty(),{status:n.value,value:a.data}):(U(r,{code:I.invalid_intersection_types}),X)};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}))}}bu.create=(t,e,n)=>new bu({left:t,right:e,typeName:ee.ZodIntersection,...ae(n)});class Qs extends he{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.array)return U(r,{code:I.invalid_type,expected:W.array,received:r.parsedType}),X;if(r.data.length<this._def.items.length)return U(r,{code:I.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),X;!this._def.rest&&r.data.length>this._def.items.length&&(U(r,{code:I.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 ls(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>$t.mergeArray(n,o)):$t.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new Qs({...this._def,rest:e})}}Qs.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qs({items:t,typeName:ee.ZodTuple,rest:null,...ae(e)})};class Uw extends he{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.map)return U(r,{code:I.invalid_type,expected:W.map,received:r.parsedType}),X;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],c)=>({key:s._parse(new ls(r,a,r.path,[c,"key"])),value:i._parse(new ls(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return X;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return X;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Uw.create=(t,e,n)=>new Uw({valueType:e,keyType:t,typeName:ee.ZodMap,...ae(n)});class Ya extends he{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==W.set)return U(r,{code:I.invalid_type,expected:W.set,received:r.parsedType}),X;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(U(r,{code:I.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&&(U(r,{code:I.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return X;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new ls(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,n){return new Ya({...this._def,minSize:{value:e,message:q.toString(n)}})}max(e,n){return new Ya({...this._def,maxSize:{value:e,message:q.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Ya.create=(t,e)=>new Ya({valueType:t,minSize:null,maxSize:null,typeName:ee.ZodSet,...ae(e)});class Bw extends he{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Bw.create=(t,e)=>new Bw({getter:t,typeName:ee.ZodLazy,...ae(e)});class zw extends he{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return U(n,{received:n.data,code:I.invalid_literal,expected:this._def.value}),X}
vendor: 5,353 bytes, line 222
222return{status:"valid",value:e.data}}get value(){return this._def.value}}zw.create=(t,e)=>new zw({value:t,typeName:ee.ZodLiteral,...ae(e)});function DE(t,e){return new go({values:t,typeName:ee.ZodEnum,...ae(e)})}class go extends he{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return U(n,{expected:pe.joinValues(r),received:n.parsedType,code:I.invalid_type}),X}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return U(n,{received:n.data,code:I.invalid_enum_value,options:r}),X}return tn(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return go.create(e,{...this._def,...n})}exclude(e,n=this._def){return go.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}go.create=DE;class Hw extends he{_parse(e){const n=pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==W.string&&r.parsedType!==W.number){const s=pe.objectValues(n);return U(r,{expected:pe.joinValues(s),received:r.parsedType,code:I.invalid_type}),X}if(this._cache||(this._cache=new Set(pe.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=pe.objectValues(n);return U(r,{received:r.data,code:I.invalid_enum_value,options:s}),X}return tn(e.data)}get enum(){return this._def.values}}Hw.create=(t,e)=>new Hw({values:t,typeName:ee.ZodNativeEnum,...ae(e)});class Su extends he{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==W.promise&&n.common.async===!1)return U(n,{code:I.invalid_type,expected:W.promise,received:n.parsedType}),X;const r=n.parsedType===W.promise?n.data:Promise.resolve(n.data);return tn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Su.create=(t,e)=>new Su({type:t,typeName:ee.ZodPromise,...ae(e)});class yo extends he{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{U(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 X;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?X:l.status==="dirty"||n.value==="dirty"?ea(l.value):l});{if(n.value==="aborted")return X;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?X:a.status==="dirty"||n.value==="dirty"?ea(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"?X:(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"?X:(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(!mo(o))return X;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=>mo(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):X);pe.assertNever(s)}}yo.create=(t,e,n)=>new yo({schema:t,typeName:ee.ZodEffects,effect:e,...ae(n)});yo.createWithPreprocess=(t,e,n)=>new yo({schema:e,effect:{type:"preprocess",transform:t},typeName:ee.ZodEffects,...ae(n)});class Xr extends he{_parse(e){return this._getType(e)===W.undefined?tn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Xr.create=(t,e)=>new Xr({innerType:t,typeName:ee.ZodOptional,...ae(e)});class vo extends he{_parse(e){return this._getType(e)===W.null?tn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}vo.create=(t,e)=>new vo({innerType:t,typeName:ee.ZodNullable,...ae(e)});class wp extends he{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===W.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}wp.create=(t,e)=>new wp({innerType:t,typeName:ee.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ae(e)});class xp extends he{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return vu(s)?s.then(i=>
vendor: 3,511 bytes, line 222
222({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new fr(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new fr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}xp.create=(t,e)=>new xp({innerType:t,typeName:ee.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ae(e)});class Ww extends he{_parse(e){if(this._getType(e)!==W.nan){const r=this._getOrReturnCtx(e);return U(r,{code:I.invalid_type,expected:W.nan,received:r.parsedType}),X}return{status:"valid",value:e.data}}}Ww.create=t=>new Ww({typeName:ee.ZodNaN,...ae(t)});class AF extends he{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class $g extends he{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);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"?X:i.status==="dirty"?(n.dirty(),ea(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"?X:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new $g({in:e,out:n,typeName:ee.ZodPipeline})}}class bp extends he{_parse(e){const n=this._def.innerType._parse(e),r=s=>(mo(s)&&(s.value=Object.freeze(s.value)),s);return vu(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}bp.create=(t,e)=>new bp({innerType:t,typeName:ee.ZodReadonly,...ae(e)});Le.lazycreate;var ee;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ee||(ee={}));const li=zr.create;cs.create;Un.create;const PF=Le.create;Le.strictCreate;xu.create;bu.create;Qs.create;go.create;Su.create;Xr.create;vo.create;const Nc=x.forwardRef(({className:t,type:e,...n},r)=>h.jsx("input",{type:e,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",t),ref:r,...n}));Nc.displayName="Input";const ME=x.forwardRef(({className:t,...e},n)=>h.jsx("textarea",{className:we("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
222ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...e}));ME.displayName="Textarea";var RF="Label",$E=x.forwardRef((t,e)=>h.jsx(Ke.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));$E.displayName=RF;var VE=$E;const jF=Lm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ts=x.forwardRef(({className:t,...e},n)=>h.jsx(VE,{ref:n,className:we(jF(),t),...e}));Ts.displayName=VE.displayName;function NF(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}const OF=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Vg extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class IF extends Vg{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class qw extends Vg{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Kw extends Vg{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Sp;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Sp||(Sp={}));class LF{constructor(e,{headers:n={},customFetch:r,region:s=Sp.Any}={}){this.url=e,this.headers=n,this.region=s,this.fetch=OF(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return NF(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:d}=r;let f={},{region:p}=r;p||(p=this.region);const v=new URL(`${this.url}/${n}`);p&&p!=="any"&&(f["x-region"]=p,v.searchParams.set("forceFunctionRegion",p));let w;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",w=c):typeof c=="string"?(f["Content-Type"]="text/plain",w=c):typeof FormData<"u"&&c instanceof FormData?w=c:(f["Content-Type"]="application/json",w=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?w=JSON.stringify(c):w=c;let b=u;d&&(o=new AbortController,i=setTimeout(()=>o.abort(),d),u?(b=o.signal,u.addEventListener("abort",()=>o.abort())):b=o.signal);const y=yield this.fetch(v.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:w,signal:b}).catch(_=>{throw new IF(_)}),m=y.headers.get("x-relay-error");if(m&&m==="true")throw new qw(y);if(!y.ok)throw new Kw(y);let g=((s=y.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return g==="application/json"?S=yield y.json():g==="application/octet-stream"||g==="application/pdf"?S=yield y.blob():g==="text/event-stream"?S=y:g==="multipart/form-data"?S=yield y.formData():S=yield y.text(),{data:S,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof Kw||a instanceof qw?a.context:void 0}}finally{i&&clearTimeout(i)}})}}const FE=3,Gw=t=>Math.min(1e3*2**t,3e4),DF=[520,503],UE=["GET","HEAD","OPTIONS"];var MF=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
222de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function Zw(t,e){return new Promise(n=>{if(e!=null&&e.aborted){n();return}const r=setTimeout(()=>{e==null||e.removeEventListener("abort",s),n()},t);function s(){clearTimeout(r),n()}e==null||e.addEventListener("abort",s)})}function $F(t,e,n,r){return!(!r||n>=FE||!UE.includes(t)||!DF.includes(e))}var VF=class{constructor(t){var e,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=t.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const c=new Headers(n.headers);o>0&&c.set("X-Retry-Count",String(o));let u;try{u=await r(n.url.toString(),{method:n.method,headers:c,body:JSON.stringify(n.body,(d,f)=>typeof f=="bigint"?f.toString():f),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!UE.includes(n.method))throw d;if(n.retryEnabled&&o<FE){const f=Gw(o);o++,await Zw(f,n.signal);continue}throw d}if($F(n.method,u.status,o,n.retryEnabled)){var a,l;const d=(a=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,f=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:Gw(o);await u.text(),o++,await Zw(f,n.signal);continue}return await n.processResponse(u)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",c="",u="";const d=o==null?void 0:o.cause;if(d){var f,p,v,w;const m=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",g=(p=d==null?void 0:d.code)!==null&&p!==void 0?p:"";l=`${(v=o==null?void 0:o.name)!==null&&v!==void 0?v:"FetchError"}: ${o==null?void 0:o.message}`,l+=`
223
224Caused by: ${(w=d==null?void 0:d.name)!==null&&w!==void 0?w:"Error"}: ${m}`,g&&(l+=` (${g})`),d!=null&&d.stack&&(l+=`
225${d.stack}`)}else{var b;l=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const y=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",y>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",y>this.urlLengthLimit&&(c+=`. Your request URL is ${y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
225)),i.then(t,e)}async processResponse(t){var e=this;let n=null,r=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var c;const f=await t.text();f===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((c=e.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?r=f:r=JSON.parse(f))}const u=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),d=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&d&&d.length>1&&(s=parseInt(d[1])),e.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,o="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const u=await t.text();try{n=JSON.parse(u),Array.isArray(n)&&t.status===404&&(r=[],n=null,i=200,o="OK")}catch{t.status===404&&u===""?(i=204,o="No Content"):n={message:u}}if(n&&e.shouldThrowOnError)throw new MF(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},FF=class extends VF{select(t){let e=!1;const n=(t??"*").split("").map(r=>/\s/.test(r)&&!e?"":(r==='"'&&(e=!e),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${t}.${e?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:n=e}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,e,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const Jw=new RegExp("[,()]");var mi=class extends FF{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&Jw.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}notIn(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&Jw.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`not.in.(${n})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,n])=>
225n!==void 0).forEach(([e,n])=>{this.url.searchParams.append(e,`eq.${n}`)}),this}not(t,e,n){return this.url.searchParams.append(t,`not.${e}.${n}`),this}or(t,{foreignTable:e,referencedTable:n=e}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,e,n){return this.url.searchParams.append(t,`${e}.${n}`),this}},UF=class{constructor(t,{headers:e={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:n=!1,count:r}=e??{},s=n?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new mi({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),n||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>
2250){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new mi({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);a.searchParams.set("columns",u.join(","))}}return new mi({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new mi({method:r,url:s,headers:i,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new mi({method:n,url:r,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Xa(t){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xa(t)}function BF(t,e){if(Xa(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Xa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zF(t){var e=BF(t,"string");return Xa(e)=="symbol"?e:e+""}function HF(t,e,n){return(e=zF(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function tc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Qw(Object(n),!0).forEach(function(r){HF(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qw(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var WF=class BE{constructor(e,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),i),p=u==null?void 0:u.signal;if(p){if(p.aborted)return clearTimeout(f),l(c,u);const v=()=>{clearTimeout(f),d.abort()};return p.addEventListener("abort",v,{once:!0}),l(c,tc(tc({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(f),p.removeEventListener("abort",v)})}return l(c,tc(tc({},u),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new UF(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new BE(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let c;const u=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(u)),d=r&&Object.values(n).some(u);d?(a="POST",c=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([p,v])=>v!==void 0).map(([p,v])=>[p,Array.isArray(v)?`{${v.join(",")}}`:`${v}
225`]).forEach(([p,v])=>{l.searchParams.append(p,v)})):(a="POST",c=n);const f=new Headers(this.headers);return d?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new mi({method:a,url:l,headers:f,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class qF{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node){const o=i.node,a=parseInt(o.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
226import ws from "ws"
227new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=`
228
229Suggested solution: ${e.workaround}`),new Error(n)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const KF="2.105.4",GF=`realtime-js/${KF}`,ZF="1.0.0",zE="2.0.0",JF=zE,QF=1e4,YF=100,Nr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},HE={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},_p={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class XF{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,n){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(e));let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(e){var n;return this._isArrayBuffer((n=e.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,n,r){var s,i;const o=e.topic,a=(s=e.ref)!==null&&s!==void 0?s:"",l=(i=e.join_ref)!==null&&i!==void 0?i:"",c=e.payload.event,u=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+d.length,p=new ArrayBuffer(this.HEADER_LENGTH+f);let v=new DataView(p),w=0;v.setUint8(w++,this.KINDS.userBroadcastPush),v.setUint8(w++,l.length),v.setUint8(w++,a.length),v.setUint8(w++,o.length),v.setUint8(w++,c.length),v.setUint8(w++,d.length),v.setUint8(w++,n),Array.from(l,y=>
229v.setUint8(w++,y.charCodeAt(0))),Array.from(a,y=>v.setUint8(w++,y.charCodeAt(0))),Array.from(o,y=>v.setUint8(w++,y.charCodeAt(0))),Array.from(c,y=>v.setUint8(w++,y.charCodeAt(0))),Array.from(d,y=>v.setUint8(w++,y.charCodeAt(0)));var b=new Uint8Array(p.byteLength+r.byteLength);return b.set(new Uint8Array(p),0),b.set(new Uint8Array(r),p.byteLength),b.buffer}decode(e,n){if(this._isArrayBuffer(e)){let r=this._binaryDecode(e);return n(r)}if(typeof e=="string"){const r=JSON.parse(e),[s,i,o,a,l]=r;return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(e){const n=new DataView(e),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,n,s)}}_decodeUserBroadcast(e,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(e.slice(l,l+s));l=l+s;const u=r.decode(e.slice(l,l+i));l=l+i;const d=r.decode(e.slice(l,l+o));l=l+o;const f=e.slice(l,e.byteLength),p=a===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,v={type:this.BROADCAST_EVENT,event:u,payload:p};return o>0&&(v.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:v}}_isArrayBuffer(e){var n;return e instanceof ArrayBuffer||((n=e==null?void 0:e.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(e,n){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([r])=>n.includes(r)))}}var ve;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(ve||(ve={}));const Yw=(t,e,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=e5(o,t,e,s),i),{}):{}},e5=(t,e,n,r)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=n[t];return i&&!r.includes(i)?WE(i,o):kp(o)},WE=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return s5(e,n)}switch(t){case ve.bool:return t5(e);
vendor: 8,290 bytes, line 229
229case ve.float4:case ve.float8:case ve.int2:case ve.int4:case ve.int8:case ve.numeric:case ve.oid:return n5(e);case ve.json:case ve.jsonb:return r5(e);case ve.timestamp:return i5(e);case ve.abstime:case ve.date:case ve.daterange:case ve.int4range:case ve.int8range:case ve.money:case ve.reltime:case ve.text:case ve.time:case ve.timestamptz:case ve.timetz:case ve.tsrange:case ve.tstzrange:return kp(e);default:return kp(e)}},kp=t=>t,t5=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},n5=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},r5=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},s5=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let i;const o=t.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>WE(e,a))}return t},i5=t=>typeof t=="string"?t.replace(" ","T"):t,qE=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var ya=t=>typeof t=="function"?t:function(){return t},o5=typeof self<"u"?self:null,gi=typeof window<"u"?window:null,Rn=o5||gi||globalThis,a5="2.0.0",l5=1e4,c5=1e3,In={connecting:0,open:1,closing:2,closed:3},_t={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Qn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Ep={longpoll:"longpoll",websocket:"websocket"},u5={complete:4},Tp="base64url.bearer.phx.",nc=class{constructor(t,e,n,r){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},KE=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},d5=class{constructor(t,e,n){this.state=_t.closed,this.topic=t,this.params=ya(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new nc(this,Qn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new KE(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=_t.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=_t.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=_t.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=_t.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new nc(this,Qn.leave,ya({}),this.timeout).send(),this.state=_t.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Qn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=_t.closed,this.bindings=[]}onClose(t){this.on(Qn.close,t)}onError(t){return this.on(Qn.error,e=>t(e))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){this.bindings=this.bindings.filter(n=>!(n.event===t&&(typeof e>"u"||e===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new nc(this,t,function(){return e},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=_t.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Qn.close,"leave")},n=new nc(this,Qn.leave,ya({}),t);return n.receive("ok",()=>e()).receive("timeout",()=>e()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}filterBindings(t,e,n){return!0}isMember(t,e,n,r){return this.topic!==t?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=_t.joining,this.joinPush.resend(t))}trigger(t,e,n,r){let s=this.onMessage(t,e,n,r);if(e&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===t&&this.filterBindings(o,e,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===_t.closed}isErrored(){return this.state===_t.errored}isJoined(){return this.state===_t.joined}isJoining(){return this.state===_t.joining}isLeaving(){return this.state===_t.leaving}},_u=class{static request(t,e,n,r,s,i,o){if(Rn.XDomainRequest){let a=new Rn.XDomainRequest;return this.xdomainRequest(a,t,e,r,s,i,o)}else if(Rn.XMLHttpRequest){let a=new Rn.XMLHttpRequest;return this.xhrRequest(a,t,e,n,r,s,i,o)}else{if(Rn.fetch&&Rn.AbortController)return this.fetchRequest(t,e,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,n,r,s,i,o){let a={method:t,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),Rn.fetch(e,a).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>o&&o(c)).catch(c=>{c.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(t,e,n,r,s,i,o){return t.timeout=s,t.open(e,n),t.onload=()=>{let a=this.parseJSON(t.responseText);o&&o(a)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(r),t}static xhrRequest(t,e,n,r,s,i,o,a){t.open(e,n,!0),t.timeout=i;
vendor: 15,325 bytes, lines 229-230
229for(let[l,c]of Object.entries(r))t.setRequestHeader(l,c);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===u5.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},o&&(t.ontimeout=o),t.send(s),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let s=e?`${e}[${r}]`:r,i=t[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},h5=t=>{let e="",n=new Uint8Array(t),r=n.byteLength;for(let s=0;s<r;s++)e+=String.fromCharCode(n[s]);return btoa(e)},ci=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Tp)&&(this.authToken=atob(e[1].slice(Tp.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=In.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Ep.websocket),"$1/"+Ep.longpoll)}endpointURL(){return _u.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,n){this.close(t,e,n),this.readyState=In.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===In.open||this.readyState===In.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:n,token:r,messages:s}=e;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=In.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(t){typeof t!="string"&&(t=h5(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(`
230`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,n){for(let s of this.reqs)s.abort();this.readyState=In.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(t,e,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=_u.request(t,this.endpointURL(),e,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},f5=class ta{constructor(e,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ta.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=ta.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=ta.syncDiff(this.state,s,i,o),a())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return ta.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,n,r,s){let i=this.clone(e),o={},a={};return this.map(i,(l,c)=>{n[l]||(a[l]=c)}),this.map(n,(l,c)=>{let u=i[l];if(u){let d=c.metas.map(w=>w.phx_ref),f=u.metas.map(w=>w.phx_ref),p=c.metas.filter(w=>f.indexOf(w.phx_ref)<0),v=u.metas.filter(w=>d.indexOf(w.phx_ref)<0);p.length>0&&(o[l]=c,o[l].metas=p),v.length>0&&(a[l]=this.clone(u),a[l].metas=v)}else o[l]=c}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(e,n,r,s){let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let c=e[a];if(e[a]=this.clone(l),c){let u=e[a].metas.map(f=>f.phx_ref),d=c.metas.filter(f=>u.indexOf(f.phx_ref)<0);e[a].metas.unshift(...d)}r(a,c,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;let u=l.metas.map(d=>d.phx_ref);c.metas=c.metas.filter(d=>u.indexOf(d.phx_ref)<0),s(a,c,l),c.metas.length===0&&delete e[a]}),e}static list(e,n){return n||(n=function(r,s){return s}),this.map(e,(r,s)=>n(r,s))}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static clone(e){return JSON.parse(JSON.stringify(e))}},rc={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,r,s,i,o]=JSON.parse(t);return e({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(t){let{join_ref:e,ref:n,event:r,topic:s,payload:i}=t,o=this.META_LENGTH+e.length+n.length+s.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,n.length),l.setUint8(c++,s.length),l.setUint8(c++,r.length),Array.from(e,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(n,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(s,d=>l.setUint8(c++,d.charCodeAt(0))),Array.from(r,d=>l.setUint8(c++,d.charCodeAt(0)));var u=new Uint8Array(a.byteLength+i.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(i),a.byteLength),u.buffer},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(t.slice(o,o+r));o=o+r;let l=n.decode(t.slice(o,o+s));o=o+s;let c=n.decode(t.slice(o,o+i));o=o+i;let u=t.slice(o,t.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(t.slice(a,a+r));a=a+r;let c=n.decode(t.slice(a,a+s));a=a+s;let u=n.decode(t.slice(a,a+i));a=a+i;let d=n.decode(t.slice(a,a+o));a=a+o;let f=t.slice(a,t.byteLength),p={status:d,response:f};return{join_ref:l,ref:c,topic:u,event:Qn.reply,payload:p}},decodeBroadcast(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(t.slice(i,i+r));i=i+r;let a=n.decode(t.slice(i,i+s));i=i+s;let l=t.slice(i,t.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},p5=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||l5,this.transport=e.transport||Rn.WebSocket||ci,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=Rn&&Rn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=rc.encode.bind(rc),this.defaultDecoder=rc.decode.bind(rc),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ci?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;gi&&gi.addEventListener&&(gi.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),r=this.connectClock)}),gi.addEventListener("pageshow",s=>{r===this.connectClock&&(r=null,this.connect())}),gi.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>e.rejoinAfterMs?e.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>e.reconnectAfterMs?e.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=ya(e.params||{}),this.endPoint=`${t}/${Ep.websocket}`,this.vsn=e.vsn||a5,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new KE(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return ci}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=_u.appendParams(_u.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,n)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ya(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ci?this.connectWithFallback(ci,this.longPollFallbackMs):this.transportConnect())}log(t,e,n){this.logger&&this.logger(t,e,n)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let r=this.onMessage(s=>{s.ref===e&&(this.off([r]),t(Date.now()-n))});return!0}transportName(t){switch(t){case ci:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Tp}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(t),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,e),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,e),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),c5,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();const r=this.conn;this.waitForBufferDone(r,()=>{e?r.close(e,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,n=1){if(n===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,n+1)},150*n)}waitForSocketClosed(t,e,n=1){if(n===5||t.readyState===In.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,n+1)},150*n)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",t,e,n),(e===this.transport||n>0)&&this.triggerChanError(t)}
230triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Qn.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case In.connecting:return"connecting";case In.open:return"open";case In.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([n])=>t.indexOf(n)===-1)}channel(t,e={}){let n=new d5(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:r,ref:s,join_ref:i}=t;this.log("push",`${e} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=e;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,s,o)&&l.trigger(r,s,i,o)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([n,r])=>{try{r(...e)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}leaveOpenTopic(t){let e=this.channels.find(n=>n.topic===t&&(n.isJoined()||n.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class va{constructor(e,n){const r=g5(n);this.presence=new f5(e.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=va.onJoinPayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=va.onLeavePayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return va.transformState(this.presence.state)}static transformState(e){return e=m5(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const s=e[r];return n[r]=Oc(s),n},{})}static onJoinPayload(e,n,r){const s=Xw(n),i=Oc(r);return{event:"join",key:e,currentPresences:s,newPresences:i}}static onLeavePayload(e,n,r){const s=Xw(n),i=Oc(r);return{event:"leave",key:e,currentPresences:s,leftPresences:i}}}function Oc(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function m5(t){return JSON.parse(JSON.stringify(t))}function g5(t){return(t==null?void 0:t.events)&&{events:t.events}}function Xw(t){return t!=null&&t.metas?Oc(t):[]}var ex;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(ex||(ex={}));class y5{get state(){return this.presenceAdapter.state}constructor(e,n){this.channel=e,this.presenceAdapter=new va(this.channel.channelAdapter,n)}}function v5(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
230if(typeof e.code=="number"){const n=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${n}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class w5{constructor(e,n,r){const s=x5(r);this.channel=e.getSocket().channel(n,s),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,n){return this.channel.on(e,n)}off(e,n){this.channel.off(e,n)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,n,r){let s;try{s=this.channel.push(e,n,r)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>YF){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(e){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),e)}canPush(){return this.socket.isConnected()&&this.state===Nr.joined}isJoined(){return this.state===Nr.joined}isJoining(){return this.state===Nr.joining}isClosed(){return this.state===Nr.closed}isLeaving(){return this.state===Nr.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function x5(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var tx;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(tx||(tx={}));var Li;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Li||(Li={}));var Yn;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Yn||(Yn={}));class wa{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,n={config:{}},r){var s,i;if(this.topic=e,this.params=n,this.socket=r,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new w5(this.socket.socketAdapter,e,this.params),this.presence=new y5(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=qE(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[Li.PRESENCE]&&this.bindings[Li.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(p=>{e==null||e(Yn.CHANNEL_ERROR,v5(p))}),this._onClose(()=>e==null?void 0:e(Yn.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:p})=>{if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){e==null||e(Yn.SUBSCRIBED);return}this._updatePostgresBindings(p,e)}).receive("error",p=>{this.state=Nr.errored;const v=Object.values(p).join(", ")||"error";e==null||e(Yn.CHANNEL_ERROR,new Error(v,{cause:p}))}).receive("timeout",()=>{e==null||e(Yn.TIMED_OUT)})}return this}_updatePostgresBindings(e,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:c,schema:u,table:d,filter:f}}=l,p=e&&e[a];if(p&&p.event===c&&wa.isFilterValueEqual(p.schema,u)&&wa.isFilterValueEqual(p.table,d)&&wa.isFilterValueEqual(p.filter,f))o.push(Object.assign(Object.assign({},l),{id:p.id}));else{this.unsubscribe(),this.state=Nr.errored,n==null||n(Yn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Nr.errored&&n&&n(Yn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===Li.PRESENCE||e===Li.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,n,r)}async httpSend(e,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:n,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
230try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(e,n={}){var r,s;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c instanceof Error&&c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this.channelAdapter.push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(e,n,r){const s=e.toLocaleLowerCase(),i=this.channelAdapter.on(e,r),o={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,n,r)=>{var s,i,o,a,l,c,u;const d=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const f=(s=this.bindings[d])===null||s===void 0?void 0:s.find(p=>p.ref===e.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const p=f.id,v=(i=f.filter)===null||i===void 0?void 0:i.event;return p&&((o=n.ids)===null||o===void 0?void 0:o.includes(p))&&(v==="*"||(v==null?void 0:v.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const p=(c=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return p==="*"||p===((u=n==null?void 0:n.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(e,n){const{close:r,error:s,leave:i,join:o}=HE;return n&&[r,s,i,o].includes(e)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:c}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(s))}return n})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in e.bindings)for(const r of e.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(e,n){return(e??void 0)===(n??void 0)}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=Yw(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=Yw(e.columns,e.old_record)),n}}class b5{constructor(e,n){this.socket=new p5(e,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{e(),i("ok")},n,r)})}push(e){this.socket.push(e)}log(e,n,r){this.socket.log(e,n,r)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==_p.connecting}isDisconnecting(){return this.socket.connectionState()==_p.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const nx={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},S5=[1e3,2e3,5e3,1e4],_5=1e4;function k5(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var n;return(n=Array.from(t.keys())[e])!==null&&n!==void 0?n:null},removeItem(e){t.delete(e)},setItem(e,n){t.set(e,String(n))}}}function E5(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return k5()}const T5=`
231  addEventListener("message", (e) => {
232    if (e.data.event === "start") {
233      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
234    }
235  });`;class C5{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
235,this.ref=0,this.serializer=new XF,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new b5(e,s),this.httpEndpoint=qE(e),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const n=e.message;throw n.includes("Node.js")?new Error(`${n}
236
237To use Realtime in Node.js, you need to provide a WebSocket implementation:
238
239Option 1: Use Node.js 22+ which has native WebSocket support
240Option 2: Install and provide the "ws" package:
241
242  npm install ws
243
244  import ws from "ws"
245  const client = new RealtimeClient(url, {
246    ...options,
247    transport: ws
248  })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,n)}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return n==="ok"&&e.teardown(),n}async removeAllChannels(){const e=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(e);return await this.disconnect(),n}log(e,n,r){this.socketAdapter.log(e,n,r)}connectionState(){return this.socketAdapter.connectionState()||_p.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,n={config:{}}){const r=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new wa(`realtime:${e}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
248this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let n,r=!1;if(e)n=e,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:GF};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(HE.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${e}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(n,r)=>{n=="sent"&&this._setAuthSafely(),e&&e(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let n;if(e)n=e;else{const r=new Blob([T5],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(e){var n,r,s,i,o,a,l,c,u,d,f,p;this.worker=(n=e==null?void 0:e.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=e==null?void 0:e.accessToken)!==null&&r!==void 0?r:null;const v={};v.timeout=(s=e==null?void 0:e.timeout)!==null&&s!==void 0?s:QF,v.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:nx.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:nx.HEARTBEAT_INTERVAL),v.transport=(l=e==null?void 0:e.transport)!==null&&l!==void 0?l:qF.getWebSocketConstructor(),v.params=e==null?void 0:e.params,v.logger=e==null?void 0:e.logger,v.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),v.sessionStorage=(c=e==null?void 0:e.sessionStorage)!==null&&c!==void 0?c:E5(),v.reconnectAfterMs=(u=e==null?void 0:e.reconnectAfterMs)!==null&&u!==void 0?u:m=>S5[m-1]||_5;let w,b;const y=(d=e==null?void 0:e.vsn)!==null&&d!==void 0?d:JF;switch(y){case ZF:w=(m,g)=>g(JSON.stringify(m)),b=(m,g)=>g(JSON.parse(m));break;case zE:w=this.serializer.encode.bind(this.serializer),b=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${v.vsn}`)}if(v.vsn=y,v.encode=(f=e==null?void 0:e.encode)!==null&&f!==void 0?f:w,v.decode=(p=e==null?void 0:e.decode)!==null&&p!==void 0?p:b,v.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,v.params=Object.assign(Object.assign({},v.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,v.autoSendHeartbeat=!this.worker}return v}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
248var el=class extends Error{constructor(t,e){var n;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((n=e.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function A5(t,e,n){const r=new URL(e,t);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function P5(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function R5(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=A5(t.baseUrl,r,s),l=await P5(t.auth),c=await e(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),f=d&&u?JSON.parse(u):u;if(!c.ok){const p=d?f:void 0,v=p==null?void 0:p.error;throw new el((v==null?void 0:v.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:v==null?void 0:v.type,icebergCode:v==null?void 0:v.code,details:p})}return{status:c.status,headers:c.headers,data:f}}}}function sc(t){return t.join("�")}var j5=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:sc(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(t,e){const n={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${sc(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${sc(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${sc(t.namespace)}`}),!0}catch(e){if(e instanceof el&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(n){if(n instanceof el&&n.status===409)return;throw n}}};function ui(t){return t.join("�")}var N5=class{constructor(t,e="",n){this.client=t,this.prefix=e,this.accessDelegation=n}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ui(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ui(t.namespace)}/tables`,body:e,headers:n})).data.metadata}async updateTable(t,e){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ui(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ui(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ui(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ui(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(n){if(n instanceof el&&n.status===404)return!1;throw n}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(n){if(n instanceof el&&n.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw n}}},O5=class{constructor(t){var r;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const n=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=R5({baseUrl:n,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(r=t.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new j5(this.client,e),this.tableOps=new N5(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
248async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function tl(t){"@babel/helpers - typeof";return tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tl(t)}function I5(t,e){if(tl(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(tl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function L5(t){var e=I5(t,"string");return tl(e)=="symbol"?e:e+""}function D5(t,e,n){return(e=L5(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rx(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function J(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rx(Object(n),!0).forEach(function(r){D5(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rx(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var md=class extends Error{constructor(t,e="storage",n,r){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function gd(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Cp=class extends md{constructor(t,e,n,r="storage"){super(t,r,e,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=n}toJSON(){return J({},super.toJSON())}},GE=class extends md{constructor(t,e,n="storage"){super(t,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function ku(t,e,n){const r=J({},t),s=e.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function M5(t){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;return e}const $5=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),V5=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Ap=t=>{if(Array.isArray(t))return t.map(n=>Ap(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=Ap(r)}),e},F5=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),sx=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const n=e.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(t)},U5=async(t,e,n,r)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const s=t;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";e(new Cp(sx(o),i,a,r))}).catch(()=>{const o=i+"";e(new Cp(s.statusText||`HTTP ${i} error`,i,o,r))})}else e(new GE(sx(t),t,r))},B5=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!r)return J(J({},s),n);if(V5(r)){var i;const o=(e==null?void 0:e.headers)||{};let a;for(const[l,c]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=c);s.headers=ku(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return e!=null&&e.duplex&&(s.duplex=e.duplex),J(J({},s),n)};async function Ko(t,e,n,r,s,i,o){return new Promise((a,l)=>
248{t(n,B5(e,r,s,i)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>U5(c,l,r,o))})}function ZE(t="storage"){return{get:async(e,n,r,s)=>Ko(e,"GET",n,r,s,void 0,t),post:async(e,n,r,s,i)=>Ko(e,"POST",n,s,i,r,t),put:async(e,n,r,s,i)=>Ko(e,"PUT",n,s,i,r,t),head:async(e,n,r,s)=>Ko(e,"HEAD",n,J(J({},r),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,n,r,s,i)=>Ko(e,"DELETE",n,s,i,r,t)}}const z5=ZE("storage"),{get:nl,post:fn,put:Pp,head:H5,remove:Fg}=z5,Nt=ZE("vectors");var jo=class{constructor(t,e={},n,r="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=M5(e),this.fetch=$5(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=ku(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(gd(n))return{data:null,error:n};throw n}}},W5=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(gd(e))return{data:null,error:e};throw e}}};let JE;JE=Symbol.toStringTag;var q5=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[JE]="BlobDownloadBuilder",this.promise=null}asStream(){return new W5(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(gd(e))return{data:null,error:e};throw e}}};const K5={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},ix={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var G5=class extends jo{constructor(t,e={},n,r){super(t,e,r,"storage"),this.bucketId=n}async uploadOrUpdate(t,e,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=J(J({},ix),r);let a=J(J({},s.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers)for(const[f,p]of Object.entries(r.headers))a=ku(a,f,p);const c=s._removeEmptyFolders(e),u=s._getFinalPath(c),d=await(t=="PUT"?Pp:fn)(s.fetch,`${s.url}/object/${u}`,i,J({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:d.Id,fullPath:d.Key}})}async upload(t,e,n){return this.uploadOrUpdate("POST",t,e,n)}async uploadToSignedUrl(t,e,n,r){var s=this;const i=s._removeEmptyFolders(t),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",e),s.handleOperation(async()=>{let l;const c=J(J({},ix),r);let u=J(J({},s.headers),{"x-upsert":String(c.upsert)});const d=c.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),d&&l.append("metadata",s.encodeMetadata(d)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",c.cacheControl),d&&!l.has("metadata")&&l.append("metadata",s.encodeMetadata(d))):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType,d&&(u["x-metadata"]=s.toBase64(s.encodeMetadata(d))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!c.duplex&&(c.duplex="half")),r!=null&&r.headers)for(const[f,p]of Object.entries(r.headers))u=ku(u,f,p);return{path:i,fullPath:(await Pp(s.fetch,a.toString(),l,J({headers:u},c!=null&&c.duplex?{duplex:c.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(t);const s=J({},n.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await fn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new md("No token returned by API");return{signedUrl:o.toString(),path:t,token:a}})}async update(t,e,n){return this.uploadOrUpdate("PUT",t,e,n)}async move(t,e,n){var r=this;return r.handleOperation(async()=>await fn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(t,e,n){var r=this;return r.handleOperation(async()=>({path:(await fn(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(t,e,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(t);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await fn(r.fetch,`${r.url}/object/sign/${s}
248`,J({expiresIn:e},i?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(t,e,n){var r=this;return r.handleOperation(async()=>{const s=await fn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:e,paths:t},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return s.map(a=>J(J({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(t,e,n){const r=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const i=s.toString(),o=this._getFinalPath(t),a=()=>nl(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new q5(a,this.shouldThrowOnError)}async info(t){var e=this;const n=e._getFinalPath(t);return e.handleOperation(async()=>Ap(await nl(e.fetch,`${e.url}/object/info/${n}`,{headers:e.headers})))}async exists(t){var e=this;const n=e._getFinalPath(t);try{return await H5(e.fetch,`${e.url}/object/${n}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(gd(s)){var r;const i=s instanceof Cp?s.status:s instanceof GE?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(t,e){const n=this._getFinalPath(t),r=new URLSearchParams;e!=null&&e.download&&r.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(r,e.transform),(e==null?void 0:e.cacheNonce)!=null&&r.set("cacheNonce",String(e.cacheNonce));const s=r.toString(),i=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Fg(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,n){var r=this;return r.handleOperation(async()=>{const s=J(J(J({},K5),e),{},{prefix:t||""});return await fn(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(t,e){var n=this;return n.handleOperation(async()=>{const r=J({},t);return await fn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},e)})}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.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const Z5="2.105.4",_l={"X-Client-Info":`storage-js/${Z5}`};var J5=class extends jo{constructor(t,e={},n,r){const s=new URL(t);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=J(J({},_l),e);super(i,o,n,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=e.listBucketOptionsToQueryString(t);return await nl(e.fetch,`${e.url}/bucket${n}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await nl(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var n=this;return n.handleOperation(async()=>await fn(n.fetch,`${n.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async updateBucket(t,e){var n=this;return n.handleOperation(async()=>await Pp(n.fetch,`${n.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await fn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Fg(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},Q5=class extends jo{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=J(J({},_l),e);super(r,s,n,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await fn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&n.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&n.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&n.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&n.set("sortOrder",t.sortOrder),t!=null&&t.search&&n.set("search",t.search);const r=n.toString(),s=r?`${e.url}/bucket?${r}`:`${e.url}/bucket`;return await nl(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Fg(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!F5(t))throw new md("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new O5({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}
248),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},Y5=class extends jo{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=J(J({},_l),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var n=this;return n.handleOperation(async()=>await Nt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var n=this;return n.handleOperation(async()=>await Nt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers})||{})}},X5=class extends jo{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=J(J({},_l),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},eU=class extends jo{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=J(J({},_l),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Nt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},tU=class extends eU{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new nU(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,n=this;return e().call(n,t)}async getBucket(t){var e=()=>super.getBucket,n=this;return e().call(n,t)}async listBuckets(t={}){var e=()=>super.listBuckets,n=this;return e().call(n,t)}async deleteBucket(t){var e=()=>super.deleteBucket,n=this;return e().call(n,t)}},nU=class extends Y5{constructor(t,e,n,r){super(t,e,r),this.vectorBucketName=n}async createIndex(t){var e=()=>super.createIndex,n=this;return e().call(n,J(J({},t),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,n=this;return e().call(n,J(J({},t),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,n=this;return e().call(n,n.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,n=this;return e().call(n,n.vectorBucketName,t)}index(t){return new rU(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},rU=class extends X5{constructor(t,e,n,r,s){super(t,e,s),this.vectorBucketName=n,this.indexName=r}async putVectors(t){var e=()=>super.putVectors,n=this;return e().call(n,J(J({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(t){var e=()=>super.getVectors,n=this;return e().call(n,J(J({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,n=this;return e().call(n,J(J({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,n=this;return e().call(n,J(J({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,n=this;return e().call(n,J(J({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},sU=class extends J5{constructor(t,e={},n,r){super(t,e,n,r)}from(t){return new G5(this.url,this.headers,t,this.fetch)}get vectors(){return new tU(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Q5(this.url+"/iceberg",this.headers,this.fetch)}};function yd(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}const QE="2.105.4",yi=30*1e3,Rp=3,Ah=Rp*yi,iU="http://localhost:9999",oU="supabase.auth.token",aU={"X-Client-Info":`gotrue-js/${QE}`},jp="X-Supabase-Api-Version",YE={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},lU=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,cU=10*60*1e3;
248class rl extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function $(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class uU extends rl{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function dU(t){return $(t)&&t.name==="AuthApiError"}class vn extends rl{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class gr extends rl{constructor(e,n,r,s){super(e,r,s),this.name=n,this.status=r}}class Ye extends gr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ic(t){return $(t)&&t.name==="AuthSessionMissingError"}class di extends gr{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class oc extends gr{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ac extends gr{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function hU(t){return $(t)&&t.name==="AuthImplicitGrantRedirectError"}class ox extends gr{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class fU extends gr{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Np extends gr{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function Ph(t){return $(t)&&t.name==="AuthRetryableFetchError"}class ax extends gr{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Op extends gr{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Eu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),lx=` 	
249\r=`.split(""),pU=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<lx.length;e+=1)t[lx[e].charCodeAt(0)]=-2;for(let e=0;e<Eu.length;e+=1)t[Eu[e].charCodeAt(0)]=e;return t})();function cx(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(Eu[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(Eu[r]),e.queuedBits-=6}}function XE(t,e,n){const r=pU[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function ux(t){const e=[],n=o=>{e.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{yU(o,r,n)};for(let o=0;o<t.length;o+=1)XE(t.charCodeAt(o),s,i);return e.join("")}function mU(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function gU(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}mU(r,e)}}function yU(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function Ki(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)XE(t.charCodeAt(s),n,r);return new Uint8Array(e)}function vU(t){const e=[];return gU(t,n=>e.push(n)),new Uint8Array(e)}function Os(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};return t.forEach(s=>cx(s,n,r)),cx(null,n,r),e.join("")}function wU(t){return Math.round(Date.now()/1e3)+t}function xU(){return Symbol("auth-callback")}const rt=()=>typeof window<"u"&&typeof document<"u",bs={tested:!1,writable:!1},eT=()=>{if(!rt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(bs.tested)return bs.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),bs.tested=!0,bs.writable=!0}catch{bs.tested=!0,bs.writable=!1}return bs.writable};function bU(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
249h((s,i)=>{e[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{e[s]=r}),e}const tT=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),SU=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",vi=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},Ss=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return null}},nt=async(t,e)=>{await t.removeItem(e)};class vd{constructor(){this.promise=new vd.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}vd.promiseConstructor=Promise;function lc(t){const e=t.split(".");if(e.length!==3)throw new Op("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!lU.test(e[r]))throw new Op("JWT not in base64url format");return{header:JSON.parse(ux(e[0])),payload:JSON.parse(ux(e[1])),signature:Ki(e[2]),raw:{header:e[0],payload:e[1]}}}async function _U(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function kU(t,e){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){r(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function EU(t){return("0"+t.toString(16)).substr(-2)}function TU(){const e=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(e),Array.from(e,EU).join("")}async function CU(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function AU(t){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."),t;const n=await CU(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function hi(t,e,n=!1){const r=TU();let s=r;n&&(s+="/recovery"),await vi(t,`${e}-code-verifier`,s);const i=await AU(r);return[i,r===i?"plain":"s256"]}const PU=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function RU(t){const e=t.headers.get(jp);if(!e||!e.match(PU))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function jU(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function NU(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const OU=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Gn(t){if(!OU.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function un(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Rh(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function IU(t,e){return new Proxy(t,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;
249if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!e.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(n,r,s)}})}function dx(t){return JSON.parse(JSON.stringify(t))}const Cs=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},LU=[502,503,504,520,521,522,523,524,530];async function hx(t){var e;if(!SU(t))throw new Np(Cs(t),0);if(LU.includes(t.status))throw new Np(Cs(t),t.status);let n;try{n=await t.json()}catch(i){throw new vn(Cs(i),i)}let r;const s=RU(t);if(s&&s.getTime()>=YE["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 ax(Cs(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new Ye}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 ax(Cs(n),t.status,n.weak_password.reasons);throw new uU(Cs(n),t.status||500,r)}const DU=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function H(t,e,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[jp]||(i[jp]=YE["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 MU(t,e,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 MU(t,e,n,r,s,i){const o=DU(e,r,s,i);let a;try{a=await t(n,Object.assign({},o))}catch(l){throw console.error(l),new Np(Cs(l),0)}if(a.ok||await hx(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await hx(l)}}function zt(t){var e;let n=null;FU(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=wU(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:n,user:r},error:null}}function fx(t){const e=zt(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Or(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function $U(t){return{data:t,error:null}}function VU(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=t,o=yd(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,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 px(t){return t}function FU(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const jh=["global","local","others"];class UU{constructor({url:e="",headers:n={},fetch:r,experimental:s}){this.url=e,this.headers=n,this.fetch=tT(r),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}
vendor: 4,751 bytes, line 249
249async signOut(e,n=jh[0]){if(jh.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${jh.join(", ")}`);try{return await H(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if($(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await H(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Or})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=yd(e,["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 H(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:VU,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if($(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await H(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Or})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await H(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:px});if(u.error)throw u.error;const d=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(v=>{const w=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(v.split(";")[1].split("=")[1]);c[`${b}Page`]=w}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if($(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){Gn(e);try{return await H(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Or})}catch(n){if($(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){Gn(e);try{return await H(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:Or})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){Gn(e);try{return await H(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:Or})}catch(r){if($(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){Gn(e.userId);try{const{data:n,error:r}=await H(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if($(n))return{data:null,error:n};throw n}}async _deleteFactor(e){Gn(e.userId),Gn(e.id);try{return{data:await H(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async _listOAuthClients(e){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await H(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:px});if(u.error)throw u.error;const d=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>0&&(p.forEach(v=>{const w=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(v.split(";")[1].split("=")[1]);c[`${b}Page`]=w}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if($(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(e){try{return await H(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _getOAuthClient(e){try{return await H(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _updateOAuthClient(e,n){try{return await H(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(e){try{return await H(this.fetch,"DELET
249E",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(e){try{return await H(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _listCustomProviders(e){try{const n={};return e!=null&&e.type&&(n.type=e.type),await H(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if($(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(e){try{return await H(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _getCustomProvider(e){try{return await H(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _updateCustomProvider(e,n){try{return await H(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if($(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(e){try{return await H(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}async _adminListPasskeys(e){un(this.experimental),Gn(e.userId);try{return await H(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if($(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(e){un(this.experimental),Gn(e.userId),Gn(e.passkeyId);try{return await H(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if($(n))return{data:null,error:n};throw n}}}function mx(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}const An={debug:!!(globalThis&&eT()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class nT extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class gx extends nT{}async function BU(t,e,n){An.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const r=new globalThis.AbortController;let s;e>0&&(s=setTimeout(()=>{r.abort(),An.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),An.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,i.name);try{return await n()}finally{An.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,i.name)}}else{if(e===0)throw An.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new gx(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(An.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await n()}})}catch(i){if(e>0&&clearTimeout(s),i!==null&&typeof i=="object"&&"name"in i&&i.name==="AbortError"&&e>0){if(r.signal.aborted)return An.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@
249supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async o=>{if(o){An.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,o.name);try{return await n()}finally{An.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw An.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new gx(`Lock "${t}" was released because another request stole it`)}throw i}}function zU(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function rT(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function HU(t){return parseInt(t,16)}function WU(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}function qU(t){var e;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:d,version:f}=t;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
250`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const p=rT(t.address),v=u?`${u}://${r}`:r,w=t.statement?`${t.statement}
251`:"",b=`${v} wants you to sign in with your Ethereum account:
252${p}
253
254${w}`;let y=`URI: ${d}
255Version: ${f}
256Chain ID: ${n}${o?`
257Nonce: ${o}`:""}
258Issued At: ${i.toISOString()}`;if(s&&(y+=`
259Expiration Time: ${s.toISOString()}`),a&&(y+=`
260Not Before: ${a.toISOString()}`),l&&(y+=`
261Request ID: ${l}`),c){let m=`
262Resources:`;for(const g of c){if(!g||typeof g!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${g}`);m+=`
263- ${g}`}y+=m}return`${b}
264${y}`}class He extends Error{constructor({message:e,code:n,cause:r,name:s}){var i;super(e,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Tu extends He{constructor(e,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:e}),this.name="WebAuthnUnknownError",this.originalError=n}}function KU({error:t,options:e}){var n,r,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new He({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new He({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new He({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new He({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new He({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new He({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new He({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new He({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(sT(o)){if(i.rp.id!==o)return new He({message:`The RP ID "${i.rp.id}
264" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new He({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new He({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new He({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new He({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function GU({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new He({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new He({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const r=window.location.hostname;if(sT(r)){if(n.rpId!==r)return new He({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new He({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new He({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new He({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class ZU{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Ip=new ZU;function yx(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:n,excludeCredentials:r}=t,s=yd(t,["challenge","user","excludeCredentials"]),i=Ki(e).buffer,o=Object.assign(Object.assign({},n),{id:Ki(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Ki(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function vx(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:n}=t,r=yd(t,["challenge","allowCredentials"]),s=Ki(e).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Ki(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function wx(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t;return{id:t.id,rawId:t.id,response:{attestationObject:Os(new Uint8Array(t.response.attestationObject)),clientDataJSON:Os(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function xx(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t,r=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Os(new Uint8Array(s.authenticatorData)),clientDataJSON:Os(new Uint8Array(s.clientDataJSON)),signature:Os(new Uint8Array(s.signature)),userHandle:s.userHandle?Os(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function sT(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Cu(){var t,e;return!!(rt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function iT(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Tu("Browser returned unexpected credential type",e)}:{data:null,error:new Tu("Empty credential response",e)}}catch(e){return{data:null,error:KU({error:e,options:t})}}}async function oT(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Tu("Browser returned unexpected credential type",e)}:{data:null,error:new Tu("Empty credential response",e)}}catch(e){return{data:null,error:GU({error:e,options:t})}}}const JU={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},QU={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Au(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of t)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(e(o)){const a=r[i];e(a)?r[i]=Au(a,o):r[i]=Au(o)}else r[i]=o}return r}function YU(t,e){return Au(JU,t,e||{})}function XU(t,e){return Au(QU,t,e||{})}class eB{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:n});if(!a)return{data:null,error:l};const c=s??Ip.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const d=r;if(d)u.name=`${u.id}:${d}`;else{const p=(await this.client.getUser()).data.user,v=((o=p==null?void 0:p.user_metadata)===null||o===void 0?void 0:o.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";u.name=`${u.id}:${v}`}}u.displayName||(u.displayName=u.name)}
264switch(a.webauthn.type){case"create":{const u=YU(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await iT({publicKey:u,signal:c});return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const u=XU(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await oT(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return $(a)?{data:null,error:a}:{data:null,error:new vn("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:e,webauthn:r})}async _authenticate({factorId:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new rl("rpId is required for WebAuthn authentication")};try{if(!Cu())return{data:null,error:new vn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return $(o)?{data:null,error:o}:{data:null,error:new vn("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new rl("rpId is required for WebAuthn registration")};try{if(!Cu())return{data:null,error:new vn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===e&&f.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return $(o)?{data:null,error:o}:{data:null,error:new vn("Unexpected error in register",o)}}}}zU();const tB={url:iU,storageKey:oU,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:aU,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function bx(t,e,n){return await n()}const fi={};class sl{get jwks(){var e,n;return(n=(e=fi[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){fi[this.storageKey]=Object.assign(Object.assign({},fi[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=fi[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){fi[this.storageKey]=Object.assign(Object.assign({},fi[this.storageKey]),{cachedAt:e})}constructor(e){var n,r,s,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},tB),e);if(this.storageKey=o.storageKey,this.instanceID=(n=sl.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,sl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&rt()){const a=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.experimental=(r=o.experimental)!==null&&r!==void 0?r:{},this.admin=new UU({url:o.url,headers:o.headers,fetch:o.fetch,experimental:this.experimental}),this.url=o.url,this.headers=o.headers,this.fetch=tT(o.fetch),this.lock=o.lock||bx,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&rt()&&(!((s=globalThis==null?void 0:globalThis.navigator)===null||s===void 0)&&s.locks)?this.lock=BU:this.lock=bx,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new eB(this)}
264,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:eT()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=mx(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=mx(this.memoryStorage)),rt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${QE}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let n={},r="none";if(rt()&&(n=bU(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),rt()&&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),hU(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{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 $(n)?this._returnResult({error:n}):this._returnResult({error:new vn("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,s;try{const i=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:zt}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if($(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var n,r,s;try{let i;if("email"in e){const{email:u,password:d,options:f}=e;let p=null,v=null;this.flowType==="pkce"&&([p,v]=await hi(this.storage,this.storageKey)),i=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:u,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:v},xform:zt})}else if("phone"in e){const{phone:u,password:d,options:f}=e;i=await H(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,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:zt})}else throw new oc("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await nt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await nt(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let n;if("email"in e){const{email:i,password:o,options:a}=e;n=await H(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:fx})}else if("phone"in e){const{phone:i,password:o,options:a}=e;n=await H(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:fx})}else throw new oc("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new di;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(e){var n,r,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,r,s,i,o,a,l,c,u,d,f;let p,v;if("message"in e)p=e.message,v=e.signature;else{const{chain:w,wallet:b,statement:y,options:m}=e;let g;if(rt())if(typeof b=="object")g=b;else{const C=window;if("ethereum"in C&&typeof C.ethereum=="object"&&"request"in C.ethereum&&typeof C.ethereum.request=="function")g=C.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(m!=null&&m.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");g=b}const S=new URL((n=m==null?void 0:m.url)!==null&&n!==void 0?n:window.location.href),_=await g.request({method:"eth_requestAccounts"}).then(C=>C).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!_||_.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=rT(_[0]);let E=(r=m==null?void 0:m.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const C=await g.request({method:"eth_chainId"});E=HU(C)}const T={domain:S.host,address:k,statement:y,uri:S.href,version:"1",chainId:E,nonce:(s=m==null?void 0:m.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=m==null?void 0:m.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=m==null?void 0:m.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=m==null?void 0:m.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=m==null?void 0:m.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=m==null?void 0:m.signInWithEthereum)===null||u===void 0?void 0:u.resources};p=qU(T),v=await g.request({method:"personal_sign",params:[WU(p),k]})}try{const{data:w,error:b}=await H(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:v},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:zt});if(b)throw b;if(!w||!w.session||!w.user){const y=new di;return this._returnResult({data:{user:null,session:null},error:y})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:b})}catch(w){if($(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async signInWithSolana(e){var n,r,s,i,o,a,l,c,u,d,f,p;let v,w;if("message"in e)v=e.message,w=e.signature;else{const{chain:b,wallet:y,statement:m,options:g}=e;let S;if(rt())if(typeof y=="object")S=y;
264else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))S=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=y}const _=new URL((n=g==null?void 0:g.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const k=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},g==null?void 0:g.signInWithSolana),{version:"1",domain:_.host,uri:_.href}),m?{statement:m}:null));let E;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")E=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)E=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)v=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),w=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${_.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${_.href}`,`Issued At: ${(s=(r=g==null?void 0:g.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=g==null?void 0:g.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${g.signInWithSolana.notBefore}`]:[],...!((o=g==null?void 0:g.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${g.signInWithSolana.expirationTime}`]:[],...!((a=g==null?void 0:g.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${g.signInWithSolana.chainId}`]:[],...!((l=g==null?void 0:g.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${g.signInWithSolana.nonce}`]:[],...!((c=g==null?void 0:g.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${g.signInWithSolana.requestId}`]:[],...!((d=(u=g==null?void 0:g.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...g.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(`
265`);const k=await S.signMessage(new TextEncoder().encode(v),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");w=k}}try{const{data:b,error:y}=await H(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:Os(w)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=e.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:zt});if(y)throw y;if(!b||!b.session||!b.user){const m=new di;return this._returnResult({data:{user:null,session:null},error:m})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:y})}catch(b){if($(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(e){const n=await Ss(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new fU;const{data:i,error:o}=await H(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:zt});if(await nt(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new di;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers(s==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await nt(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=e,a=await H(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:zt}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new di;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(e){var n,r,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await hi(this.storage,this.storageKey));const{error:d}=await H(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await H(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 this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new oc("You must provide either an email or phone number.")}catch(a){if(await nt(this.storage,`${this.storageKey}-code-verifier`),$(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var n,r;try{let s,i;"options"in e&&(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo,i=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await H(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:zt});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if($(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var n,r,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await hi(this.storage,this.storageKey));const c=await H(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:$U});return!((i=c.data)===null||i===void 0)&&i.url&&rt()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await nt(this.storage,`${this.storageKey}-code-verifier`),$(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new Ye;const{error:s}=await H(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if($(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:r,type:s,options:i}=e,{error:o}=await H(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in e){const{phone:r,type:s,options:i}=e,{data:o,error:a}=await H(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new oc("You must provide either an email or phone number and a type")}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);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}`,e,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(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(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 e=null;const n=await Ss(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not val
265id"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<Ah:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const o=await Ss(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=Rh()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=IU(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(e){try{return e?await H(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Or}):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 Ye}:await H(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:Or})})}catch(n){if($(n))return ic(n)&&(await this._removeSession(),await nt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new Ye;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await hi(this.storage,this.storageKey));const{data:c,error:u}=await H(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Or});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await nt(this.storage,`${this.storageKey}-code-verifier`),$(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Ye;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=lc(e.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({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(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.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 this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if($(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:o,error:a}=n;if(a)throw a;e=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new Ye;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if($(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(e,n){var r;try{if(!rt())throw new ac("No browser detected.");
265if(e.error||e.error_description||e.error_code)throw new ac(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new ox("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ac("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new ox("No code detected.");const{data:g,error:S}=await this._exchangeCodeForSession(e.code);if(S)throw S;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:g.session,redirectType:(r=g.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:c,token_type:u}=e;if(!o||!l||!a||!u)throw new ac("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(l);let p=d+f;c&&(p=parseInt(c));const v=p-d;v*1e3<=yi&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${f}s`);const w=p-f;d-w>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",w,p,d):d-w<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",w,p,d);const{data:b,error:y}=await this._getUser(o);if(y)throw y;const m={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:p,refresh_token:a,token_type:u,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:m,redirectType:e.type},error:null})}catch(s){if($(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const n=await Ss(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!ic(i))return this._returnResult({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,e);if(a&&!(dU(a)&&(a.status===404||a.status===401||a.status===403)||ic(a)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await nt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const n=xU(),r={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(e){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(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),ic(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await hi(this.storage,this.storageKey,!0));try{return await H(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await nt(this.storage,`${this.storageKey}-code-verifier`),$(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:d,error:f}=i;if(f)throw f;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await H(this.fetch,"GET",p,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return rt()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:e.provider,url:r==null?void 0:r.url},error:null})}catch(r){if($(r))return this._returnResult({data:{provider:e.provider,url:null},error:r});throw r}}async linkIdentityIdToken(e){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
265if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=e,d=await H(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:zt}),{data:f,error:p}=d;return p?this._returnResult({data:{user:null,session:null},error:p}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new di}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:p}))}catch(s){if(await nt(this.storage,`${this.storageKey}-code-verifier`),$(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await H(this.fetch,"DELETE",`${this.url}/user/identities/${e.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($(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await kU(async s=>(s>
2650&&await _U(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await H(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:zt})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Ph(i)&&Date.now()+o-r<yi})}catch(r){if(this._debug(n,"error",r),$(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),rt()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await Ss(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Ss(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await vi(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:Rh()}else if(s&&!s.user&&!s.user){const o=await Ss(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await nt(this.storage,this.storageKey+"-user"),await vi(this.storage,this.storageKey,s)):s.user=Rh()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Ah;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Ah}
265s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Ph(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new Ye;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new vd;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new Ye;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),$(i)){const o={data:null,error:i};return Ph(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(e,n,r=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,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(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await nt(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await vi(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=dx(s);await vi(this.storage,this.storageKey,i)}else{const s=dx(n);await vi(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await nt(this.storage,this.storageKey),await nt(this.storage,this.storageKey+"-code-verifier"),await nt(this.storage,this.storageKey+"-user"),this.userStorage&&await nt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&rt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),yi);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=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-e)/yi);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${yi}ms, refresh threshold is ${Rp} ticks`),s<=Rp&&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(e){if(e instanceof nT)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!rt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(
265await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,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 hi(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}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await H(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:c}=await H(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(e.factorType==="totp"&&l.type==="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}`),this._returnResult({data:l,error:null}))})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?wx(e.webauthn.credential_response):xx(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await H(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await H(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:yx(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:vx(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){var e;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=n==null?void 0:n.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var n,r,s,i;if(e)try{const{payload:p}=lc(e);let v=null;p.aal&&(v=p.aal);let w=v;const{data:{user:b},error:y}=await this.getUser(e);if(y)return this._returnResult({data:null,error:y});((r=(n=b==null?void 0:b.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(w="aal2");const g=p.amr||[];return{data:{currentLevel:v,nextLevel:w,currentAuthenticationMethods:g},error:null}}catch(p){if($(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:a}
265=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=lc(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(p=>p.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const f=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await H(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Ye})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Ye});const o=await H(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&rt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Ye});const o=await H(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&rt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;return r?this._returnResult({data:null,error:r}):n?await H(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Ye})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await H(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Ye})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(a=>a.kid===e);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===e),r&&this.jwks_cached_at+cU>s)return r;const{data:i,error:o}=await H(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:p,error:v}
265=await this.getSession();if(v||!p.session)return this._returnResult({data:null,error:v});r=p.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=lc(r);n!=null&&n.allowExpired||jU(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:i,header:s,signature:o},error:null}}const u=NU(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,o,vU(`${a}.${l}`)))throw new Op("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(e){var n,r,s;un(this.experimental);try{if(!Cu())return this._returnResult({data:null,error:new vn("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=vx(i.options),l=(s=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:Ip.createNewAbortSignal(),{data:c,error:u}=await oT({publicKey:a,signal:l});if(u||!c)return this._returnResult({data:null,error:u??new vn("WebAuthn ceremony failed",null)});const d=xx(c);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:d})}catch(i){if($(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(e){var n,r;un(this.experimental);try{if(!Cu())return this._returnResult({data:null,error:new vn("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=yx(s.options),a=(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:Ip.createNewAbortSignal(),{data:l,error:c}=await iT({publicKey:o,signal:a});if(c||!l)return this._returnResult({data:null,error:c??new vn("WebAuthn ceremony failed",null)});const u=wx(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:u})}catch(s){if($(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){un(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Ye});const{data:s,error:i}=await H(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){un(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Ye});const{data:i,error:o}=await H(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(e){var n;un(this.experimental);try{const{data:r,error:s}=await H(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:r,error:null})}catch(r){if($(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(e){un(this.experimental);try{const{data:n,error:r}=await H(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:zt});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){un(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Ye});const{data:s,error:i}=await H(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if($(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){un(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Ye});const{data:i,error:o}=await H(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:e.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(e){un(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new Ye});const{error:i}
265=await H(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(n){if($(n))return this._returnResult({data:null,error:n});throw n}}}sl.nextInstanceID={};const nB=sl,rB="2.105.4";let na="";typeof Deno<"u"?na="deno":typeof document<"u"?na="web":typeof navigator<"u"&&navigator.product==="ReactNative"?na="react-native":na="node";const sB={"X-Client-Info":`supabase-js-${na}/${rB}`},iB={headers:sB},oB={schema:"public"},aB={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},lB={};function il(t){"@babel/helpers - typeof";return il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},il(t)}function cB(t,e){if(il(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(il(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function uB(t){var e=cB(t,"string");return il(e)=="symbol"?e:e+""}function dB(t,e,n){return(e=uB(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sx(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Ie(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Sx(Object(n),!0).forEach(function(r){dB(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sx(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const hB=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),fB=()=>Headers,pB=(t,e,n)=>{const r=hB(n),s=fB();return async(i,o)=>{var a;const l=(a=await e())!==null&&a!==void 0?a:t;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",t),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,Ie(Ie({},o),{},{headers:c}))}};function mB(t){return t.endsWith("/")?t:t+"/"}function gB(t,e){var n,r;const{db:s,auth:i,realtime:o,global:a}=t,{db:l,auth:c,realtime:u,global:d}=e,f={db:Ie(Ie({},l),s),auth:Ie(Ie({},c),i),realtime:Ie(Ie({},u),o),storage:{},global:Ie(Ie(Ie({},d),a),{},{headers:Ie(Ie({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return t.accessToken?f.accessToken=t.accessToken:delete f.accessToken,f}function yB(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(mB(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var vB=class extends nB{constructor(t){super(t)}},wB=class{constructor(t,e,n){var r,s;this.supabaseUrl=t,this.supabaseKey=e;const i=yB(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:oB,realtime:lB,auth:Ie(Ie({},aB),{},{storageKey:o}),global:iB},l=gB(n??{},a);if(this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=pB(e,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Ie({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new WF(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new sU(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new LF(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,n)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,n;if(t.accessToken)return await t.accessToken();const{data:r}=await t.auth.getSession();
265return(e=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:f},p,v){const w={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new vB({url:this.authUrl.href,headers:Ie(Ie({},w),p),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,experimental:u,fetch:v,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new C5(this.realtimeUrl.href,Ie(Ie({},t),{},{params:Ie(Ie({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const xB=(t,e,n)=>new wB(t,e,n);function bB(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const n=e.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}bB()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function SB(){var b,y;if(typeof window>"u")return;const t=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(m=>t===m||t.endsWith("."+m)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=n?((b=t.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:b[1])??((y=t.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:y[1]):void 0,i=window.parent&&window.parent!==window;if(!s||!i)return localStorage;const o=t.endsWith(".lovableproject-dev.com")||t.endsWith(".gpt-eng.com"),a=o?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:o?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",d=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),p=(m,g,S)=>new Promise(_=>{const k=f();let E=!1,T;const C=L=>{E||(E=!0,clearTimeout(T),window.removeEventListener("message",N),_(L))},N=L=>{if(c.indexOf(L.origin)<0)return;const K=L.data;K&&K.type===u&&K.requestId===k&&C(K)};window.addEventListener("message",N);const V={type:m,requestId:k,projectId:s,key:g};S!==void 0&&(V.value=S);for(const L of c)window.parent.postMessage(V,L);T=setTimeout(()=>C(null),d)});let v=!0;const w=250;return{getItem:async m=>{let g=await p("lovable-preview-auth:get",m);return!g&&v&&(await new Promise(S=>setTimeout(S,w)),g=await p("lovable-preview-auth:get",m)),v=!1,g&&g.ok&&typeof g.value=="string"?g.value===""?(localStorage.removeItem(m),null):g.value:localStorage.getItem(m)},setItem:(m,g)=>(localStorage.setItem(m,g),p("lovable-preview-auth:set",m,g).then(()=>{})),removeItem:m=>(localStorage.removeItem(m),p("lovable-preview-auth:remove",m).then(()=>{}))}}const _B="https://brkifidnoymyztqvwfkc.supabase.co",kB="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJya2lmaWRub3lteXp0cXZ3ZmtjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzg1NjM4OTAsImV4cCI6MjA5NDEzOTg5MH0.6LIwFhMoMNvKgsHtgmJ2kiZ8-mqVYN9ld-atlgZnG84",cc=xB(_B,kB,{auth:{storage:SB(),persistSession:!0,autoRefreshToken:!0}}),EB=[{id:"Electrical",label:"Electrical",icon:P1,desc:"Rewires, fuseboards, sockets, EV chargers"},{id:"Plumbing & Heating",label:"Plumbing & Heating",icon:mR,desc:"Boilers, leaks, bathrooms, heating"},{id:"Solar & Renewables",label:"Solar & Renewables",icon:A1,desc:"PV panels, batteries, inverters"},{id:"Compliance / Certificates",label:"Compliance",icon:yR,desc:"EICRs, PAT, landlord certs"},{id:"Other",label:"Other / Multiple",icon:_R,desc:"Not sure? We'll help"}],TB=["Anytime","Morning (8am–12pm)","Afternoon (12pm–4pm)","After 4pm","Weekend"],CB=PF({service:li().min(1),message:li().trim().min(1,"Please add a brief description").max(2e3),name:li().trim().min(1,"Name is required").max(100),email:li().trim().email("Valid email required").max(255),phone:li().trim().min(5,"Phone is required").max(40),preferred_callback:li().max(50).optional()}),_x=4,AB=8*1024*1024,PB=({onSubmitted:t})=>{const{toast:e}
265=KS(),[n,r]=x.useState(0),[s,i]=x.useState(!1),[o,a]=x.useState(!1),[l,c]=x.useState([]),[u,d]=x.useState({service:"",message:"",name:"",email:"",phone:"",preferred_callback:"Anytime"}),f=(m,g)=>d(S=>({...S,[m]:g})),p=()=>n===0?!!u.service:n===1?u.message.trim().length>0:!0,v=m=>{if(!m)return;const S=Array.from(m).filter(_=>_.type.startsWith("image/")?_.size>AB?(e({title:"File too large (max 8MB)",description:_.name,variant:"destructive"}),!1):!0:(e({title:"Image files only",description:_.name,variant:"destructive"}),!1));c(_=>[..._,...S].slice(0,_x))},w=m=>c(g=>g.filter((S,_)=>_!==m)),b=async()=>{var g;const m=CB.safeParse(u);if(!m.success){e({title:"Please check your details",description:((g=m.error.issues[0])==null?void 0:g.message)??"Invalid input",variant:"destructive"});return}i(!0);try{const S=crypto.randomUUID(),_=[];if(l.length>0){const K=await Promise.all(l.map(async D=>{const re=D.name.split(".").pop()||"jpg",Z=`${S}/${crypto.randomUUID()}.${re}`,{error:F}=await cc.storage.from("quote-photos").upload(Z,D,{contentType:D.type});if(F)throw F;return cc.storage.from("quote-photos").getPublicUrl(Z).data.publicUrl}));_.push(...K)}const{name:k,email:E,phone:T,service:C,message:N,preferred_callback:V}=m.data,{error:L}=await cc.from("contact_submissions").insert({id:S,name:k,email:E,phone:T,service:C,message:N,preferred_callback:V,photo_urls:_});if(L)throw L;await cc.functions.invoke("send-contact-emails",{body:{submissionId:S}}),a(!0),t==null||t(),e({title:"Enquiry sent!",description:"Our team aims to respond within 24 hours."})}catch(S){console.error("Quote submit failed",S),e({title:"Something went wrong",description:"Please try again or call 01432 508579.",variant:"destructive"})}finally{i(!1)}};if(o)return h.jsxs("div",{className:"p-12 rounded-xl border border-accent/30 bg-accent/5 text-center flex flex-col items-center justify-center min-h-[500px]",children:[h.jsx("div",{className:"w-14 h-14 rounded-full bg-accent/20 flex items-center justify-center mb-6",children:h.jsx(Rf,{className:"h-7 w-7 text-accent"})}),h.jsx("h2",{className:"text-2xl font-bold text-foreground mb-3",children:"Enquiry Sent"}),h.jsxs("p",{className:"text-muted-foreground max-w-sm",children:["Thank you, ",u.name.split(" ")[0],". We'll be in touch within 24 hours",u.preferred_callback&&u.preferred_callback!=="Anytime"?` — ${u.preferred_callback.toLowerCase()}`:"","."]})]});const y=["Service","Details","Contact"];return h.jsxs("div",{className:"p-6 md:p-8 rounded-xl border border-border bg-card",children:[h.jsx("div",{className:"flex items-center gap-2 mb-8",children:y.map((m,g)=>h.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[h.jsxs("div",{className:we("flex items-center gap-2 transition-colors",g===n?"text-accent":g<n?"text-foreground":"text-muted-foreground"),children:[h.jsx("div",{className:we("w-7 h-7 rounded-full flex items-center justify-center text-xs font-semibold border-2 transition-colors",g===n?"border-accent bg-accent text-accent-foreground":g<n?"border-foreground bg-foreground text-background":"border-border"),children:g<n?h.jsx(Rf,{className:"h-3.5 w-3.5"}):g+1}),h.jsx("span",{className:"hidden sm:inline text-xs font-medium uppercase tracking-wider",children:m})]}),g<y.length-1&&h.jsx("div",{className:we("flex-1 h-px",g<n?"bg-foreground":"bg-border")})]},m))}),h.jsx(sr,{mode:"wait",children:h.jsxs(ue.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.25},children:[n===0&&h.jsxs("div",{children:[h.jsx("h3",{className:"text-xl font-bold mb-1",children:"What can we help with?"}),h.jsx("p",{className:"text-sm text-muted-foreground mb-5",children:"Pick a service to get started."}),h.jsx("div",{className:"grid sm:grid-cols-2 gap-3",children:EB.map(m=>{const g=m.icon,S=u.service===m.id;return h.jsxs("button",{type:"button",onClick:()=>{f("service",m.id),setTimeout(()=>r(1),180)},className:we("text-left p-4 rounded-lg border-2 transition-all flex gap-3 items-start hover:border-accent/60",S?"border-accent bg-accent/5":"border-border bg-background"),children:[h.jsx("div",{className:we("w-9 h-9 rounded-lg flex items-center justify-center flex-shrink-0",S?"bg-accent text-accent-foreground":"bg-
265accent/10 text-accent"),children:h.jsx(g,{className:"h-5 w-5"})}),h.jsxs("div",{children:[h.jsx("p",{className:"font-semibold text-sm text-foreground",children:m.label}),h.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:m.desc})]})]},m.id)})})]}),n===1&&h.jsxs("div",{className:"space-y-5",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-xl font-bold mb-1",children:"Tell us a bit more"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"A photo helps us quote faster and more accurately."})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Ts,{htmlFor:"message",children:"Brief description"}),h.jsx(ME,{id:"message",rows:4,placeholder:"e.g. Consumer unit upgrade in 3-bed semi, looking to add EV charger circuit.",value:u.message,onChange:m=>f("message",m.target.value),required:!0})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Ts,{children:"Add photos (optional)"}),h.jsxs("label",{htmlFor:"quote-photos",className:"flex flex-col items-center justify-center gap-2 p-6 rounded-lg border-2 border-dashed border-border hover:border-accent/60 hover:bg-accent/5 transition-colors cursor-pointer",children:[h.jsx(SR,{className:"h-5 w-5 text-muted-foreground"}),h.jsx("p",{className:"text-sm font-medium",children:"Tap to add photos"}),h.jsxs("p",{className:"text-xs text-muted-foreground",children:["Up to ",_x," images, max 8MB each"]}),h.jsx("input",{id:"quote-photos",type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:m=>v(m.target.files)})]}),l.length>0&&h.jsx("div",{className:"grid grid-cols-4 gap-2 mt-2",children:l.map((m,g)=>h.jsxs("div",{className:"relative aspect-square rounded-md overflow-hidden border border-border bg-muted group",children:[h.jsx("img",{loading:"lazy",decoding:"async",src:URL.createObjectURL(m),alt:m.name,className:"w-full h-full object-cover"}),h.jsx("button",{type:"button",onClick:()=>w(g),className:"absolute top-1 right-1 w-5 h-5 rounded-full bg-background/90 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity","aria-label":"Remove photo",children:h.jsx(gl,{className:"h-3 w-3"})})]},g))})]})]}),n===2&&h.jsxs("div",{className:"space-y-5",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-xl font-bold mb-1",children:"How can we reach you?"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"We aim to respond within 24 hours."})]}),h.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(Ts,{htmlFor:"name",children:"Name"}),h.jsx(Nc,{id:"name",value:u.name,onChange:m=>f("name",m.target.value),required:!0})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Ts,{htmlFor:"phone",children:"Phone"}),h.jsx(Nc,{id:"phone",type:"tel",value:u.phone,onChange:m=>f("phone",m.target.value),required:!0})]})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Ts,{htmlFor:"email",children:"Email"}),h.jsx(Nc,{id:"email",type:"email",value:u.email,onChange:m=>f("email",m.target.value),required:!0})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Ts,{children:"Preferred callback t
265ime"}),h.jsx("div",{className:"flex flex-wrap gap-2",children:TB.map(m=>h.jsx("button",{type:"button",onClick:()=>f("preferred_callback",m),className:we("px-3 py-1.5 rounded-full text-xs font-medium border transition-colors",u.preferred_callback===m?"bg-accent text-accent-foreground border-accent":"bg-background border-border text-foreground hover:border-accent/60"),children:m},m))})]})]})]},n)}),h.jsxs("div",{className:"flex items-center justify-between gap-3 mt-8 pt-6 border-t border-border",children:[h.jsxs(Je,{type:"button",variant:"ghost",onClick:()=>r(m=>Math.max(0,m-1)),disabled:n===0||s,className:"gap-2",children:[h.jsx(hR,{className:"h-4 w-4"})," Back"]}),n<2?h.jsxs(Je,{type:"button",onClick:()=>r(m=>m+1),disabled:!p(),className:"bg-accent hover:bg-accent/90 text-accent-foreground gap-2",children:["Continue ",h.jsx(co,{className:"h-4 w-4"})]}):h.jsx(Je,{type:"button",onClick:b,disabled:s,className:"bg-accent hover:bg-accent/90 text-accent-foreground gap-2",children:s?h.jsxs(h.Fragment,{children:[h.jsx(vR,{className:"h-4 w-4 animate-spin"})," Sending…"]}):h.jsxs(h.Fragment,{children:[h.jsx(xR,{className:"h-4 w-4"})," Submit Enquiry"]})})]})]})},RB=()=>{const t=x.useRef(null),e=ei(t,{once:!0,margin:"-100px"}),n=["Free, no-obligation estimates","Photo upload for faster, accurate quotes","Choose your preferred callback t
265ime","Response within 24 hours"];return h.jsx("section",{id:"quote",className:"py-20 bg-background overflow-hidden",ref:t,children:h.jsx("div",{className:"container mx-auto px-4",children:h.jsxs("div",{className:"max-w-5xl mx-auto grid lg:grid-cols-5 gap-10 lg:gap-12 items-start",children:[h.jsxs(ue.div,{className:"lg:col-span-2",initial:{opacity:0,x:-30},animate:e?{opacity:1,x:0}:{},transition:{duration:.6},children:[h.jsx(pd,{className:"mx-0"}),h.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:"Request a Quote"}),h.jsx("p",{className:"text-muted-foreground mb-6",children:"Three quick steps. Tell us what you need, share a photo if it helps, and we'll be back to you within 24 hours."}),h.jsx("ul",{className:"space-y-3 text-sm text-foreground",children:n.map(r=>h.jsxs("li",{className:"flex items-start gap-2",children:[h.jsx("span",{className:"w-5 h-5 rounded-full bg-accent/15 text-accent flex items-center justify-center flex-shrink-0 mt-0.5",children:h.jsx(Rf,{className:"h-3 w-3"})}),r]},r))})]}),h.jsx(ue.div,{className:"lg:col-span-3",initial:{opacity:0,x:30},animate:e?{opacity:1,x:0}:{},transition:{duration:.6,delay:.15},children:h.jsx(PB,{})})]})})})};var wd="Collapsible",[jB,aT]=So(wd),[NB,Ug]=jB(wd),lT=x.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[l,c]=Ku({prop:r,defaultProp:s??!1,onChange:o,caller:wd});return h.jsx(NB,{scope:n,disabled:i,contentId:F1(),open:l,onOpenToggle:x.useCallback(()=>c(u=>!u),[c]),children:h.jsx(Ke.div,{"data-state":zg(l),"data-disabled":i?"":void 0,...a,ref:e})})});lT.displayName=wd;var cT="CollapsibleTrigger",uT=x.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,s=Ug(cT,n);return h.jsx(Ke.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":zg(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:Fe(t.onClick,s.onOpenToggle)})});uT.displayName=cT;var Bg="CollapsibleContent",dT=x.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=Ug(Bg,t.__scopeCollapsible);return h.jsx(qu,{present:n||s.open,children:({present:i})=>h.jsx(OB,{...r,ref:e,present:i})})});dT.displayName=Bg;var OB=x.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=t,o=Ug(Bg,n),[a,l]=x.useState(r),c=x.useRef(null),u=Mt(e,c),d=x.useRef(0),f=d.current,p=x.useRef(0),v=p.current,w=o.open||a,b=x.useRef(w),y=x.useRef(void 0);return x.useEffect(()=>{const m=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(m)},[]),Bn(()=>{const m=c.current;if(m){y.current=y.current||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const g=m.getBoundingClientRect();d.current=g.height,p.current=g.width,b.current||(m.style.transitionDuration=y.current.transitionDuration,m.style.animationName=y.current.animationName),l(r)}},[o.open,r]),h.jsx(Ke.div,{"data-state":zg(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!w,...i,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:w&&s})});function zg(t){return t?"open":"closed"}var IB=lT,LB=uT,DB=dT,MB=x.createContext(void 0);function $B(t){const e=x.useContext(MB);return t||e||"ltr"}var Tn="Accordion",VB=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Hg,FB,UB]=JS(Tn),[xd,Y3]=So(Tn,[
265UB,aT]),Wg=aT(),hT=P.forwardRef((t,e)=>{const{type:n,...r}=t,s=r,i=r;return h.jsx(Hg.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?h.jsx(WB,{...i,ref:e}):h.jsx(HB,{...s,ref:e})})});hT.displayName=Tn;var[fT,BB]=xd(Tn),[pT,zB]=xd(Tn,{collapsible:!1}),HB=P.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...o}=t,[a,l]=Ku({prop:n,defaultProp:r??"",onChange:s,caller:Tn});return h.jsx(fT,{scope:t.__scopeAccordion,value:P.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:P.useCallback(()=>i&&l(""),[i,l]),children:h.jsx(pT,{scope:t.__scopeAccordion,collapsible:i,children:h.jsx(mT,{...o,ref:e})})})}),WB=P.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[o,a]=Ku({prop:n,defaultProp:r??[],onChange:s,caller:Tn}),l=P.useCallback(u=>a((d=[])=>[...d,u]),[a]),c=P.useCallback(u=>a((d=[])=>d.filter(f=>f!==u)),[a]);return h.jsx(fT,{scope:t.__scopeAccordion,value:o,onItemOpen:l,onItemClose:c,children:h.jsx(pT,{scope:t.__scopeAccordion,collapsible:!0,children:h.jsx(mT,{...i,ref:e})})})}),[qB,bd]=xd(Tn),mT=P.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...o}=t,a=P.useRef(null),l=Mt(a,e),c=FB(n),d=$B(s)==="ltr",f=Fe(t.onKeyDown,p=>{var T;if(!VB.includes(p.key))return;const v=p.target,w=c().filter(C=>{var N;return!((N=C.ref.current)!=null&&N.disabled)}),b=w.findIndex(C=>C.ref.current===v),y=w.length;if(b===-1)return;p.preventDefault();let m=b;const g=0,S=y-1,_=()=>{m=b+1,m>S&&(m=g)},k=()=>{m=b-1,m<g&&(m=S)};switch(p.key){case"Home":m=g;break;case"End":m=S;break;case"ArrowRight":i==="horizontal"&&(d?_():k());break;case"ArrowDown":i==="vertical"&&_();break;case"ArrowLeft":i==="horizontal"&&(d?k():_());break;case"ArrowUp":i==="vertical"&&k();break}const E=m%y;(T=w[E].ref.current)==null||T.focus()});return h.jsx(qB,{scope:n,disabled:r,direction:s,orientation:i,children:h.jsx(Hg.Slot,{scope:n,children:h.jsx(Ke.div,{...o,"data-orientation":i,ref:l,onKeyDown:r?void 0:f})})})}),Pu="AccordionItem",[KB,qg]=xd(Pu),gT=P.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...s}=t,i=bd(Pu,n),o=BB(Pu,n),a=Wg(n),l=F1(),c=r&&o.value.includes(r)||!1,u=i.disabled||t.disabled;return h.jsx(KB,{scope:n,open:c,disabled:u,triggerId:l,children:h.jsx(IB,{"data-orientation":i.orientation,"data-state":ST(c),...a,...s,ref:e,disabled:u,open:c,onOpenChange:d=>{d?o.onItemOpen(r):o.onItemClose(r)}})})});gT.displayName=Pu;var yT="AccordionHeader",vT=P.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=bd(Tn,n),i=qg(yT,n);return h.jsx(Ke.h3,{"data-orientation":s.orientation,"data-state":ST(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:e})});vT.displayName=yT;var Lp="AccordionTrigger",wT=P.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=bd(Tn,n),i=qg(Lp,n),o=zB(Lp,n),a=Wg(n);return h.jsx(Hg.ItemSlot,{scope:n,children:h.jsx(LB,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...a,...r,ref:e})})});wT.displayName=Lp;var xT="AccordionContent",bT=P.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=bd(Tn,n),i=qg(xT,n),o=Wg(n);return h.jsx(DB,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});bT.displayName=xT;function ST(t){return t?"open":"closed"}var GB=hT,ZB=gT,JB=vT,_T=wT,kT=bT;const QB=GB,ET=x.forwardRef(({className:t,...e},n)=>h.jsx(ZB,{ref:n,className:we("border-b",t),...e}));ET.displayName="AccordionItem";const TT=x.forwardRef(({className:t,children:e,...n},r)=>h.jsx(JB,{className:"flex",children:h.jsxs(_T,{ref:r,className:we("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,h.jsx(Dm,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));TT.displayName=_T.displayName;const CT=x.forwardRef(({className:t,children:e,...n},r)=>h.jsx(kT,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:h.jsx("div",{className:we("pb-4 pt-0",t),children:e})}));CT.displayName=kT.displayName;const YB=[{question:"What areas do you cover?",answer:"We cover Hereford and the surrounding Herefordshire area, including Ross-on-Wye, Ledbury, Leominster, and surrounding villages. Contact us if you're unsure whether we cover your area."},{question:"Are you fully qualified and insured?",answer:"Yes. We are NICEIC Approved Contractors, fully certified where necessary for the services provided, and carry full public liability insurance. All our engineers hold the relevant qualifications for their trade."},{question:"How quickly can you provide a quote?",answer:"Our team aims to respond to all enquiries within 24 hours. For straightforward jobs, we can often give a price over the phone. Larger projects may require a site visit."},{question:"What certification do you provide?",answer:"We provide all relevant certification and documentation where required, including Electrical Installation Certificates (EIC), Electrical Installation Condition Reports (EICR), MCS certification, Gas Safety certification and associated compliance documentation."},{question:"How long does a consumer unit last?",answer:"Most consumer units have a typical lifespan of 20–30 years depending on condition, usage and installation environment."}],XB=({title:t="Frequently Asked Questions",subtitle:e,faqs:n=YB,enableSchema:r=!1})=>{const s=x.useRef(null),i=ei(s,{once:!0,margin:"-100px"}),o=r?{"@context":"https://schema.org","@type":"FAQPage",mainEntity:n.map(a=>
265({"@type":"Question",name:a.question,acceptedAnswer:{"@type":"Answer",text:a.answer}}))}:null;return h.jsxs("section",{className:"py-20 bg-secondary overflow-hidden",ref:s,children:[o&&h.jsx(F_,{children:h.jsx("script",{type:"application/ld+json",children:JSON.stringify(o)})}),h.jsxs("div",{className:"container mx-auto px-4",children:[h.jsxs(ue.div,{className:"text-center mb-12",initial:{opacity:0,y:30},animate:i?{opacity:1,y:0}:{},transition:{duration:.6},children:[h.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-4",children:t}),e&&h.jsx("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:e})]}),h.jsxs(ue.div,{className:"max-w-3xl mx-auto",initial:{opacity:0,y:20},animate:i?{opacity:1,y:0}:{},transition:{duration:.6,delay:.15},children:[h.jsx(QB,{type:"single",collapsible:!0,className:"space-y-3",children:n.map((a,l)=>h.jsxs(ET,{value:`faq-${l}`,className:"bg-background border border-border rounded-lg px-6",children:[h.jsx(TT,{className:"text-left font-medium text-foreground",children:a.question}),h.jsx(CT,{className:"text-muted-foreground leading-relaxed",children:a.answer})]},l))}),h.jsxs(ue.div,{className:"mt-10 p-6 rounded-xl border border-border bg-background flex flex-col sm:flex-row items-center justify-between gap-4 text-center sm:text-left",initial:{opacity:0,y:20},animate:i?{opacity:1,y:0}:{},transition:{duration:.6,delay:.3},children:[h.jsxs("div",{children:[h.jsx("p",{className:"font-semibold text-foreground",children:"Still have a question?"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Our team aims to respond within 24 hours."})]}),h.jsxs("div",{className:"flex gap-3 flex-shrink-0",children:[h.jsx("a",{href:"tel:01432508579",className:"inline-flex items-center justify-center h-10 px-4 rounded-md border border-input bg-background text-sm font-medium hover:bg-accent/10 transition-colors",children:"Call 01432 508579"}),h.jsx("a",{href:"/contact",className:"inline-flex items-center justify-center h-10 px-4 rounded-md bg-accent text-accent-foreground text-sm font-medium hover:bg-accent/90 transition-colors",children:"Get a Quote"})]})]})]})]})]})},e3="/assets/solar-install-CsLIh4dU.webp",t3=()=>{const t=x.useRef(null),e=ei(t,{once:!0,margin:"-100px"});return h.jsxs("section",{className:"relative py-20 overflow-hidden",ref:t,children:[h.jsxs("div",{className:"absolute inset-0",children:[h.jsx("img",{loading:"lazy",decoding:"async",src:e3,alt:"",className:"w-full h-full object-cover opacity-15"}),h.jsx("div",{className:"absolute inset-0 bg-primary/80"})]}),h.jsx("div",{className:"container mx-auto px-4 relative z-10",children:h.jsxs(ue.div,{className:"max-w-3xl mx-auto text-center",initial:{opacity:0,y:40},animate:e?{opacity:1,y:0}:{opacity:0,y:40},transition:{duration:.6,ease:[.25,.4,.25,1]},children:[h.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-primary-foreground mb-4",children:"Not sure what you need?"}),h.jsx("p",{className:"text-xl text-primary-foreground/80 mb-8",children:"Speak to the team today. We're here to help with any electrical, plumbing, or renewable energy questions."}),h.jsxs(ue.div,{className:"flex flex-col sm:flex-row gap-4 justify-center",initial:{opacity:0,y:20},animate:e?{opacity:1,y:0}:{opacity:0,y:20},transition:{duration:.6,delay:.2,ease:[.25,.4,.25,1]},children:[h.jsx(Je,{size:"lg",className:"bg-accent hover:bg-accent/90 text-accent-foreground text-lg px-8 py-6 transition-transform hover:scale-105",asChild:!0,children:h.jsx(Y,{to:"/contact",children:"Contact Our Team"})}),h.jsx(Je,{size:"lg",variant:"outline",className:"border-primary-foreground/30 text-primary-foreground hover:bg-primary-foreground/10 text-lg px-8 py-6 gap-2 transition-transform hover:scale-105",asChild:!0,children:h.jsxs("a",{href:"tel:01432508579",children:[h.jsx(cr,{className:"h-5 w-5"}),"Call Now"]})})]}),h.jsx(ue.p,{className:"text-sm text-primary-foreground/50 mt-8",initial:{opacity:0}
265,animate:e?{opacity:1}:{opacity:0},transition:{duration:.6,delay:.4},children:"25 years experience · Fully certified · NICEIC approved"})]})})]})},kx=({eyebrow:t="Free, no-obligation quotes",heading:e="Ready to start your project?",body:n="Tell us what you need. Our team aims to respond within 24 hours.",primaryLabel:r="Request a Quote",primaryHref:s="/contact",showEmail:i=!0,variant:o="default"})=>{const a=x.useRef(null),l=ei(a,{once:!0,margin:"-80px"}),c=o==="accent"?"rounded-2xl border border-accent/40 bg-gradient-to-br from-primary via-primary to-primary/80 p-8 md:p-10 flex flex-col md:flex-row md:items-center md:justify-between gap-6 shadow-xl":"rounded-2xl border border-accent/20 bg-gradient-to-r from-secondary to-background p-8 md:p-10 flex flex-col md:flex-row md:items-center md:justify-between gap-6",u=o==="accent"?"text-2xl md:text-3xl font-bold text-primary-foreground mb-2":"text-2xl md:text-3xl font-bold text-foreground mb-2",d=o==="accent"?"text-primary-foreground/80":"text-muted-foreground";return h.jsx("section",{className:"py-12 bg-background",ref:a,children:h.jsx("div",{className:"container mx-auto px-4",children:h.jsxs(ue.div,{initial:{opacity:0,y:24},animate:l?{opacity:1,y:0}:{},transition:{duration:.6},className:c,children:[h.jsxs("div",{className:"max-w-xl",children:[h.jsx("span",{className:"inline-block px-3 py-1 rounded-full bg-accent/15 text-accent text-xs font-semibold uppercase tracking-wider mb-3",children:t}),h.jsx("h3",{className:u,children:e}),h.jsx("p",{className:d,children:n})]}),h.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 flex-shrink-0 flex-wrap",children:[h.jsx(Je,{asChild:!0,size:"lg",className:"bg-accent hover:bg-accent/90 text-accent-foreground gap-2",children:h.jsxs(Y,{to:s,children:[r," ",h.jsx(co,{className:"h-4 w-4"})]})}),h.jsx(Je,{asChild:!0,size:"lg",variant:"outline",className:o==="accent"?"border-primary-foreground/30 text-primary-foreground hover:bg-primary-foreground/10 gap-2":"gap-2",children:h.jsxs("a",{href:"tel:01432508579",children:[h.jsx(cr,{className:"h-4 w-4"})," 01432 508579"]})}),i&&h.jsx(Je,{asChild:!0,size:"lg",variant:"ghost",className:o==="accent"?"text-primary-foreground hover:bg-primary-foreground/10 gap-2":"gap-2",children:h.jsxs("a",{href:"mailto:[email protected]",children:[h.jsx(Ma,{className:"h-4 w-4"})," Email Us"]})})]})]})})})},n3="/assets/trust-niceic-BWhgLDuM.png",r3="/assets/trust-mcs-certified-CeQ3fmlC.png",s3="/assets/trust-safecontractor-ae_qkgio.png",i3="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASoAAABkCAMAAAAGwY21AAAAvVBMVEX///8AVpWkt9cCWJb+/v/4+/02eqsUY52HsM1SjLeuv9vAy+MbZ6Dk7fTu8/gNX5ohbKPz9/oJXJnX5O6htdYxdqlNibVEg7FxoMTQ4OxlmL86fa4AQIcscqeSttKOsNC30OERYJyev9d+qcrIzea+1OSDq8xZkLomb6UAUZJqnMFJhbNAf7AAS46ZvNVflb2jwtnp8PbE2OeoxdsARoqtyd3g6vKyzN92osZ5p8e8xuG1wt/c5/HK3Omqu9p/tATlAAAOvklEQVR42uzaaXeiMBSA4XtB3KCuwRVcCmpRcanadsDy/3/WzNRAGKsgiXPmnDk+H7ud+ja5iVp4uMVmUYeHW6wRn+Eh3XsDEWsKPKTIzfDLHB6STQp40oKHRB2kivCQpJLHk/ErPCTZIbWAh9s2nwUPSep9pN7hIUl3jCfaESjlEkinpMvBv5bjAF9WSC1ZjDYWvquZy9mwmYMEAywkazSakOzp0Jkt9ZdarfaSX6wHXQVupXQHvVbfrP1i9kudwxNcZkvljCT/61H/QGoGTB6vqvYSjsgipurCdcporuEZub16g3Rvq3YDzxR6k0uhVSmz4HeqElIdSEnFaJu/kqrZk/EyfaNAktxOx8vkXvceqco5UKImQ0hPxdQ+756q2cYE42JCrFUBE/RfhVMRFXI1pFZwUyrm476pKiVMUR3CZe8apuh/iq6q7ltBxpMNZE2Fi3um2uANtEtDUmnhDdaKSCpiD8cOu05lToX9u6XKlZBJf8RxkyrepHEQSGUPHZcuqh1cS2UOphY1tealF4wrJaTSriiMm3DuTTtfPouetdqspvOSfnaqPaf8aRr6rFN83gx+9Nq1s9NQ4U5lT909LcWCs1RXahyn8VrFq6mqFUi5zTETGeOWxS4w9UPnBZmzLdj7s8Z6UwGmOSg1Lu4BNevui0ptIDVV3K6Bke7VVHW41TvGyPMn+GbSjmLUIa6EMeYOvqkXC0hNY6l4Sw0gWyqo6Gy0i6eaYEzvyrd9mpd+nRkyhUPKTe+dLxVRiROWsiBDKmqBoU/RVK/ImEegrh2R1rXdZ8FVymntHblSES9ohKXmwJGqXkNqLZiqomGkA0m2+tlUHSCV+mrkMyLqwJOK+L5m0FIt4EkFI6Q0RSxVGyM7SDFDeXtx4+r1tKVbxTlPKlJWzbCUmeNLxbbgQSiVhZEJpCppEKlrGFpCqi1aPKkCe2Hgb7LTeALOVO9IWSKpuhgZQbrKCCKd+C0g3esrTyp7bjinUs4r8KaqF9gX8Kdi228DVObT4EWBrNTbrwmu/FXK+ADuVNDHE10g1S723DujJVJyEzJTsx5+xsIWSDVjTbhT6Ui1IaNR2mEgnoqUvdpppMuGrvo5/lRzPJG33KlGsdtZRgukWsCZKp1doiN93yj7gUCqjzDVE3eqFrtQZdTEUPNvpSL2x/400l13qJLyHVZVo8Kb6ojUuAIZdVIii6ciHqGvuzjG3CaSSKoSntS4x3qRe6aDidTxDqnKnucF5CxVbFAt7UASSMW+oMWdqo3UG2Q0QWoGoqmIb0vWh+WrVwfV2PeJUKptg20BvlRv7LKd1RSpZ8FUJLClVtV1XW1qByQ+qKZ7R44GlSSUaoDUM2+qd/5/USqxISeUivjqGg0X0TH2azuILbWgGt6o1jaRxFKZ7ADkTDVEqss9qtoglIp4vm64p4nkGj1bitjtcFC9qIEklspi9xreVD322kRGW5ltfoFUxCNVA+nPkt39VCXf7gnOwCNiqQ4YGnGnWrBnu7xX9ZFQqjLRjP0+arUfl8t0+0myS7dfzyaSUKodhvJwJZWs9/MXmfSlzpzGvTSekWoKpQqGU9Ix907YyljYdPv16fbbv3iBJJIqt8bIiPd9QHaEDiCrIbv9Cm3AwPdtu7VHynGHHqHbj31AIFXdqmJkDtypjvwHvsXe2RO9V5GynTeiZaX//oRfpqefbJRsIvGlym0nP/IyMn3gT9VE6gBZfbAnCuJXUE+K3jjGvaUSyV6E26/gl6UMqcbtUN8s4J+0rUCqLn+qjngqhtg9A8NllVeJOnQd/GJ0bJIhVZLaE/wHqaTAq+3laFrZvhZuP5NeqcRTLek3i27ADWT1A0+03D1SEXXqOuGyWh5nRmzI3ydVEUAo1ZOMJyvup4DjukgqRtXDye4WhlWXVmvbEiWWaraF5FSNz23zCgV+U8LJN4WsVki93SUV8aLxhPKYXrMch3gkWyrtJzH3upQ4EEQBuJsEEgxoFIQIGsBVBAKyULgSEN//sXZV1jORgiEzXcX5ZXkph68mt56eeLyTXgtjNO9ZGJuWfPGgvbGiQoLx/2nFk+/7UfzSkVTpnBHHYa89eiTEgmrKXxlQzuCWLJahqq/i4ZCR7aTKS1WmZ0a6bpEQOyoftYm8CVHZs6ZCJQHBQ04+KvVMPSUSo3oxXZ7C+sWdFNVqexHEpOqsTKjUxoKxHNWbcdUXA5rLUOEiiHvRghEVRYqVGBWNUbAyrcIsh
265ajqwXLBShaRKZXa9NUUo/LNH5gH/JXQFZpV7+twoUhV1u+mVGorYUOKqoaiV96McA20pcIKDY7A26egYExFZcVKiIoS02mFB8iwKES17gyHOKnHawsqtb3uSYYKt5LeOeULRpNKUOHEvn1QXhVMqTA6fBMR6IRpmXfCzKWoogXzdvEmCuyo3GtlXslQ/WbjQ7CNQ1CG6qxwNfmA4ttJa12wo6LLO1hNRahobDw50DSbWFLhQXDx2Z9XibHQbEpFlwPFSoRqg70xNdLncoMBj9Sh6FOraamWk4/VwCRARcGciqoerCIJKlqiXPFG2kQhvp5hLCPSpnih7TA+q18NF5Po4QxSFlT0p6dYSVDhnMPOXO+qLmd1tbcvSDU8om99Vbr16g8FSFlR0Y3D30klqKrA19xPug0U4n8WXAf7CmjYGtbWUgWtyjoAlC0VbRSrXwJU9MhIMtO9BamfrXh9x4kPGEf8kep+KuwSgZQ1Vfaj9a2oUIxBUvfwFvDscBqMhPuO33uPP9PVUdXfceUToaJXRjpWVOiAQC7Sc9rJPNmzpSdhJdevtJNip4KxaqgQIaqslb+XakZHv+iky5mU/JqrbhZpVRjZ7HbPI97TiwLtvsVNBz9snoCKnhmJ91Bxnhed1DzOplea+vFz7LfaIR/eu9znbJywufz3l520fN0z2LssTUX3qpXIjvgGH5fSbOfcecXHxadTUFGHkXs7KsxUfRz8L6SYHGVcpdNQUV+1kqCiWZl1GZ2bvr1j8Ep0KipKVSsbKuTmb3vnw6MmEETxN1kBSUBwDX+EgFKjEDQcasSa6Pf/Wu0sirSN2jZtmia+5MToMsP83Id37sjF9EwfNh4qdV5d7OcfokJEdx3+BCqGZYpH1Z5GeKqqoAeKD8A/QPWIVfXHrl9Vr40f7VNe8FrNyaPvJTfpCPjrqATrCSr4JK4iWt5Ried62ac+WA6jwBLEcjzzc3XGz8quT7kniSWsIFrNNQB/HdW2sVnNk3mv8RCl7WWCq8aN/UoaXmuwPU8mZ3uMX9fY/rprs9WeDdmOflHbEd5666233nrrrbfeeuv/kab17g/wR2XbKuoY3aZ74p7zPMYP2tr4DW2bQRe1Gf3Gf7Mha3lrblwCubQBRAXQFERkQKMZgOIzgMQHMCW+i0FwvdSp6YE17H8CuXSE6pGcq0fs7HBdUP/UrjNnNVin22pQnACo+39gdstE25iI3CkA6IkGYG1CBQsA5JzaK4GUfFW/R7dM+7aT1PmETrUkog8FS8v5KI63TwNEyZF3hnz6JRVXpqGkC+DJdBGegTWZ4FtgQmb6eQjIBLBJ55tQFZiNOJvQU0kNkEiwcloNy13X+hKl4Se1oDUBGkak02xVToGYhguLH4BP+qFOKAY+cYWWc3/5vH3tMWo0gsr5iRRFV9ErPA4/PNAHoHNq6Sv+E3C6W6ZwyvFnnOnO36qOa3LHgJaQf0wdqjieky4SckfAnPL08+wxKhkAGtNxYygFnE6hmtIcrBXZOJKwsacpoGWJSqHRChce6jlg+YS7PtEErD0pxDyssKCU8NZIgKGarVgUE0Ak2FHdcV6o0rIJ4KlAWkZjoCAxBRIPMAVwCnuo8sLNAcSFMwPca6aYt26CVjsy1RGJOfCh0EPn4A4/fKGAUS3xTHIDINPvqIp1SFuYPVQX2uPDtWr4jqJg+9kVVUXLZ6h4u6cTtsy2MHqoPAMQbn/82cy6ie6g1QCXFifmHEEsTAPwPGDF7NFDZQYrAs5UZcPvUG2MbilRu0W1KWrNzTMz86EcvX2JytGvmQPyCmMHuBuQj1wZ0PCsWAPkB7LKjMCR4RbYs2EHFjm0QYcqoiTplg/25HrOByPQVjQGVSp+4hyAxOCnS4yohNY0/FmOxuWJ+gaIQtxN04A15tQ0HNNCoYJOFH6DyhvREaGwadhmyuZAnAGHLhjpvfXIA5QM94ZqSbuvP5ZnBI8NWBgbQ4XbkBl4U8B1safJSaFKTN3UgNy1pXbabGnHZvIOJ95Bk14dUdqh+qD1uth3qHQ/CdUUhBNoVHF8P0jmwEYEBvnAiCLsVPtcDB7ookNV9laMzmDxYFCEkgZrj8csfWIDOjdUFr/ERgQaXjMtAV+ujfsCqvB6PQZ7KGVFH9WcPFPPH6PK8pB37AzIqLBxfeduQBzlh4u5pSyyIkGCLI0NyNP7lQGnONIq6xswnrWuclyMq3R+oFxNm8+9d5peh/EQrCPPe8YlTV8HxgPO159VBqrsSFNQ/1wVV71uC18Z8G48gI14QxW+NiAnyqzvUTUZFT1USMjHwFU1yRgjzKm+orLYUY9R1TRla9K+d1p3saGtMtcQvFFZNFr0dlb3U73pTusGjaH8vyQ+ChEBJrXla1QCpsTYoBjjb1C5CMjGt6f1Q7JjB8yhbHy+ntYntMZrVDEmpKv9wsicXBNV5PL+8ec81Nhc
2657SngAFRtEmkBsph5rbPKPBwgp6hczzsD+qE/ZFQXQLMYVUxl5O8UMo3kGEBORZVaiksfFbN109SlTduWZe6jtoWUIaHk24iGM4q4uPgYc4Gm4INMsaVZW4l/Uaf1MYnR3cxyVcfthSA9iuuFUHYq5OLkkadxtOCz+fmxATcRkHL9J0FCZVUTMoiBRpfXlpS9nAIrYwSUlgq1kiOYkgQ7aeEoQ86kFF0XytJyhHr/NSZsH7EETlIIqoF8zX5Kb79pyj1YWlLhrlR0nVSjNRF5Z3B9THPklm0XkdmWTyrUKW5zjdxaZVIUojWw7DUQHI2uB1GLuvajUgjhKPdfiuzZV1S+ADDkbABI2HpVAAAAAElFTkSuQmCC",o3=[{src:n3,alt:"NICEIC Approved Contractor",className:"max-h-14 max-w-32 md:max-h-16 md:max-w-40"},{src:r3,alt:"MCS Certified",className:"max-h-24 max-w-20 md:max-h-28 md:max-w-24"},{src:s3,alt:"SafeContractor Approved",className:"max-h-20 max-w-20 md:max-h-24 md:max-w-24"},{src:i3,alt:"RECC - Renewable Energy Consumer Code",className:"max-h-14 max-w-48 md:max-h-16 md:max-w-56"}],a3=()=>h.jsxs("section",{className:"py-12 bg-background border-y border-border",children:[h.jsx("div",{className:"container mx-auto px-4 mb-8",children:h.jsx("p",{className:"text-center text-sm uppercase tracking-widest text-foreground font-semibold",children:"Accredited & Certified"})}),h.jsxs("div",{className:"container mx-auto px-4",children:[h.jsx("div",{className:"grid grid-cols-2 items-center justify-items-center gap-4 sm:grid-cols-4 md:gap-6",children:o3.map(t=>h.jsx("div",{className:"flex h-32 w-full max-w-56 items-center justify-center rounded-md bg-logo-surface p-4 shadow-sm",children:h.jsx("img",{src:t.src,alt:t.alt,className:`${t.className} h-auto w-auto object-contain`,loading:"lazy"})},t.alt))}),h.jsx("p",{className:"mt-8 text-center text-xs text-muted-foreground",children:"SES Hereford Ltd · Company Registration Number: 08563155"})]})]}),l3=["Skechers","Yankee Candle","Clintons","Letting Agents","Local Landlords","Barn Conversions"],c3=()=>h.jsx("section",{className:"py-12 bg-card border-y border-border",children:h.jsxs("div",{className:"container mx-auto px-4",children:[h.jsx("p",{className:"text-center text-xs uppercase tracking-[0.2em] text-muted-foreground font-medium mb-6",children:"Trusted by national retailers & local clients"}),h.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-10 gap-y-4 md:gap-x-14",children:l3.map((t,e)=>h.jsx(ue.span,{initial:{opacity:0,y:8},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:e*.05},className:"text-base md:text-lg font-semibold tracking-tight text-foreground/70 hover:text-accent transition-colors",children:t},t))})]})}),u3=[{name:"Hereford",slug:"hereford"},{name:"Leominster",slug:"leominster"},{name:"Ross-on-Wye",slug:"ross-on-wye"},{name:"Ledbury",slug:"ledbury"},{name:"Bromyard",slug:"bromyard"},{name:"Kington",slug:"kington"},{name:"Hay-on-Wye"},{name:"Pontrilas"},{name:"Weobley"},{name:"Much Wenlock"},{name:"Malvern"},{name:"Monmouth"}],d3=()=>h.jsx("section",{className:"py-16 bg-background",children:h.jsx("div",{className:"container mx-auto px-4",children:h.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[h.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-accent/10 text-accent text-xs font-semibold uppercase tracking-wider mb-4",children:[h.jsx(Ju,{className:"h-3.5 w-3.5"}),"Service Area"]}),h.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-3",children:"Serving Herefordshire & surrounding areas"}),h.jsx("p",{className:"text-muted-foreground mb-8",children:"Local engineers, fast response times, no call-out fees within our service area."}),h.jsx(ue.div,{className:"flex flex-wrap justify-center gap-2 md:gap-3",initial:"hidden",whileInView:"visible",viewport:{once:!0},variants:{visible:{transition:{staggerChildren:.04}}},children:u3.map(t=>{const e={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},n="px-4 py-2 rounded-full bg-card border border-border text-sm font-medium text-foreground hover:border-accent/50 hover:text-accent transition-colors";return t.slug?h.jsx(ue.span,{variants:e,children:h.jsx(Y,{to:`/areas/${t.slug}`,className:n,children:t.name})},t.name):h.jsx(ue.span,{variants:e,className:n,children:t.name},t.name)})}),h.jsx("p",{className:"text-xs text-muted-foreground mt-6",children:"Not on the list? Give us a call — we cover most of the West Midlands and Welsh borders."})]})})}),h3=()=>h.jsxs(N4,{children:[h.jsx(O4,{title:"Electrician Hereford | SES Electrical & Plumbing",description:"Trusted electrical, plumbing & solar specialists in Hereford. NICEIC approved, MCS certified. 25 years experience. Free quotes.",path:"/",jsonLd:I4}),h.jsx(D4,{}),h.jsx(c3,{}),h.jsx(q4,{}),h.jsx(X4,{}),h.jsx(kx,{variant:"accent",eyebrow:"Free estimates, no pressure",heading:"Not sure which service you need?",body:"Tell us what's going on and we'll point you to the right team — electrical, plumbing, heating or renewables.",primaryLabel:"Talk to Our Team"}),h.jsx(rV,{}),h.jsx(a3,{}),h.jsx(oV,{}),h.jsx(kx,{eyebrow:"25 years in Herefordshire",heading:"Trusted local specialists, one call away",body:"From a single socket to full solar installs — talk to a real engineer today."}),h.jsx(nF,{}),h.jsx(d3,{}),h.jsx(RB,{}),h.jsx(XB,{enableSchema:!0}
265),h.jsx(t3,{})]}),f3=x.lazy(()=>Qe(()=>import("./Domestic-CLkRyY2S.js"),[])),p3=x.lazy(()=>Qe(()=>import("./Commercial-DMHmgndh.js"),[])),m3=x.lazy(()=>Qe(()=>import("./Renewables-CjHnmzwx.js"),__vite__mapDeps([0,1,2]))),g3=x.lazy(()=>Qe(()=>import("./Landlords-CyUZWOnc.js"),__vite__mapDeps([3,4]))),y3=x.lazy(()=>Qe(()=>import("./Electrical-wimny46Y.js"),__vite__mapDeps([5,4,2]))),v3=x.lazy(()=>Qe(()=>import("./Plumbing-BBzYianu.js"),__vite__mapDeps([6,1]))),w3=x.lazy(()=>Qe(()=>import("./Compliance-C6-vRCfP.js"),__vite__mapDeps([7,8]))),x3=x.lazy(()=>Qe(()=>import("./Projects-B9mH8uGT.js"),[])),b3=x.lazy(()=>Qe(()=>import("./CaseStudy-BrIo4Pui.js"),__vite__mapDeps([9,10,11,12]))),S3=x.lazy(()=>Qe(()=>import("./Contact-BwWEXDpJ.js"),__vite__mapDeps([13,8]))),_3=x.lazy(()=>Qe(()=>import("./Privacy-D06Ig484.js"),[])),k3=x.lazy(()=>Qe(()=>import("./Terms-CpuDAHJR.js"),[])),E3=x.lazy(()=>Qe(()=>import("./Unsubscribe-D64mnC_1.js"),__vite__mapDeps([14,11]))),T3=x.lazy(()=>Qe(()=>import("./Pricing-ByG7BJR5.js"),[])),C3=x.lazy(()=>Qe(()=>import("./Area-DH2LMYqu.js"),[])),A3=x.lazy(()=>Qe(()=>import("./Reviews--idcNrOQ.js"),__vite__mapDeps([15,12]))),P3=x.lazy(()=>Qe(()=>import("./Insights-BoDoFbwJ.js"),__vite__mapDeps([16,17]))),R3=x.lazy(()=>Qe(()=>import("./InsightPost-CA2R3ZQK.js"),__vite__mapDeps([18,17]))),j3=x.lazy(()=>Qe(()=>import("./NotFound-BajZo1Op.js"),[])),N3=new GO,O3=()=>h.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:h.jsx("div",{className:"h-8 w-8 rounded-full border-2 border-accent border-t-transparent animate-spin"})}),I3=()=>{const t=ps();return h.jsx(sr,{mode:"wait",children:h.jsx(x.Suspense,{fallback:h.jsx(O3,{}),children:h.jsxs(VI,{location:t,children:[h.jsx($e,{path:"/",element:h.jsx(Be,{children:h.jsx(h3,{})})}),h.jsx($e,{path:"/domestic",element:h.jsx(Be,{children:h.jsx(f3,{})})}),h.jsx($e,{path:"/commercial",element:h.jsx(Be,{children:h.jsx(p3,{})})}),h.jsx($e,{path:"/renewables",element:h.jsx(Be,{children:h.jsx(m3,{})})}),h.jsx($e,{path:"/landlords",element:h.jsx(Be,{children:h.jsx(g3,{})})}),h.jsx($e,{path:"/electrical",element:h.jsx(Be,{children:h.jsx(y3,{})})}),h.jsx($e,{path:"/plumbing",element:h.jsx(Be,{children:h.jsx(v3,{})})}),h.jsx($e,{path:"/compliance",element:h.jsx(Be,{children:h.jsx(w3,{})})}),h.jsx($e,{path:"/projects",element:h.jsx(Be,{children:h.jsx(x3,{})})}),h.jsx($e,{path:"/projects/:slug",element:h.jsx(Be,{children:h.jsx(b3,{})})}),h.jsx($e,{path:"/contact",element:h.jsx(Be,{children:h.jsx(S3,{})})}),h.jsx($e,{path:"/privacy",element:h.jsx(Be,{children:h.jsx(_3,{})})}),h.jsx($e,{path:"/terms",element:h.jsx(Be,{children:h.jsx(k3,{})})}),h.jsx($e,{path:"/unsubscribe",element:h.jsx(Be,{children:h.jsx(E3,{})})}),h.jsx($e,{path:"/pricing",element:h.jsx(Be,{children:h.jsx(T3,{})})}),h.jsx($e,{path:"/areas/:slug",element:h.jsx(Be,{children:h.jsx(C3,{})})}),h.jsx($e,{path:"/reviews",element:h.jsx(Be,{children:h.jsx(A3,{})})}),h.jsx($e,{path:"/insights",element:h.jsx(Be,{children:h.jsx(P3,{})})}),h.jsx($e,{path:"/insights/:slug",element:h.jsx(Be,{children:h.jsx(R3,{})})}),h.jsx($e,{path:"*",element:h.jsx(Be,{children:h.jsx(j3,{})})})]},t.pathname)})})},L3=()=>h.jsx(V_,{children:h.jsx(JO,{client:N3,children:h.jsxs(kO,{children:[h.jsx(ij,{}),h.jsx(Mj,{}),h.jsxs(KI,{children:[h.jsx(S4,{}),h.jsx(I3,{})]})]})})});qS(document.getElementById("root")).render(h.jsx(L3,{}));export{vR as $,co as A,Je as B,E1 as C,gR as D,x as E,XB as F,OE as G,Dg as H,kx as I,Mg as J,sr as K,N4 as L,Ju as M,ue as N,B3 as O,cr as P,RB as Q,Q3 as R,O4 as S,hR as T,eV as U,Ma as V,_R as W,gl as X,PB as Y,P1 as Z,H3 as _,K3 as a,z3 as a0,Z3 as a1,Rf as a2,mR as a3,J3 as a4,ps as a5,dd as b,Y as c,a3 as d,pd as e,hd as f,G3 as g,L4 as h,fd as i,h as j,yV as k,_V as l,Tw as m,C1 as n,bR as o,Ee as p,KV as q,Z4 as r,r3 as s,kw as t,A1 as u,SV as v,TV as w,G4 as x,yR as y,T1 as z};

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.