PageSourceSearch

https://oxenhopepharmacy.co.uk/assets/index-B4KgW0Tn.js

js oxenhopepharmacy.co.uk collected 2026-10-05 23:51:38 UTC 984,555 bytes, 424 lines download raw bytes

vendor: 4,305 bytes, lines 1-9
1var KA=Object.defineProperty;var jx=e=>{throw TypeError(e)};var GA=(e,t,n)=>t in e?KA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var br=(e,t,n)=>GA(e,typeof t!="symbol"?t+"":t,n),sf=(e,t,n)=>t.has(e)||jx("Cannot "+n);var A=(e,t,n)=>(sf(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?jx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ue=(e,t,n,r)=>(sf(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),vt=(e,t,n)=>(sf(e,t,"access private method"),n);var Rc=(e,t,n,r)=>({set _(s){ue(e,t,s,n)},get _(){return A(e,t,r)}});function YA(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function oc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G1={exports:{}},qd={},Y1={exports:{}},me={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var ac=Symbol.for("react.element"),JA=Symbol.for("react.portal"),QA=Symbol.for("react.fragment"),XA=Symbol.for("react.strict_mode"),ZA=Symbol.for("react.profiler"),eR=Symbol.for("react.provider"),tR=Symbol.for("react.context"),nR=Symbol.for("react.forward_ref"),rR=Symbol.for("react.suspense"),sR=Symbol.for("react.memo"),iR=Symbol.for("react.lazy"),kx=Symbol.iterator;function oR(e){return e===null||typeof e!="object"?null:(e=kx&&e[kx]||e["@@iterator"],typeof e=="function"?e:null)}var J1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q1=Object.assign,X1={};function ua(e,t,n){this.props=e,this.context=t,this.refs=X1,this.updater=n||J1}ua.prototype.isReactComponent={};ua.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ua.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Z1(){}Z1.prototype=ua.prototype;function Fg(e,t,n){this.props=e,this.context=t,this.refs=X1,this.updater=n||J1}var $g=Fg.prototype=new Z1;$g.constructor=Fg;Q1($g,ua.prototype);$g.isPureReactComponent=!0;var Cx=Array.isArray,eS=Object.prototype.hasOwnProperty,Bg={current:null},tS={key:!0,ref:!0,__self:!0,__source:!0};function nS(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)eS.call(t,r)&&!tS.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:ac,type:e,key:i,ref:o,props:s,_owner:Bg.current}}function aR(e,t){return{$$typeof:ac,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ug(e){return typeof e=="object"&&e!==null&&e.$$typeof===ac}function lR(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var _x=/\/+/g;function of(e,t){return typeof e=="object"&&e!==null&&e.key!=null?lR(""+e.key):t.toString(36)}
vendor: 4,407 bytes, line 9
9function wu(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ac:case JA:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+of(o,0):r,Cx(s)?(n="",e!=null&&(n=e.replace(_x,"$&/")+"/"),wu(s,t,n,"",function(u){return u})):s!=null&&(Ug(s)&&(s=aR(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(_x,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Cx(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+of(i,l);o+=wu(i,t,n,c,s)}else if(c=oR(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+of(i,l++),o+=wu(i,t,n,c,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Oc(e,t,n){if(e==null)return e;var r=[],s=0;return wu(e,r,"","",function(i){return t.call(n,i,s++)}),r}function cR(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var At={current:null},bu={transition:null},uR={ReactCurrentDispatcher:At,ReactCurrentBatchConfig:bu,ReactCurrentOwner:Bg};function rS(){throw Error("act(...) is not supported in production builds of React.")}me.Children={map:Oc,forEach:function(e,t,n){Oc(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Oc(e,function(){t++}),t},toArray:function(e){return Oc(e,function(t){return t})||[]},only:function(e){if(!Ug(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};me.Component=ua;me.Fragment=QA;me.Profiler=ZA;me.PureComponent=Fg;me.StrictMode=XA;me.Suspense=rR;me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uR;me.act=rS;me.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Q1({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Bg.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)eS.call(t,c)&&!tS.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:ac,type:e.type,key:s,ref:i,props:r,_owner:o}};me.createContext=function(e){return e={$$typeof:tR,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:eR,_context:e},e.Consumer=e};me.createElement=nS;me.createFactory=function(e){var t=nS.bind(null,e);return t.type=e,t};me.createRef=function(){return{current:null}};me.forwardRef=function(e){return{$$typeof:nR,render:e}};me.isValidElement=Ug;me.lazy=function(e){return{$$typeof:iR,_payload:{_status:-1,_result:e},_init:cR}};me.memo=function(e,t){return{$$typeof:sR,type:e,compare:t===void 0?null:t}};me.startTransition=function(e){var t=bu.transition;bu.transition={};try{e()}finally{bu.transition=t}};me.unstable_act=rS;me.useCallback=function(e,t){return At.current.useCallback(e,t)};me.useContext=function(e){return At.current.useContext(e)};me.useDebugValue=function(){};me.useDeferredValue=function(e){return At.current.useDeferredValue(e)};me.useEffect=function(e,t){return At.current.useEffect(e,t)};me.useId=function(){return At.current.useId()};me.useImperativeHandle=function(e,t,n){return At.current.useImperativeHandle(e,t,n)};me.useInsertionEffect=function(e,t){return At.current.useInsertionEffect(e,t)};me.useLayoutEffect=function(e,t){return At.current.useLayoutEffect(e,t)};me.useMemo=function(e,t){return At.current.useMemo(e,t)};me.useReducer=function(e,t,n){return At.current.useReducer(e,t,n)};me.useRef=function(e){return At.current.useRef(e)};me.useState=function(e){return At.current.useState(e)};me.useSyncExternalStore=function(e,t,n){return At.current.useSyncExternalStore(e,t,n)};me.useTransition=function(){return At.current.useTransition()};me.version="18.3.1";Y1.exports=me;var p=Y1.exports;const R=oc(p),Vg=YA({__proto__:null,default:R}
vendor: 10,591 bytes, lines 9-33
9,[p]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var dR=p,hR=Symbol.for("react.element"),fR=Symbol.for("react.fragment"),mR=Object.prototype.hasOwnProperty,pR=dR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gR={key:!0,ref:!0,__self:!0,__source:!0};function sS(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)mR.call(t,r)&&!gR.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:hR,type:e,key:i,ref:o,props:s,_owner:pR.current}}qd.Fragment=fR;qd.jsx=sS;qd.jsxs=sS;G1.exports=qd;var a=G1.exports,iS={exports:{}},nn={},oS={exports:{}},aS={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(C,N){var I=C.length;C.push(N);e:for(;0<I;){var V=I-1>>>1,W=C[V];if(0<s(W,N))C[V]=N,C[I]=W,I=V;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var N=C[0],I=C.pop();if(I!==N){C[0]=I;e:for(var V=0,W=C.length,le=W>>>1;V<le;){var ae=2*(V+1)-1,_e=C[ae],Ne=ae+1,U=C[Ne];if(0>s(_e,I))Ne<W&&0>s(U,_e)?(C[V]=U,C[Ne]=I,V=Ne):(C[V]=_e,C[ae]=I,V=ae);else if(Ne<W&&0>s(U,I))C[V]=U,C[Ne]=I,V=Ne;else break e}}return N}function s(C,N){var I=C.sortIndex-N.sortIndex;return I!==0?I:C.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,h=null,f=3,m=!1,y=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(C){for(var N=n(u);N!==null;){if(N.callback===null)r(u);else if(N.startTime<=C)r(u),N.sortIndex=N.expirationTime,t(c,N);else break;N=n(u)}}function S(C){if(g=!1,w(C),!y)if(n(c)!==null)y=!0,$(j);else{var N=n(u);N!==null&&O(S,N.startTime-C)}}function j(C,N){y=!1,g&&(g=!1,x(E),E=-1),m=!0;var I=f;try{for(w(N),h=n(c);h!==null&&(!(h.expirationTime>N)||C&&!F());){var V=h.callback;if(typeof V=="function"){h.callback=null,f=h.priorityLevel;var W=V(h.expirationTime<=N);N=e.unstable_now(),typeof W=="function"?h.callback=W:h===n(c)&&r(c),w(N)}else r(c);h=n(c)}if(h!==null)var le=!0;else{var ae=n(u);ae!==null&&O(S,ae.startTime-N),le=!1}return le}finally{h=null,f=I,m=!1}}var k=!1,_=null,E=-1,P=5,T=-1;function F(){return!(e.unstable_now()-T<P)}function D(){if(_!==null){var C=e.unstable_now();T=C;var N=!0;try{N=_(!0,C)}finally{N?G():(k=!1,_=null)}}else k=!1}var G;if(typeof v=="function")G=function(){v(D)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,Y=M.port2;M.port1.onmessage=D,G=function(){Y.postMessage(null)}}else G=function(){b(D,0)};function $(C){_=C,k||(k=!0,G())}function O(C,N){E=b(function(){C(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){y||m||(y=!0,$(j))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(C){switch(f){case 1:case 2:case 3:var N=3;break;default:N=f}var I=f;f=N;try{return C()}finally{f=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,N){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var I=f;f=C;try{return N()}finally{f=I}},e.unstable_scheduleCallback=function(C,N,I){var V=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?V+I:V):I=V,C){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=I+W,C={id:d++,callback:N,priorityLevel:C,startTime:I,expirationTime:W,sortIndex:-1},I>V?(C.sortIndex=I,t(u,C),n(c)===null&&C===n(u)&&(g?(x(E),E=-1):g=!0,O(S,I-V))):(C.sortIndex=W,t(c,C),y||m||(y=!0,$(j))),C},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(C){var N=f;return function(){var I=f;f=N;try{return C.apply(this,arguments)}finally{f=I}}}})(aS);oS.exports=aS;var vR=oS.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var yR=p,en=vR;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var lS=new Set,wl={};function Li(e,t){Yo(e,t),Yo(e+"Capture",t)}function Yo(e,t){for(wl[e]=t,e=0;e<t.length;e++)lS.add(t[e])}var Dr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tm=Object.prototype.hasOwnProperty,xR=/^[: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]*$/,Nx={},Ex={};function wR(e){return Tm.call(Ex,e)?!0:Tm.call(Nx,e)?!1:xR.test(e)?Ex[e]=!0:(Nx[e]=!0,!1)}function bR(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function SR(e,t,n,r){if(t===null||typeof t>"u"||bR(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Rt(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var mt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mt[e]=new Rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mt[t]=new Rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mt[e]=new Rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mt[e]=new Rt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){mt[e]=new Rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mt[e]=new Rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mt[e]=new Rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mt[e]=new Rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mt[e]=new Rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wg=/[\-:]([a-z])/g;function Hg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wg,Hg);mt[t]=new Rt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wg,Hg);mt[t]=new Rt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wg,Hg);mt[t]=new Rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!1,!1)});mt.xlinkHref=new Rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function zg(e,t,n,r){var s=mt.hasOwnProperty(t)?mt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(SR(t,n,s,r)&&(n=null),r||s===null?wR(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}
vendor: 5,027 bytes, lines 33-37
33var Ur=yR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Mc=Symbol.for("react.element"),fo=Symbol.for("react.portal"),mo=Symbol.for("react.fragment"),qg=Symbol.for("react.strict_mode"),Pm=Symbol.for("react.profiler"),cS=Symbol.for("react.provider"),uS=Symbol.for("react.context"),Kg=Symbol.for("react.forward_ref"),Am=Symbol.for("react.suspense"),Rm=Symbol.for("react.suspense_list"),Gg=Symbol.for("react.memo"),ns=Symbol.for("react.lazy"),dS=Symbol.for("react.offscreen"),Tx=Symbol.iterator;function Ea(e){return e===null||typeof e!="object"?null:(e=Tx&&e[Tx]||e["@@iterator"],typeof e=="function"?e:null)}var Ve=Object.assign,af;function Ga(e){if(af===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);af=t&&t[1]||""}return`
34`+af+e}var lf=!1;function cf(e,t){if(!e||lf)return"";lf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=r.stack.split(`
36`),o=s.length-1,l=i.length-1;1<=o&&0<=l&&s[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==i[l]){var c=`
37`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{lf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ga(e):""}function jR(e){switch(e.tag){case 5:return Ga(e.type);case 16:return Ga("Lazy");case 13:return Ga("Suspense");case 19:return Ga("SuspenseList");case 0:case 2:case 15:return e=cf(e.type,!1),e;case 11:return e=cf(e.type.render,!1),e;case 1:return e=cf(e.type,!0),e;default:return""}}function Om(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case mo:return"Fragment";case fo:return"Portal";case Pm:return"Profiler";case qg:return"StrictMode";case Am:return"Suspense";case Rm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case uS:return(e.displayName||"Context")+".Consumer";case cS:return(e._context.displayName||"Context")+".Provider";case Kg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gg:return t=e.displayName||null,t!==null?t:Om(e.type)||"Memo";case ns:t=e._payload,e=e._init;try{return Om(e(t))}catch{}}return null}function kR(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Om(t);case 8:return t===qg?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ts(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function CR(e){var t=hS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dc(e){e._valueTracker||(e._valueTracker=CR(e))}function fS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ju(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Mm(e,t){var n=t.checked;return Ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Px(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ts(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}
vendor: 4,651 bytes, line 37
37function mS(e,t){t=t.checked,t!=null&&zg(e,"checked",t,!1)}function Dm(e,t){mS(e,t);var n=Ts(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Im(e,t.type,n):t.hasOwnProperty("defaultValue")&&Im(e,t.type,Ts(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ax(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Im(e,t,n){(t!=="number"||Ju(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ya=Array.isArray;function To(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ts(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Lm(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return Ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Rx(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(Ya(n)){if(1<n.length)throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ts(n)}}function pS(e,t){var n=Ts(t.value),r=Ts(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ox(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function gS(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Fm(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?gS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ic,vS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ic=Ic||document.createElement("div"),Ic.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ic.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function bl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rl={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},_R=["Webkit","ms","Moz","O"];Object.keys(rl).forEach(function(e){_R.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rl[t]=rl[e]})});function yS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rl.hasOwnProperty(e)&&rl[e]?(""+t).trim():t+"px"}function xS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=yS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var NR=Ve({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 $m(e,t){if(t){if(NR[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function Bm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="str
37ing";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Um=null;function Yg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vm=null,Po=null,Ao=null;function Mx(e){if(e=uc(e)){if(typeof Vm!="function")throw Error(L(280));var t=e.stateNode;t&&(t=Qd(t),Vm(e.stateNode,e.type,t))}}function wS(e){Po?Ao?Ao.push(e):Ao=[e]:Po=e}function bS(){if(Po){var e=Po,t=Ao;if(Ao=Po=null,Mx(e),t)for(e=0;e<t.length;e++)Mx(t[e])}}function SS(e,t){return e(t)}function jS(){}var uf=!1;function kS(e,t,n){if(uf)return e(t,n);uf=!0;try{return SS(e,t,n)}finally{uf=!1,(Po!==null||Ao!==null)&&(jS(),bS())}}function Sl(e,t){var n=e.stateNode;if(n===null)return null;var r=Qd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var Wm=!1;if(Dr)try{var Ta={};Object.defineProperty(Ta,"passive",{get:function(){Wm=!0}}),window.addEventListener("test",Ta,Ta),window.removeEventListener("test",Ta,Ta)}catch{Wm=!1}function ER(e,t,n,r,s,i,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var sl=!1,Qu=null,Xu=!1,Hm=null,TR={onError:function(e){sl=!0,Qu=e}};function PR(e,t,n,r,s,i,o,l,c){sl=!1,Qu=null,ER.apply(TR,arguments)}function AR(e,t,n,r,s,i,o,l,c){if(PR.apply(this,arguments),sl){if(sl){var u=Qu;sl=!1,Qu=null}else throw Error(L(198));Xu||(Xu=!0,Hm=u)}}function Fi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function CS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Dx(e){if(Fi(e)!==e)throw Error(L(188))}function RR(e){var t=e.alternate;if(!t){if(t=Fi(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Dx(s),e;if(i===r)return Dx(s),t;i=i.sibling}throw Error(L(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function _S(e){return e=RR(e),e!==null?NS(e):null}function NS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=NS(e);if(t!==null)return t;e=e.sibling}return null}var ES=en.unstable_scheduleCallback,Ix=en.unstable_cancelCallback,OR=en.unstable_shouldYield,MR=en.unstable_requestPaint,Ge=en.unstable_now,DR=en.unstable_getCurrentPriorityLevel,Jg=en.unstable_ImmediatePriority,TS=en.unstable_UserBlockingPriority,Zu=en.unstable_NormalPriority,IR=en.unstable_LowPriority,PS=en.unstable_IdlePriority,Kd=null,dr=null;function LR(e){if(dr&&typeof dr.onCommitFiberRoot=="function")try{dr.onCommitFiberRoot(Kd,e,void 0,(e.current.flags&128)===128)}catch{}}var Ln=Math.clz32?Math.clz32:BR,FR=Math.log,$R=Math.LN2;function BR(e){return e>>>=0,e===0?32:31-(FR(e)/$R|0)|0}var Lc=64,Fc=4194304;function Ja(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ed(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=Ja(l):(i&=o,i!==0&&(r=Ja(i)))}else o=n&~s,o!==0?r=Ja(o):i!==0&&(r=Ja(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ln(t),s=1<<n,r|=e[n],t&=~s;return r}function UR(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function VR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Ln(i),l=1<<o,c=s[o];c===-1?(!(l&n)||l&r)&&(s[o]=UR(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function zm(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function AS(){var e=Lc;return Lc<<=1,!(Lc&4194240)&&(Lc=64),e}function df(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function lc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ln(t),e[t]=n}function WR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Ln(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Qg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ln(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Ce=0;function RS(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var OS,Xg,MS,DS,IS,qm=!1,$c=[],vs=null,ys=null,xs=null,jl=new Map,kl=new Map,ss=[],HR="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 Lx(e,t){switch(e){case"focusin":case"focusout":vs=null;break;case"dragenter":case"dragleave":ys=null;break;case"mouseover":case"mouseout":xs=null;break;case"pointerover":case"pointerout":jl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Pa(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=uc(t),t!==null&&Xg(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 12,981 bytes, line 37
37function zR(e,t,n,r,s){switch(t){case"focusin":return vs=Pa(vs,e,t,n,r,s),!0;case"dragenter":return ys=Pa(ys,e,t,n,r,s),!0;case"mouseover":return xs=Pa(xs,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return jl.set(i,Pa(jl.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,kl.set(i,Pa(kl.get(i)||null,e,t,n,r,s)),!0}return!1}function LS(e){var t=li(e.target);if(t!==null){var n=Fi(t);if(n!==null){if(t=n.tag,t===13){if(t=CS(n),t!==null){e.blockedOn=t,IS(e.priority,function(){MS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Su(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Km(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Um=r,n.target.dispatchEvent(r),Um=null}else return t=uc(n),t!==null&&Xg(t),e.blockedOn=n,!1;t.shift()}return!0}function Fx(e,t,n){Su(e)&&n.delete(t)}function qR(){qm=!1,vs!==null&&Su(vs)&&(vs=null),ys!==null&&Su(ys)&&(ys=null),xs!==null&&Su(xs)&&(xs=null),jl.forEach(Fx),kl.forEach(Fx)}function Aa(e,t){e.blockedOn===t&&(e.blockedOn=null,qm||(qm=!0,en.unstable_scheduleCallback(en.unstable_NormalPriority,qR)))}function Cl(e){function t(s){return Aa(s,e)}if(0<$c.length){Aa($c[0],e);for(var n=1;n<$c.length;n++){var r=$c[n];r.blockedOn===e&&(r.blockedOn=null)}}for(vs!==null&&Aa(vs,e),ys!==null&&Aa(ys,e),xs!==null&&Aa(xs,e),jl.forEach(t),kl.forEach(t),n=0;n<ss.length;n++)r=ss[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ss.length&&(n=ss[0],n.blockedOn===null);)LS(n),n.blockedOn===null&&ss.shift()}var Ro=Ur.ReactCurrentBatchConfig,td=!0;function KR(e,t,n,r){var s=Ce,i=Ro.transition;Ro.transition=null;try{Ce=1,Zg(e,t,n,r)}finally{Ce=s,Ro.transition=i}}function GR(e,t,n,r){var s=Ce,i=Ro.transition;Ro.transition=null;try{Ce=4,Zg(e,t,n,r)}finally{Ce=s,Ro.transition=i}}function Zg(e,t,n,r){if(td){var s=Km(e,t,n,r);if(s===null)bf(e,t,r,nd,n),Lx(e,r);else if(zR(s,e,t,n,r))r.stopPropagation();else if(Lx(e,r),t&4&&-1<HR.indexOf(e)){for(;s!==null;){var i=uc(s);if(i!==null&&OS(i),i=Km(e,t,n,r),i===null&&bf(e,t,r,nd,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else bf(e,t,r,null,n)}}var nd=null;function Km(e,t,n,r){if(nd=null,e=Yg(r),e=li(e),e!==null)if(t=Fi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=CS(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return nd=e,null}function FS(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(DR()){case Jg:return 1;case TS:return 4;case Zu:case IR:return 16;case PS:return 536870912;default:return 16}default:return 16}}var fs=null,ev=null,ju=null;function $S(){if(ju)return ju;var e,t=ev,n=t.length,r,s="value"in fs?fs.value:fs.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return ju=s.slice(e,1<r?1-r:void 0)}function ku(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Bc(){return!0}function $x(){return!1}function rn(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Bc:$x,this.isPropagationStopped=$x,this}return Ve(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Bc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Bc)},persist:function(){},isPersistent:Bc}),t}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tv=rn(da),cc=Ve({},da,{view:0,detail:0}),YR=rn(cc),hf,ff,Ra,Gd=Ve({},cc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nv,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ra&&(Ra&&e.type==="mousemove"?(hf=e.screenX-Ra.screenX,ff=e.screenY-Ra.screenY):ff=hf=0,Ra=e),hf)},movementY:function(e){return"movementY"in e?e.movementY:ff}}),Bx=rn(Gd),JR=Ve({},Gd,{dataTransfer:0}),QR=rn(JR),XR=Ve({},cc,{relatedTarget:0}),mf=rn(XR),ZR=Ve({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),eO=rn(ZR),tO=Ve({},da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nO=rn(tO),rO=Ve({},da,{data:0}),Ux=rn(rO),sO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iO={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"},oO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aO(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=oO[e])?!!t[e]:!1}function nv(){return aO}var lO=Ve({},cc,{key:function(e){if(e.key){var t=sO[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ku(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?iO[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nv,charCode:function(e){return e.type==="keypress"?ku(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ku(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),cO=rn(lO),uO=Ve({},Gd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vx=rn(uO),dO=Ve({},cc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nv}),hO=rn(dO),fO=Ve({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),mO=rn(fO),pO=Ve({},Gd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),gO=rn(pO),vO=[9,13,27,32],rv=Dr&&"CompositionEvent"in window,il=null;Dr&&"documentMode"in document&&(il=document.documentMode);var yO=Dr&&"TextEvent"in window&&!il,BS=Dr&&(!rv||il&&8<il&&11>=il),Wx=" ",Hx=!1;function US(e,t){switch(e){case"keyup":return vO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var po=!1;function xO(e,t){switch(e){case"compositionend":return VS(t);case"keypress":return t.which!==32?null:(Hx=!0,Wx);case"textInput":return e=t.data,e===Wx&&Hx?null:e;default:return null}}function wO(e,t){if(po)return e==="compositionend"||!rv&&US(e,t)?(e=$S(),ju=ev=fs=null,po=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return BS&&t.locale!=="ko"?null:t.data;default:return null}}var bO={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 zx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bO[e.type]:t==="textarea"}function WS(e,t,n,r){wS(r),t=rd(t,"onChange"),0<t.length&&(n=new tv("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ol=null,_l=null;function SO(e){ej(e,0)}function Yd(e){var t=yo(e);if(fS(t))return e}function jO(e,t){if(e==="change")return t}var HS=!1;if(Dr){var pf;if(Dr){var gf="oninput"in document;if(!gf){var qx=document.createElement("div");qx.setAttribute("oninput","return;"),gf=typeof qx.oninput=="function"}pf=gf}else pf=!1;HS=pf&&(!document.documentMode||9<document.documentMode)}function Kx(){ol&&(ol.detachEvent("onpropertychange",zS),_l=ol=null)}function zS(e){if(e.propertyName==="value"&&Yd(_l)){var t=[];WS(t,_l,e,Yg(e)),kS(SO,t)}}function kO(e,t,n){e==="focusin"?(Kx(),ol=t,_l=n,ol.attachEvent("onpropertychange",zS)):e==="focusout"&&Kx()}function CO(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yd(_l)}function _O(e,t){if(e==="click")return Yd(t)}function NO(e,t){if(e==="input"||e==="change")return Yd(t)}function EO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Un=typeof Object.is=="function"?Object.is:EO;function Nl(e,t){if(Un(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Tm.call(t,s)||!Un(e[s],t[s]))return!1}return!0}function Gx(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yx(e,t){var n=Gx(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gx(n)}}function qS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function KS(){for(var e=window,t=Ju();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ju(e.document)}return t}function sv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function TO(e){var t=KS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qS(n.ownerDocument.documentElement,n)){if(r!==null&&sv(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Yx(n,i);var o=Yx(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var PO=Dr&&"documentMode"in document&&11>=document.documentMode,go=null,Gm=null,al=null,Ym=!1;function Jx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ym||go==null||go!==Ju(r)||(r=go,"selectionStart"in r&&sv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,352 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),al&&Nl(al,r)||(al=r,r=rd(Gm,"onSelect"),0<r.length&&(t=new tv("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=go)))}function Uc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vo={animationend:Uc("Animation","AnimationEnd"),animationiteration:Uc("Animation","AnimationIteration"),animationstart:Uc("Animation","AnimationStart"),transitionend:Uc("Transition","TransitionEnd")},vf={},GS={};Dr&&(GS=document.createElement("div").style,"AnimationEvent"in window||(delete vo.animationend.animation,delete vo.animationiteration.animation,delete vo.animationstart.animation),"TransitionEvent"in window||delete vo.transitionend.transition);function Jd(e){if(vf[e])return vf[e];if(!vo[e])return e;var t=vo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in GS)return vf[e]=t[n];return e}var YS=Jd("animationend"),JS=Jd("animationiteration"),QS=Jd("animationstart"),XS=Jd("transitionend"),ZS=new Map,Qx="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 Ls(e,t){ZS.set(e,t),Li(t,[e])}for(var yf=0;yf<Qx.length;yf++){var xf=Qx[yf],AO=xf.toLowerCase(),RO=xf[0].toUpperCase()+xf.slice(1);Ls(AO,"on"+RO)}Ls(YS,"onAnimationEnd");Ls(JS,"onAnimationIteration");Ls(QS,"onAnimationStart");Ls("dblclick","onDoubleClick");Ls("focusin","onFocus");Ls("focusout","onBlur");Ls(XS,"onTransitionEnd");Yo("onMouseEnter",["mouseout","mouseover"]);Yo("onMouseLeave",["mouseout","mouseover"]);Yo("onPointerEnter",["pointerout","pointerover"]);Yo("onPointerLeave",["pointerout","pointerover"]);Li("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Li("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Li("onBeforeInput",["compositionend","keypress","textInput","paste"]);Li("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Li("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Li("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qa="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(" "),OO=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qa));function Xx(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,AR(r,t,void 0,e),e.currentTarget=null}function ej(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;Xx(s,l,u),i=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;Xx(s,l,u),i=c}}}if(Xu)throw e=Hm,Xu=!1,Hm=null,e}function Me(e,t){var n=t[ep];n===void 0&&(n=t[ep]=new Set);var r=e+"__bubble";n.has(r)||(tj(t,e,2,!1),n.add(r))}function wf(e,t,n){var r=0;t&&(r|=4),tj(n,e,r,t)}var Vc="_reactListening"+Math.random().toString(36).slice(2);function El(e){if(!e[Vc]){e[Vc]=!0,lS.forEach(function(n){n!=="selectionchange"&&(OO.has(n)||wf(n,!1,e),wf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Vc]||(t[Vc]=!0,wf("selectionchange",!1,t))}}function tj(e,t,n,r){switch(FS(t)){case 1:var s=KR;break;case 4:s=GR;break;default:s=Zg}n=s.bind(null,t,n,e),s=void 0,!Wm||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}
vendor: 2,676 bytes, line 37
37function bf(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;l!==null;){if(o=li(l),o===null)return;if(c=o.tag,c===5||c===6){r=i=o;continue e}l=l.parentNode}}r=r.return}kS(function(){var u=i,d=Yg(n),h=[];e:{var f=ZS.get(e);if(f!==void 0){var m=tv,y=e;switch(e){case"keypress":if(ku(n)===0)break e;case"keydown":case"keyup":m=cO;break;case"focusin":y="focus",m=mf;break;case"focusout":y="blur",m=mf;break;case"beforeblur":case"afterblur":m=mf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Bx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=QR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=hO;break;case YS:case JS:case QS:m=eO;break;case XS:m=mO;break;case"scroll":m=YR;break;case"wheel":m=gO;break;case"copy":case"cut":case"paste":m=nO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Vx}var g=(t&4)!==0,b=!g&&e==="scroll",x=g?f!==null?f+"Capture":null:f;g=[];for(var v=u,w;v!==null;){w=v;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,x!==null&&(S=Sl(v,x),S!=null&&g.push(Tl(v,S,w)))),b)break;v=v.return}0<g.length&&(f=new m(f,y,null,n,d),h.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==Um&&(y=n.relatedTarget||n.fromElement)&&(li(y)||y[Ir]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(y=n.relatedTarget||n.toElement,m=u,y=y?li(y):null,y!==null&&(b=Fi(y),y!==b||y.tag!==5&&y.tag!==6)&&(y=null)):(m=null,y=u),m!==y)){if(g=Bx,S="onMouseLeave",x="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(g=Vx,S="onPointerLeave",x="onPointerEnter",v="pointer"),b=m==null?f:yo(m),w=y==null?f:yo(y),f=new g(S,v+"leave",m,n,d),f.target=b,f.relatedTarget=w,S=null,li(d)===u&&(g=new g(x,v+"enter",y,n,d),g.target=w,g.relatedTarget=b,S=g),b=S,m&&y)t:{for(g=m,x=y,v=0,w=g;w;w=Gi(w))v++;for(w=0,S=x;S;S=Gi(S))w++;for(;0<v-w;)g=Gi(g),v--;for(;0<w-v;)x=Gi(x),w--;for(;v--;){if(g===x||x!==null&&g===x.alternate)break t;g=Gi(g),x=Gi(x)}g=null}else g=null;m!==null&&Zx(h,f,m,g,!1),y!==null&&b!==null&&Zx(h,b,y,g,!0)}}
vendor: 5,805 bytes, lines 37-38
37e:{if(f=u?yo(u):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var j=jO;else if(zx(f))if(HS)j=NO;else{j=CO;var k=kO}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(j=_O);if(j&&(j=j(e,u))){WS(h,j,n,d);break e}k&&k(e,f,u),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Im(f,"number",f.value)}switch(k=u?yo(u):window,e){case"focusin":(zx(k)||k.contentEditable==="true")&&(go=k,Gm=u,al=null);break;case"focusout":al=Gm=go=null;break;case"mousedown":Ym=!0;break;case"contextmenu":case"mouseup":case"dragend":Ym=!1,Jx(h,n,d);break;case"selectionchange":if(PO)break;case"keydown":case"keyup":Jx(h,n,d)}var _;if(rv)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else po?US(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(BS&&n.locale!=="ko"&&(po||E!=="onCompositionStart"?E==="onCompositionEnd"&&po&&(_=$S()):(fs=d,ev="value"in fs?fs.value:fs.textContent,po=!0)),k=rd(u,E),0<k.length&&(E=new Ux(E,e,null,n,d),h.push({event:E,listeners:k}),_?E.data=_:(_=VS(n),_!==null&&(E.data=_)))),(_=yO?xO(e,n):wO(e,n))&&(u=rd(u,"onBeforeInput"),0<u.length&&(d=new Ux("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=_))}ej(h,t)})}function Tl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rd(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Sl(e,n),i!=null&&r.unshift(Tl(e,i,s)),i=Sl(e,t),i!=null&&r.push(Tl(e,i,s))),e=e.return}return r}function Gi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Zx(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=Sl(n,i),c!=null&&o.unshift(Tl(n,c,l))):s||(c=Sl(n,i),c!=null&&o.push(Tl(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var MO=/\r\n?/g,DO=/\u0000|\uFFFD/g;function ew(e){return(typeof e=="string"?e:""+e).replace(MO,`
38`).replace(DO,"")}function Wc(e,t,n){if(t=ew(t),ew(e)!==t&&n)throw Error(L(425))}function sd(){}var Jm=null,Qm=null;function Xm(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Zm=typeof setTimeout=="function"?setTimeout:void 0,IO=typeof clearTimeout=="function"?clearTimeout:void 0,tw=typeof Promise=="function"?Promise:void 0,LO=typeof queueMicrotask=="function"?queueMicrotask:typeof tw<"u"?function(e){return tw.resolve(null).then(e).catch(FO)}:Zm;function FO(e){setTimeout(function(){throw e})}function Sf(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Cl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Cl(t)}function ws(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function nw(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ha=Math.random().toString(36).slice(2),ir="__reactFiber$"+ha,Pl="__reactProps$"+ha,Ir="__reactContainer$"+ha,ep="__reactEvents$"+ha,$O="__reactListeners$"+ha,BO="__reactHandles$"+ha;function li(e){var t=e[ir];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ir]||n[ir]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=nw(e);e!==null;){if(n=e[ir])return n;e=nw(e)}return t}e=n,n=e.parentNode}return null}function uc(e){return e=e[ir]||e[Ir],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function yo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function Qd(e){return e[Pl]||null}var tp=[],xo=-1;function Fs(e){return{current:e}}function Ie(e){0>xo||(e.current=tp[xo],tp[xo]=null,xo--)}function Ae(e,t){xo++,tp[xo]=e.current,e.current=t}var Ps={},St=Fs(Ps),Bt=Fs(!1),Ci=Ps;function Jo(e,t){var n=e.type.contextTypes;if(!n)return Ps;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ut(e){return e=e.childContextTypes,e!=null}function id(){Ie(Bt),Ie(St)}function rw(e,t,n){if(St.current!==Ps)throw Error(L(168));Ae(St,t),Ae(Bt,n)}function nj(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(L(108,kR(e)||"Unknown",s));return Ve({},n,r)}function od(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ps,Ci=St.current,Ae(St,e),Ae(Bt,Bt.current),!0}function sw(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=nj(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,Ie(Bt),Ie(St),Ae(St,e)):Ie(Bt),Ae(Bt,n)}var Er=null,Xd=!1,jf=!1;function rj(e){Er===null?Er=[e]:Er.push(e)}function UO(e){Xd=!0,rj(e)}function $s(){if(!jf&&Er!==null){jf=!0;var e=0,t=Ce;try{var n=Er;for(Ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Er=null,Xd=!1}catch(s){throw Er!==null&&(Er=Er.slice(e+1)),ES(Jg,$s),s}finally{Ce=t,jf=!1}}return null}var wo=[],bo=0,ad=null,ld=0,un=[],dn=0,_i=null,Pr=1,Ar="";function ni(e,t){wo[bo++]=ld,wo[bo++]=ad,ad=e,ld=t}function sj(e,t,n){un[dn++]=Pr,un[dn++]=Ar,un[dn++]=_i,_i=e;var r=Pr;e=Ar;var s=32-Ln(r)-1;r&=~(1<<s),n+=1;var i=32-Ln(t)+s;
vendor: 13,113 bytes, line 38
38if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Pr=1<<32-Ln(t)+s|n<<s|r,Ar=i+e}else Pr=1<<i|n<<s|r,Ar=e}function iv(e){e.return!==null&&(ni(e,1),sj(e,1,0))}function ov(e){for(;e===ad;)ad=wo[--bo],wo[bo]=null,ld=wo[--bo],wo[bo]=null;for(;e===_i;)_i=un[--dn],un[dn]=null,Ar=un[--dn],un[dn]=null,Pr=un[--dn],un[dn]=null}var Xt=null,Qt=null,Fe=!1,Dn=null;function ij(e,t){var n=hn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function iw(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Xt=e,Qt=ws(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Xt=e,Qt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=_i!==null?{id:Pr,overflow:Ar}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=hn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Xt=e,Qt=null,!0):!1;default:return!1}}function np(e){return(e.mode&1)!==0&&(e.flags&128)===0}function rp(e){if(Fe){var t=Qt;if(t){var n=t;if(!iw(e,t)){if(np(e))throw Error(L(418));t=ws(n.nextSibling);var r=Xt;t&&iw(e,t)?ij(r,n):(e.flags=e.flags&-4097|2,Fe=!1,Xt=e)}}else{if(np(e))throw Error(L(418));e.flags=e.flags&-4097|2,Fe=!1,Xt=e}}}function ow(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Xt=e}function Hc(e){if(e!==Xt)return!1;if(!Fe)return ow(e),Fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Xm(e.type,e.memoizedProps)),t&&(t=Qt)){if(np(e))throw oj(),Error(L(418));for(;t;)ij(e,t),t=ws(t.nextSibling)}if(ow(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qt=ws(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qt=null}}else Qt=Xt?ws(e.stateNode.nextSibling):null;return!0}function oj(){for(var e=Qt;e;)e=ws(e.nextSibling)}function Qo(){Qt=Xt=null,Fe=!1}function av(e){Dn===null?Dn=[e]:Dn.push(e)}var VO=Ur.ReactCurrentBatchConfig;function Oa(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=s.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function zc(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function aw(e){var t=e._init;return t(e._payload)}function aj(e){function t(x,v){if(e){var w=x.deletions;w===null?(x.deletions=[v],x.flags|=16):w.push(v)}}function n(x,v){if(!e)return null;for(;v!==null;)t(x,v),v=v.sibling;return null}function r(x,v){for(x=new Map;v!==null;)v.key!==null?x.set(v.key,v):x.set(v.index,v),v=v.sibling;return x}function s(x,v){return x=ks(x,v),x.index=0,x.sibling=null,x}function i(x,v,w){return x.index=w,e?(w=x.alternate,w!==null?(w=w.index,w<v?(x.flags|=2,v):w):(x.flags|=2,v)):(x.flags|=1048576,v)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function l(x,v,w,S){return v===null||v.tag!==6?(v=Pf(w,x.mode,S),v.return=x,v):(v=s(v,w),v.return=x,v)}function c(x,v,w,S){var j=w.type;return j===mo?d(x,v,w.props.children,S,w.key):v!==null&&(v.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ns&&aw(j)===v.type)?(S=s(v,w.props),S.ref=Oa(x,v,w),S.return=x,S):(S=Au(w.type,w.key,w.props,null,x.mode,S),S.ref=Oa(x,v,w),S.return=x,S)}function u(x,v,w,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=Af(w,x.mode,S),v.return=x,v):(v=s(v,w.children||[]),v.return=x,v)}function d(x,v,w,S,j){return v===null||v.tag!==7?(v=Si(w,x.mode,S,j),v.return=x,v):(v=s(v,w),v.return=x,v)}function h(x,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Pf(""+v,x.mode,w),v.return=x,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Mc:return w=Au(v.type,v.key,v.props,null,x.mode,w),w.ref=Oa(x,null,v),w.return=x,w;case fo:return v=Af(v,x.mode,w),v.return=x,v;case ns:var S=v._init;return h(x,S(v._payload),w)}if(Ya(v)||Ea(v))return v=Si(v,x.mode,w,null),v.return=x,v;zc(x,v)}return null}function f(x,v,w,S){var j=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return j!==null?null:l(x,v,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Mc:return w.key===j?c(x,v,w,S):null;case fo:return w.key===j?u(x,v,w,S):null;case ns:return j=w._init,f(x,v,j(w._payload),S)}if(Ya(w)||Ea(w))return j!==null?null:d(x,v,w,S,null);zc(x,w)}return null}function m(x,v,w,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return x=x.get(w)||null,l(v,x,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Mc:return x=x.get(S.key===null?w:S.key)||null,c(v,x,S,j);case fo:return x=x.get(S.key===null?w:S.key)||null,u(v,x,S,j);case ns:var k=S._init;return m(x,v,w,k(S._payload),j)}if(Ya(S)||Ea(S))return x=x.get(w)||null,d(v,x,S,j,null);zc(v,S)}return null}function y(x,v,w,S){for(var j=null,k=null,_=v,E=v=0,P=null;_!==null&&E<w.length;E++){_.index>E?(P=_,_=null):P=_.sibling;var T=f(x,_,w[E],S);if(T===null){_===null&&(_=P);break}e&&_&&T.alternate===null&&t(x,_),v=i(T,v,E),k===null?j=T:k.sibling=T,k=T,_=P}if(E===w.length)return n(x,_),Fe&&ni(x,E),j;if(_===null){for(;E<w.length;E++)_=h(x,w[E],S),_!==null&&(v=i(_,v,E),k===null?j=_:k.sibling=_,k=_);return Fe&&ni(x,E),j}for(_=r(x,_);E<w.length;E++)P=m(_,x,E,w[E],S),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?E:P.key),v=i(P,v,E),k===null?j=P:k.sibling=P,k=P);return e&&_.forEach(function(F){return t(x,F)}),Fe&&ni(x,E),j}function g(x,v,w,S){var j=Ea(w);if(typeof j!="function")throw Error(L(150));if(w=j.call(w),w==null)throw Error(L(151));for(var k=j=null,_=v,E=v=0,P=null,T=w.next();_!==null&&!T.done;E++,T=w.next()){_.index>E?(P=_,_=null):P=_.sibling;var F=f(x,_,T.value,S);if(F===null){_===null&&(_=P);break}e&&_&&F.alternate===null&&t(x,_),v=i(F,v,E),k===null?j=F:k.sibling=F,k=F,_=P}if(T.done)return n(x,_),Fe&&ni(x,E),j;if(_===null){for(;!T.done;E++,T=w.next())T=h(x,T.value,S),T!==null&&(v=i(T,v,E),k===null?j=T:k.sibling=T,k=T);return Fe&&ni(x,E),j}for(_=r(x,_);!T.done;E++,T=w.next())T=m(_,x,E,T.value,S),T!==null&&(e&&T.alternate!==null&&_.delete(T.key===null?E:T.key),v=i(T,v,E),k===null?j=T:k.sibling=T,k=T);return e&&_.forEach(function(D){return t(x,D)}),Fe&&ni(x,E),j}function b(x,v,w,S){if(typeof w=="object"&&w!==null&&w.type===mo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Mc:e:{for(var j=w.key,k=v;k!==null;){if(k.key===j){if(j=w.type,j===mo){if(k.tag===7){n(x,k.sibling),v=s(k,w.props.children),v.return=x,x=v;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===ns&&aw(j)===k.type){n(x,k.sibling),v=s(k,w.props),v.ref=Oa(x,k,w),v.return=x,x=v;break e}n(x,k);break}else t(x,k);k=k.sibling}w.type===mo?(v=Si(w.props.children,x.mode,S,w.key),v.return=x,x=v):(S=Au(w.type,w.key,w.props,null,x.mode,S),S.ref=Oa(x,v,w),S.return=x,x=S)}return o(x);case fo:e:{for(k=w.key;v!==null;){if(v.key===k)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(x,v.sibling),v=s(v,w.children||[]),v.return=x,x=v;break e}else{n(x,v);break}else t(x,v);v=v.sibling}v=Af(w,x.mode,S),v.return=x,x=v}return o(x);case ns:return k=w._init,b(x,v,k(w._payload),S)}if(Ya(w))return y(x,v,w,S);if(Ea(w))return g(x,v,w,S);zc(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(x,v.sibling),v=s(v,w),v.return=x,x=v):(n(x,v),v=Pf(w,x.mode,S),v.return=x,x=v),o(x)):n(x,v)}return b}var Xo=aj(!0),lj=aj(!1),cd=Fs(null),ud=null,So=null,lv=null;function cv(){lv=So=ud=null}function uv(e){var t=cd.current;Ie(cd),e._currentValue=t}function sp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Oo(e,t){ud=e,lv=So=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ft=!0),e.firstContext=null)}function vn(e){var t=e._currentValue;if(lv!==e)if(e={context:e,memoizedValue:t,next:null},So===null){if(ud===null)throw Error(L(308));So=e,ud.dependencies={lanes:0,firstContext:e}}else So=So.next=e;return t}var ci=null;function dv(e){ci===null?ci=[e]:ci.push(e)}function cj(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,dv(t)):(n.next=s.next,s.next=n),t.interleaved=n,Lr(e,r)}function Lr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var rs=!1;function hv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function uj(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bs(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ye&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Lr(e,n)}return s=r.interleaved,s===null?(t.next=t,dv(r)):(t.next=s.next,s.next=t),r.interleaved=t,Lr(e,n)}function Cu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qg(e,n)}}function lw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function dd(e,t,n,r){var s=e.updateQueue;rs=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=s.baseState;o=0,d=u=c=null,l=i;do{var f=l.lane,m=l.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,g=l;switch(f=t,m=n,g.tag){case 1:if(y=g.payload,typeof y=="function"){h=y.call(m,h,f);break e}h=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,f=typeof y=="function"?y.call(m,h,f):y,f==null)break e;h=Ve({},h,f);break e;case 2:rs=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[l]:f.push(l))}else m={eventTime:m,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=h):d=d.next=m,o|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;f=l,l=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Ei|=o,e.lanes=o,e.memoizedState=h}}function cw(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(L(191,s));s.call(r)}}}var dc={},hr=Fs(dc),Al=Fs(dc),Rl=Fs(dc);function ui(e){if(e===dc)throw Error(L(174));return e}function fv(e,t){switch(Ae(Rl,t),Ae(Al,e),Ae(hr,dc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fm(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fm(t,e)}Ie(hr),Ae(hr,t)}function Zo(){Ie(hr),Ie(Al),Ie(Rl)}function dj(e){ui(Rl.current);var t=ui(hr.current),n=Fm(t,e.type);t!==n&&(Ae(Al,e),Ae(hr,n))}function mv(e){Al.current===e&&(Ie(hr),Ie(Al))}var Be=Fs(0);function hd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var kf=[];function pv(){for(var e=0;e<kf.length;e++)kf[e]._workInProgressVersionPrimary=null;kf.length=0}var _u=Ur.ReactCurrentDispatcher,Cf=Ur.ReactCurrentBatchConfig,Ni=0,Ue=null,tt=null,st=null,fd=!1,ll=!1,Ol=0,WO=0;function yt(){throw Error(L(321))}
vendor: 4,659 bytes, line 38
38function gv(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Un(e[n],t[n]))return!1;return!0}function vv(e,t,n,r,s,i){if(Ni=i,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_u.current=e===null||e.memoizedState===null?KO:GO,e=n(r,s),ll){i=0;do{if(ll=!1,Ol=0,25<=i)throw Error(L(301));i+=1,st=tt=null,t.updateQueue=null,_u.current=YO,e=n(r,s)}while(ll)}if(_u.current=md,t=tt!==null&&tt.next!==null,Ni=0,st=tt=Ue=null,fd=!1,t)throw Error(L(300));return e}function yv(){var e=Ol!==0;return Ol=0,e}function Qn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?Ue.memoizedState=st=e:st=st.next=e,st}function yn(){if(tt===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=st===null?Ue.memoizedState:st.next;if(t!==null)st=t,tt=e;else{if(e===null)throw Error(L(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},st===null?Ue.memoizedState=st=e:st=st.next=e}return st}function Ml(e,t){return typeof t=="function"?t(e):t}function _f(e){var t=yn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=tt,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var l=o=null,c=null,u=i;do{var d=u.lane;if((Ni&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,o=r):c=c.next=h,Ue.lanes|=d,Ei|=d}u=u.next}while(u!==null&&u!==i);c===null?o=r:c.next=l,Un(r,t.memoizedState)||(Ft=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Ue.lanes|=i,Ei|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Nf(e){var t=yn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Un(i,t.memoizedState)||(Ft=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function hj(){}function fj(e,t){var n=Ue,r=yn(),s=t(),i=!Un(r.memoizedState,s);if(i&&(r.memoizedState=s,Ft=!0),r=r.queue,xv(gj.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||st!==null&&st.memoizedState.tag&1){if(n.flags|=2048,Dl(9,pj.bind(null,n,r,s,t),void 0,null),it===null)throw Error(L(349));Ni&30||mj(n,t,s)}return s}function mj(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function pj(e,t,n,r){t.value=n,t.getSnapshot=r,vj(t)&&yj(e)}function gj(e,t,n){return n(function(){vj(t)&&yj(e)})}function vj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Un(e,n)}catch{return!0}}function yj(e){var t=Lr(e,1);t!==null&&Fn(t,e,1,-1)}function uw(e){var t=Qn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:e},t.queue=e,e=e.dispatch=qO.bind(null,Ue,e),[t.memoizedState,e]}function Dl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function xj(){return yn().memoizedState}function Nu(e,t,n,r){var s=Qn();Ue.flags|=e,s.memoizedState=Dl(1|t,n,void 0,r===void 0?null:r)}function Zd(e,t,n,r){var s=yn();r=r===void 0?null:r;var i=void 0;if(tt!==null){var o=tt.memoizedState;if(i=o.destroy,r!==null&&gv(r,o.deps)){s.memoizedState=Dl(t,n,i,r);return}}Ue.flags|=e,s.memoizedState=Dl(1|t,n,i,r)}function dw(e,t){return Nu(8390656,8,e,t)}function xv(e,t){return Zd(2048,8,e,t)}function wj(e,t){return Zd(4,2,e,t)}function bj(e,t){return Zd(4,4,e,t)}function Sj(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function jj(e,t,n){return n=n!=null?n.concat([e]):null,Zd(4,4,Sj.bind(null,t,e),n)}function wv(){}function kj(e,t){var n=yn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gv(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cj(e,t){var n=yn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&gv(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}
vendor: 7,400 bytes, lines 38-40
38function _j(e,t,n){return Ni&21?(Un(n,t)||(n=AS(),Ue.lanes|=n,Ei|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ft=!0),e.memoizedState=n)}function HO(e,t){var n=Ce;Ce=n!==0&&4>n?n:4,e(!0);var r=Cf.transition;Cf.transition={};try{e(!1),t()}finally{Ce=n,Cf.transition=r}}function Nj(){return yn().memoizedState}function zO(e,t,n){var r=js(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ej(e))Tj(t,n);else if(n=cj(e,t,n,r),n!==null){var s=Tt();Fn(n,e,r,s),Pj(n,t,r)}}function qO(e,t,n){var r=js(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ej(e))Tj(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,Un(l,o)){var c=t.interleaved;c===null?(s.next=s,dv(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=cj(e,t,s,r),n!==null&&(s=Tt(),Fn(n,e,r,s),Pj(n,t,r))}}function Ej(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function Tj(e,t){ll=fd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Pj(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qg(e,n)}}var md={readContext:vn,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useInsertionEffect:yt,useLayoutEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useMutableSource:yt,useSyncExternalStore:yt,useId:yt,unstable_isNewReconciler:!1},KO={readContext:vn,useCallback:function(e,t){return Qn().memoizedState=[e,t===void 0?null:t],e},useContext:vn,useEffect:dw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Nu(4194308,4,Sj.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Nu(4,2,e,t)},useMemo:function(e,t){var n=Qn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Qn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zO.bind(null,Ue,e),[r.memoizedState,e]},useRef:function(e){var t=Qn();return e={current:e},t.memoizedState=e},useState:uw,useDebugValue:wv,useDeferredValue:function(e){return Qn().memoizedState=e},useTransition:function(){var e=uw(!1),t=e[0];return e=HO.bind(null,e[1]),Qn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ue,s=Qn();if(Fe){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),it===null)throw Error(L(349));Ni&30||mj(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,dw(gj.bind(null,r,i,e),[e]),r.flags|=2048,Dl(9,pj.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Qn(),t=it.identifierPrefix;if(Fe){var n=Ar,r=Pr;n=(r&~(1<<32-Ln(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ol++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=WO++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},GO={readContext:vn,useCallback:kj,useContext:vn,useEffect:xv,useImperativeHandle:jj,useInsertionEffect:wj,useLayoutEffect:bj,useMemo:Cj,useReducer:_f,useRef:xj,useState:function(){return _f(Ml)},useDebugValue:wv,useDeferredValue:function(e){var t=yn();return _j(t,tt.memoizedState,e)},useTransition:function(){var e=_f(Ml)[0],t=yn().memoizedState;return[e,t]},useMutableSource:hj,useSyncExternalStore:fj,useId:Nj,unstable_isNewReconciler:!1},YO={readContext:vn,useCallback:kj,useContext:vn,useEffect:xv,useImperativeHandle:jj,useInsertionEffect:wj,useLayoutEffect:bj,useMemo:Cj,useReducer:Nf,useRef:xj,useState:function(){return Nf(Ml)},useDebugValue:wv,useDeferredValue:function(e){var t=yn();return tt===null?t.memoizedState=e:_j(t,tt.memoizedState,e)},useTransition:function(){var e=Nf(Ml)[0],t=yn().memoizedState;return[e,t]},useMutableSource:hj,useSyncExternalStore:fj,useId:Nj,unstable_isNewReconciler:!1};function En(e,t){if(e&&e.defaultProps){t=Ve({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ip(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ve({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var eh={isMounted:function(e){return(e=e._reactInternals)?Fi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Tt(),s=js(e),i=Rr(r,s);i.payload=t,n!=null&&(i.callback=n),t=bs(e,i,s),t!==null&&(Fn(t,e,s,r),Cu(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Tt(),s=js(e),i=Rr(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=bs(e,i,s),t!==null&&(Fn(t,e,s,r),Cu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tt(),r=js(e),s=Rr(n,r);s.tag=2,t!=null&&(s.callback=t),t=bs(e,s,r),t!==null&&(Fn(t,e,r,n),Cu(t,e,r))}};function hw(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Nl(n,r)||!Nl(s,i):!0}function Aj(e,t,n){var r=!1,s=Ps,i=t.contextType;return typeof i=="object"&&i!==null?i=vn(i):(s=Ut(t)?Ci:St.current,r=t.contextTypes,i=(r=r!=null)?Jo(e,s):Ps),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=eh,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function fw(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&eh.enqueueReplaceState(t,t.state,null)}function op(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},hv(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=vn(i):(i=Ut(t)?Ci:St.current,s.context=Jo(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ip(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&eh.enqueueReplaceState(s,s.state,null),dd(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ea(e,t){try{var n="",r=t;do n+=jR(r),r=r.return;while(r);var s=n}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Ef(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ap(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var JO=typeof WeakMap=="function"?WeakMap:Map;function Rj(e,t,n){n=Rr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gd||(gd=!0,vp=r),ap(e,t)},n}function Oj(e,t,n){n=Rr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){ap(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ap(e,t),typeof r!="function"&&(Ss===null?Ss=new Set([this]):Ss.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}
vendor: 8,567 bytes, line 40
40function mw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new JO;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=u2.bind(null,e,t,n),t.then(e,e))}function pw(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function gw(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rr(-1,1),t.tag=2,bs(n,t,1))),n.lanes|=1),e)}var QO=Ur.ReactCurrentOwner,Ft=!1;function kt(e,t,n,r){t.child=e===null?lj(t,null,n,r):Xo(t,e.child,n,r)}function vw(e,t,n,r,s){n=n.render;var i=t.ref;return Oo(t,s),r=vv(e,t,n,r,i,s),n=yv(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Fr(e,t,s)):(Fe&&n&&iv(t),t.flags|=1,kt(e,t,r,s),t.child)}function yw(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Ev(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Mj(e,t,i,r,s)):(e=Au(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Nl,n(o,r)&&e.ref===t.ref)return Fr(e,t,s)}return t.flags|=1,e=ks(i,r),e.ref=t.ref,e.return=t,t.child=e}function Mj(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Nl(i,r)&&e.ref===t.ref)if(Ft=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ft=!0);else return t.lanes=e.lanes,Fr(e,t,s)}return lp(e,t,n,r,s)}function Dj(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ae(ko,Gt),Gt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ae(ko,Gt),Gt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ae(ko,Gt),Gt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ae(ko,Gt),Gt|=r;return kt(e,t,s,n),t.child}function Ij(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function lp(e,t,n,r,s){var i=Ut(n)?Ci:St.current;return i=Jo(t,i),Oo(t,s),n=vv(e,t,n,r,i,s),r=yv(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Fr(e,t,s)):(Fe&&r&&iv(t),t.flags|=1,kt(e,t,n,s),t.child)}function xw(e,t,n,r,s){if(Ut(n)){var i=!0;od(t)}else i=!1;if(Oo(t,s),t.stateNode===null)Eu(e,t),Aj(t,n,r),op(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=vn(u):(u=Ut(n)?Ci:St.current,u=Jo(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&fw(t,o,r,u),rs=!1;var f=t.memoizedState;o.state=f,dd(t,r,o,s),c=t.memoizedState,l!==r||f!==c||Bt.current||rs?(typeof d=="function"&&(ip(t,n,d,r),c=t.memoizedState),(l=rs||hw(t,n,l,r,f,c,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,uj(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:En(t.type,l),o.props=u,h=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=vn(c):(c=Ut(n)?Ci:St.current,c=Jo(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==h||f!==c)&&fw(t,o,r,c),rs=!1,f=t.memoizedState,o.state=f,dd(t,r,o,s);var y=t.memoizedState;l!==h||f!==y||Bt.current||rs?(typeof m=="function"&&(ip(t,n,m,r),y=t.memoizedState),(u=rs||hw(t,n,u,r,f,y,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return cp(e,t,n,r,i,s)}function cp(e,t,n,r,s,i){Ij(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&sw(t,n,!1),Fr(e,t,i);r=t.stateNode,QO.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Xo(t,e.child,null,i),t.child=Xo(t,null,l,i)):kt(e,t,l,i),t.memoizedState=r.state,s&&sw(t,n,!0),t.child}function Lj(e){var t=e.stateNode;t.pendingContext?rw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&rw(e,t.context,!1),fv(e,t.containerInfo)}function ww(e,t,n,r,s){return Qo(),av(s),t.flags|=256,kt(e,t,n,r),t.child}var up={dehydrated:null,treeContext:null,retryLane:0};function dp(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fj(e,t,n){var r=t.pendingProps,s=Be.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Ae(Be,s&1),e===null)return rp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=rh(o,r,0,null),e=Si(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=dp(n),t.memoizedState=up,e):bv(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return XO(e,t,o,r,l,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ks(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=ks(l,i):(i=Si(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?dp(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=up,r}return i=e.child,e=i.sibling,r=ks(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function bv(e,t){return t=rh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function qc(e,t,n,r){return r!==null&&av(r),Xo(t,e.child,null,n),e=bv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function XO(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Ef(Error(L(422))),qc(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=rh({mode:"visible",children:r.children},s,0,null),i=Si(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Xo(t,e.child,null,o),t.child.memoizedState=dp(o),t.memoizedState=up,i);if(!(t.mode&1))return qc(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(L(419)),r=Ef(i,r,void 0),qc(e,t,o,r)}if(l=(o&e.childLanes)!==0,Ft||l){if(r=it,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,Lr(e,s),Fn(r,e,s,-1))}
vendor: 5,772 bytes, line 40
40return Nv(),r=Ef(Error(L(421))),qc(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=d2.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Qt=ws(s.nextSibling),Xt=t,Fe=!0,Dn=null,e!==null&&(un[dn++]=Pr,un[dn++]=Ar,un[dn++]=_i,Pr=e.id,Ar=e.overflow,_i=t),t=bv(t,r.children),t.flags|=4096,t)}function bw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),sp(e.return,t,n)}function Tf(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function $j(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(kt(e,t,r.children,n),r=Be.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bw(e,n,t);else if(e.tag===19)bw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ae(Be,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&hd(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Tf(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&hd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Tf(t,!0,n,null,i);break;case"together":Tf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Eu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ei|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=ks(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ks(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ZO(e,t,n){switch(t.tag){case 3:Lj(t),Qo();break;case 5:dj(t);break;case 1:Ut(t.type)&&od(t);break;case 4:fv(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Ae(cd,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ae(Be,Be.current&1),t.flags|=128,null):n&t.child.childLanes?Fj(e,t,n):(Ae(Be,Be.current&1),e=Fr(e,t,n),e!==null?e.sibling:null);Ae(Be,Be.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return $j(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ae(Be,Be.current),r)break;return null;case 22:case 23:return t.lanes=0,Dj(e,t,n)}return Fr(e,t,n)}var Bj,hp,Uj,Vj;Bj=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};hp=function(){};Uj=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,ui(hr.current);var i=null;switch(n){case"input":s=Mm(e,s),r=Mm(e,r),i=[];break;case"select":s=Ve({},s,{value:void 0}),r=Ve({},r,{value:void 0}),i=[];break;case"textarea":s=Lm(e,s),r=Lm(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=sd)}$m(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(wl.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(wl.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Me("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Vj=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ma(e,t){if(!Fe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function e2(e,t,n){var r=t.pendingProps;switch(ov(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(t),null;case 1:return Ut(t.type)&&id(),xt(t),null;case 3:return r=t.stateNode,Zo(),Ie(Bt),Ie(St),pv(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Hc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Dn!==null&&(wp(Dn),Dn=null))),hp(e,t),xt(t),null;case 5:mv(t);var s=ui(Rl.current);
vendor: 33,253 bytes, line 40
40if(n=t.type,e!==null&&t.stateNode!=null)Uj(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return xt(t),null}if(e=ui(hr.current),Hc(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[ir]=t,r[Pl]=i,e=(t.mode&1)!==0,n){case"dialog":Me("cancel",r),Me("close",r);break;case"iframe":case"object":case"embed":Me("load",r);break;case"video":case"audio":for(s=0;s<Qa.length;s++)Me(Qa[s],r);break;case"source":Me("error",r);break;case"img":case"image":case"link":Me("error",r),Me("load",r);break;case"details":Me("toggle",r);break;case"input":Px(r,i),Me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Me("invalid",r);break;case"textarea":Rx(r,i),Me("invalid",r)}$m(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Wc(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Wc(r.textContent,l,e),s=["children",""+l]):wl.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Me("scroll",r)}switch(n){case"input":Dc(r),Ax(r,i,!0);break;case"textarea":Dc(r),Ox(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=sd)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=gS(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ir]=t,e[Pl]=r,Bj(e,t,!1,!1),t.stateNode=e;e:{switch(o=Bm(n,r),n){case"dialog":Me("cancel",e),Me("close",e),s=r;break;case"iframe":case"object":case"embed":Me("load",e),s=r;break;case"video":case"audio":for(s=0;s<Qa.length;s++)Me(Qa[s],e);s=r;break;case"source":Me("error",e),s=r;break;case"img":case"image":case"link":Me("error",e),Me("load",e),s=r;break;case"details":Me("toggle",e),s=r;break;case"input":Px(e,r),s=Mm(e,r),Me("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Ve({},r,{value:void 0}),Me("invalid",e);break;case"textarea":Rx(e,r),s=Lm(e,r),Me("invalid",e);break;default:s=r}$m(n,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?xS(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&vS(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&bl(e,c):typeof c=="number"&&bl(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(wl.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Me("scroll",e):c!=null&&zg(e,i,c,o))}switch(n){case"input":Dc(e),Ax(e,r,!1);break;case"textarea":Dc(e),Ox(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ts(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?To(e,!!r.multiple,i,!1):r.defaultValue!=null&&To(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=sd)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return xt(t),null;case 6:if(e&&t.stateNode!=null)Vj(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=ui(Rl.current),ui(hr.current),Hc(t)){if(r=t.stateNode,n=t.memoizedProps,r[ir]=t,(i=r.nodeValue!==n)&&(e=Xt,e!==null))switch(e.tag){case 3:Wc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Wc(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ir]=t,t.stateNode=r}return xt(t),null;case 13:if(Ie(Be),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Fe&&Qt!==null&&t.mode&1&&!(t.flags&128))oj(),Qo(),t.flags|=98560,i=!1;else if(i=Hc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(L(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[ir]=t}else Qo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xt(t),i=!1}else Dn!==null&&(wp(Dn),Dn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Be.current&1?nt===0&&(nt=3):Nv())),t.updateQueue!==null&&(t.flags|=4),xt(t),null);case 4:return Zo(),hp(e,t),e===null&&El(t.stateNode.containerInfo),xt(t),null;case 10:return uv(t.type._context),xt(t),null;case 17:return Ut(t.type)&&id(),xt(t),null;case 19:if(Ie(Be),i=t.memoizedState,i===null)return xt(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Ma(i,!1);else{if(nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=hd(e),o!==null){for(t.flags|=128,Ma(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ae(Be,Be.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ge()>ta&&(t.flags|=128,r=!0,Ma(i,!1),t.lanes=4194304)}else{if(!r)if(e=hd(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ma(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Fe)return xt(t),null}else 2*Ge()-i.renderingStartTime>ta&&n!==1073741824&&(t.flags|=128,r=!0,Ma(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ge(),t.sibling=null,n=Be.current,Ae(Be,r?n&1|2:n&1),t):(xt(t),null);case 22:case 23:return _v(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Gt&1073741824&&(xt(t),t.subtreeFlags&6&&(t.flags|=8192)):xt(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function t2(e,t){switch(ov(t),t.tag){case 1:return Ut(t.type)&&id(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zo(),Ie(Bt),Ie(St),pv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mv(t),null;case 13:if(Ie(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Qo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ie(Be),null;case 4:return Zo(),null;case 10:return uv(t.type._context),null;case 22:case 23:return _v(),null;case 24:return null;default:return null}}var Kc=!1,bt=!1,n2=typeof WeakSet=="function"?WeakSet:Set,H=null;function jo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ze(e,t,r)}else n.current=null}function fp(e,t,n){try{n()}catch(r){ze(e,t,r)}}var Sw=!1;function r2(e,t){if(Jm=td,e=KS(),sv(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var m;h!==n||s!==0&&h.nodeType!==3||(l=o+s),h!==i||r!==0&&h.nodeType!==3||(c=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(m=h.firstChild)!==null;)f=h,h=m;for(;;){if(h===e)break t;if(f===n&&++u===s&&(l=o),f===i&&++d===r&&(c=o),(m=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qm={focusedElem:e,selectionRange:n},td=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,b=y.memoizedState,x=t.stateNode,v=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:En(t.type,g),b);x.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(S){ze(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return y=Sw,Sw=!1,y}function cl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&fp(t,n,i)}s=s.next}while(s!==r)}}function th(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function mp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Wj(e){var t=e.alternate;t!==null&&(e.alternate=null,Wj(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ir],delete t[Pl],delete t[ep],delete t[$O],delete t[BO])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Hj(e){return e.tag===5||e.tag===3||e.tag===4}function jw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hj(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=sd));else if(r!==4&&(e=e.child,e!==null))for(pp(e,t,n),e=e.sibling;e!==null;)pp(e,t,n),e=e.sibling}function gp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gp(e,t,n),e=e.sibling;e!==null;)gp(e,t,n),e=e.sibling}var lt=null,On=!1;function Gr(e,t,n){for(n=n.child;n!==null;)zj(e,t,n),n=n.sibling}function zj(e,t,n){if(dr&&typeof dr.onCommitFiberUnmount=="function")try{dr.onCommitFiberUnmount(Kd,n)}catch{}switch(n.tag){case 5:bt||jo(n,t);case 6:var r=lt,s=On;lt=null,Gr(e,t,n),lt=r,On=s,lt!==null&&(On?(e=lt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):lt.removeChild(n.stateNode));break;case 18:lt!==null&&(On?(e=lt,n=n.stateNode,e.nodeType===8?Sf(e.parentNode,n):e.nodeType===1&&Sf(e,n),Cl(e)):Sf(lt,n.stateNode));break;case 4:r=lt,s=On,lt=n.stateNode.containerInfo,On=!0,Gr(e,t,n),lt=r,On=s;break;case 0:case 11:case 14:case 15:if(!bt&&(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)&&fp(n,t,o),s=s.next}while(s!==r)}Gr(e,t,n);break;case 1:if(!bt&&(jo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ze(n,t,l)}Gr(e,t,n);break;case 21:Gr(e,t,n);break;case 22:n.mode&1?(bt=(r=bt)||n.memoizedState!==null,Gr(e,t,n),bt=r):Gr(e,t,n);break;default:Gr(e,t,n)}}function kw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new n2),t.forEach(function(r){var s=h2.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Sn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:lt=l.stateNode,On=!1;break e;case 3:lt=l.stateNode.containerInfo,On=!0;break e;case 4:lt=l.stateNode.containerInfo,On=!0;break e}l=l.return}if(lt===null)throw Error(L(160));zj(i,o,s),lt=null,On=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){ze(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)qj(t,e),t=t.sibling}function qj(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Sn(t,e),Gn(e),r&4){try{cl(3,e,e.return),th(3,e)}catch(g){ze(e,e.return,g)}try{cl(5,e,e.return)}catch(g){ze(e,e.return,g)}}break;case 1:Sn(t,e),Gn(e),r&512&&n!==null&&jo(n,n.return);break;case 5:if(Sn(t,e),Gn(e),r&512&&n!==null&&jo(n,n.return),e.flags&32){var s=e.stateNode;try{bl(s,"")}catch(g){ze(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&mS(s,i),Bm(l,o);var u=Bm(l,i);for(o=0;o<c.length;o+=2){var d=c[o],h=c[o+1];d==="style"?xS(s,h):d==="dangerouslySetInnerHTML"?vS(s,h):d==="children"?bl(s,h):zg(s,d,h,u)}switch(l){case"input":Dm(s,i);break;case"textarea":pS(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?To(s,!!i.multiple,m,!1):f!==!!i.multiple&&(i.defaultValue!=null?To(s,!!i.multiple,i.defaultValue,!0):To(s,!!i.multiple,i.multiple?[]:"",!1))}s[Pl]=i}catch(g){ze(e,e.return,g)}}break;case 6:if(Sn(t,e),Gn(e),r&4){if(e.stateNode===null)throw Error(L(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){ze(e,e.return,g)}}break;case 3:if(Sn(t,e),Gn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Cl(t.containerInfo)}catch(g){ze(e,e.return,g)}break;case 4:Sn(t,e),Gn(e);break;case 13:Sn(t,e),Gn(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(kv=Ge())),r&4&&kw(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(bt=(u=bt)||d,Sn(t,e),bt=u):Sn(t,e),Gn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(H=e,d=e.child;d!==null;){for(h=H=d;H!==null;){switch(f=H,m=f.child,f.tag){case 0:case 11:case 14:case 15:cl(4,f,f.return);break;case 1:jo(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(g){ze(r,n,g)}}break;case 5:jo(f,f.return);break;case 22:if(f.memoizedState!==null){_w(h);continue}}m!==null?(m.return=f,H=m):_w(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=h.stateNode,c=h.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=yS("display",o))}catch(g){ze(e,e.return,g)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){ze(e,e.return,g)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Sn(t,e),Gn(e),r&4&&kw(e);break;case 21:break;default:Sn(t,e),Gn(e)}}function Gn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Hj(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(bl(s,""),r.flags&=-33);var i=jw(e);gp(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,l=jw(e);pp(e,l,o);break;default:throw Error(L(161))}}catch(c){ze(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function s2(e,t,n){H=e,Kj(e)}function Kj(e,t,n){for(var r=(e.mode&1)!==0;H!==null;){var s=H,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Kc;if(!o){var l=s.alternate,c=l!==null&&l.memoizedState!==null||bt;l=Kc;var u=bt;if(Kc=o,(bt=c)&&!u)for(H=s;H!==null;)o=H,c=o.child,o.tag===22&&o.memoizedState!==null?Nw(s):c!==null?(c.return=o,H=c):Nw(s);for(;i!==null;)H=i,Kj(i),i=i.sibling;H=s,Kc=l,bt=u}Cw(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,H=i):Cw(e)}}function Cw(e){for(;H!==null;){var t=H;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:bt||th(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!bt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:En(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&cw(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}cw(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Cl(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}bt||t.flags&512&&mp(t)}catch(f){ze(t,t.return,f)}}if(t===e){H=null;break}if(n=t.sibling,n!==null){n.return=t.return,H=n;break}H=t.return}}function _w(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var n=t.sibling;if(n!==null){n.return=t.return,H=n;break}H=t.return}}function Nw(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{th(4,t)}catch(c){ze(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){ze(t,s,c)}}var i=t.return;try{mp(t)}catch(c){ze(t,i,c)}break;case 5:var o=t.return;try{mp(t)}catch(c){ze(t,o,c)}}}catch(c){ze(t,t.return,c)}if(t===e){H=null;break}var l=t.sibling;if(l!==null){l.return=t.return,H=l;break}H=t.return}}var i2=Math.ceil,pd=Ur.ReactCurrentDispatcher,Sv=Ur.ReactCurrentOwner,mn=Ur.ReactCurrentBatchConfig,ye=0,it=null,Xe=null,ft=0,Gt=0,ko=Fs(0),nt=0,Il=null,Ei=0,nh=0,jv=0,ul=null,Lt=null,kv=0,ta=1/0,Cr=null,gd=!1,vp=null,Ss=null,Gc=!1,ms=null,vd=0,dl=0,yp=null,Tu=-1,Pu=0;function Tt(){return ye&6?Ge():Tu!==-1?Tu:Tu=Ge()}function js(e){return e.mode&1?ye&2&&ft!==0?ft&-ft:VO.transition!==null?(Pu===0&&(Pu=AS()),Pu):(e=Ce,e!==0||(e=window.event,e=e===void 0?16:FS(e.type)),e):1}function Fn(e,t,n,r){if(50<dl)throw dl=0,yp=null,Error(L(185));lc(e,n,r),(!(ye&2)||e!==it)&&(e===it&&(!(ye&2)&&(nh|=n),nt===4&&is(e,ft)),Vt(e,r),n===1&&ye===0&&!(t.mode&1)&&(ta=Ge()+500,Xd&&$s()))}function Vt(e,t){var n=e.callbackNode;VR(e,t);var r=ed(e,e===it?ft:0);if(r===0)n!==null&&Ix(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ix(n),t===1)e.tag===0?UO(Ew.bind(null,e)):rj(Ew.bind(null,e)),LO(function(){!(ye&6)&&$s()}),n=null;else{switch(RS(r)){case 1:n=Jg;break;case 4:n=TS;break;case 16:n=Zu;break;case 536870912:n=PS;break;default:n=Zu}n=tk(n,Gj.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Gj(e,t){if(Tu=-1,Pu=0,ye&6)throw Error(L(327));var n=e.callbackNode;if(Mo()&&e.callbackNode!==n)return null;var r=ed(e,e===it?ft:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=yd(e,r);else{t=r;var s=ye;ye|=2;var i=Jj();(it!==e||ft!==t)&&(Cr=null,ta=Ge()+500,bi(e,t));do try{l2();break}catch(l){Yj(e,l)}while(!0);cv(),pd.current=i,ye=s,Xe!==null?t=0:(it=null,ft=0,t=nt)}if(t!==0){if(t===2&&(s=zm(e),s!==0&&(r=s,t=xp(e,s))),t===1)throw n=Il,bi(e,0),is(e,r),Vt(e,Ge()),n;if(t===6)is(e,r);else{if(s=e.current.alternate,!(r&30)&&!o2(s)&&(t=yd(e,r),t===2&&(i=zm(e),i!==0&&(r=i,t=xp(e,i))),t===1))throw n=Il,bi(e,0),is(e,r),Vt(e,Ge()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:ri(e,Lt,Cr);break;case 3:if(is(e,r),(r&130023424)===r&&(t=kv+500-Ge(),10<t)){if(ed(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Tt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Zm(ri.bind(null,e,Lt,Cr),t);break}ri(e,Lt,Cr);break;case 4:if(is(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Ln(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=Ge()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*i2(r/1960))-r,10<r){e.timeoutHandle=Zm(ri.bind(null,e,Lt,Cr),r);break}ri(e,Lt,Cr);break;case 5:ri(e,Lt,Cr);break;default:throw Error(L(329))}}}return Vt(e,Ge()),e.callbackNode===n?Gj.bind(null,e):null}function xp(e,t){var n=ul;return e.current.memoizedState.isDehydrated&&(bi(e,t).flags|=256),e=yd(e,t),e!==2&&(t=Lt,Lt=n,t!==null&&wp(t)),e}function wp(e){Lt===null?Lt=e:Lt.push.apply(Lt,e)}function o2(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!Un(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function is(e,t){for(t&=~jv,t&=~nh,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ln(t),r=1<<n;e[n]=-1,t&=~r}}function Ew(e){if(ye&6)throw Error(L(327));Mo();var t=ed(e,0);if(!(t&1))return Vt(e,Ge()),null;var n=yd(e,t);if(e.tag!==0&&n===2){var r=zm(e);r!==0&&(t=r,n=xp(e,r))}if(n===1)throw n=Il,bi(e,0),is(e,t),Vt(e,Ge()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ri(e,Lt,Cr),Vt(e,Ge()),null}function Cv(e,t){var n=ye;ye|=1;try{return e(t)}finally{ye=n,ye===0&&(ta=Ge()+500,Xd&&$s())}}function Ti(e){ms!==null&&ms.tag===0&&!(ye&6)&&Mo();var t=ye;ye|=1;var n=mn.transition,r=Ce;try{if(mn.transition=null,Ce=1,e)return e()}finally{Ce=r,mn.transition=n,ye=t,!(ye&6)&&$s()}}function _v(){Gt=ko.current,Ie(ko)}function bi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,IO(n)),Xe!==null)for(n=Xe.return;n!==null;){var r=n;switch(ov(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&id();break;case 3:Zo(),Ie(Bt),Ie(St),pv();break;case 5:mv(r);break;case 4:Zo();break;case 13:Ie(Be);break;case 19:Ie(Be);break;case 10:uv(r.type._context);break;case 22:case 23:_v()}n=n.return}if(it=e,Xe=e=ks(e.current,null),ft=Gt=t,nt=0,Il=null,jv=nh=Ei=0,Lt=ul=null,ci!==null){for(t=0;t<ci.length;t++)if(n=ci[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}ci=null}return e}function Yj(e,t){do{var n=Xe;try{if(cv(),_u.current=md,fd){for(var r=Ue.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}fd=!1}if(Ni=0,st=tt=Ue=null,ll=!1,Ol=0,Sv.current=null,n===null||n.return===null){nt=1,Il=t,Xe=null;break}e:{var i=e,o=n.return,l=n,c=t;if(t=ft,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=pw(o);if(m!==null){m.flags&=-257,gw(m,o,l,i,t),m.mode&1&&mw(i,u,t),t=m,c=u;var y=t.updateQueue;if(y===null){var g=new Set;g.add(c),t.updateQueue=g}else y.add(c);break e}else{if(!(t&1)){mw(i,u,t),Nv();break e}c=Error(L(426))}}else if(Fe&&l.mode&1){var b=pw(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),gw(b,o,l,i,t),av(ea(c,l));break e}}i=c=ea(c,l),nt!==4&&(nt=2),ul===null?ul=[i]:ul.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=Rj(i,c,t);lw(i,x);break e;case 1:l=c;var v=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Ss===null||!Ss.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=Oj(i,l,t);lw(i,S);break e}}i=i.return}while(i!==null)}Xj(n)}catch(j){t=j,Xe===n&&n!==null&&(Xe=n=n.return);continue}break}while(!0)}function Jj(){var e=pd.current;return pd.current=md,e===null?md:e}function Nv(){(nt===0||nt===3||nt===2)&&(nt=4),it===null||!(Ei&268435455)&&!(nh&268435455)||is(it,ft)}function yd(e,t){var n=ye;ye|=2;var r=Jj();(it!==e||ft!==t)&&(Cr=null,bi(e,t));do try{a2();break}catch(s){Yj(e,s)}while(!0);if(cv(),ye=n,pd.current=r,Xe!==null)throw Error(L(261));return it=null,ft=0,nt}function a2(){for(;Xe!==null;)Qj(Xe)}function l2(){for(;Xe!==null&&!OR();)Qj(Xe)}function Qj(e){var t=ek(e.alternate,e,Gt);e.memoizedProps=e.pendingProps,t===null?Xj(e):Xe=t,Sv.current=null}function Xj(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=t2(n,t),n!==null){n.flags&=32767,Xe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{nt=6,Xe=null;return}}else if(n=e2(n,t,Gt),n!==null){Xe=n;return}if(t=t.sibling,t!==null){Xe=t;return}Xe=t=e}while(t!==null);nt===0&&(nt=5)}function ri(e,t,n){var r=Ce,s=mn.transition;try{mn.transition=null,Ce=1,c2(e,t,n,r)}finally{mn.transition=s,Ce=r}return null}function c2(e,t,n,r){do Mo();while(ms!==null);if(ye&6)throw Error(L(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(WR(e,i),e===it&&(Xe=it=null,ft=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Gc||(Gc=!0,tk(Zu,function(){return Mo(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=mn.transition,mn.transition=null;var o=Ce;Ce=1;var l=ye;ye|=4,Sv.current=null,r2(e,n),qj(n,e),TO(Qm),td=!!Jm,Qm=Jm=null,e.current=n,s2(n),MR(),ye=l,Ce=o,mn.transition=i}else e.current=n;if(Gc&&(Gc=!1,ms=e,vd=s),i=e.pendingLanes,i===0&&(Ss=null),LR(n.stateNode),Vt(e,Ge()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(gd)throw gd=!1,e=vp,vp=null,e;return vd&1&&e.tag!==0&&Mo(),i=e.pendingLanes,i&1?e===yp?dl++:(dl=0,yp=e):dl=0,$s(),null}function Mo(){if(ms!==null){var e=RS(vd),t=mn.transition,n=Ce;try{if(mn.transition=null,Ce=16>e?16:e,ms===null)var r=!1;else{if(e=ms,ms=null,vd=0,ye&6)throw Error(L(331));var s=ye;for(ye|=4,H=e.current;H!==null;){var i=H,o=i.child;if(H.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(H=u;H!==null;){var d=H;switch(d.tag){case 0:case 11:case 15:cl(8,d,i)}var h=d.child;if(h!==null)h.return=d,H=h;else for(;H!==null;){d=H;var f=d.sibling,m=d.return;if(Wj(d),d===u){H=null;break}if(f!==null){f.return=m,H=f;break}H=m}}}var y=i.alternate;if(y!==null){var g=y.child;if(g!==null){y.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}H=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,H=o;else e:for(;H!==null;){if(i=H,i.flags&2048)switch(i.tag){case 0:case 11:case 15:cl(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,H=x;break e}H=i.return}}var v=e.current;for(H=v;H!==null;){o=H;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,H=w;else e:for(o=v;H!==null;){if(l=H,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:th(9,l)}}catch(j){ze(l,l.return,j)}if(l===o){H=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,H=S;break e}H=l.return}}if(ye=s,$s(),dr&&typeof dr.onPostCommitFiberRoot=="function")try{dr.onPostCommitFiberRoot(Kd,e)}catch{}r=!0}return r}finally{Ce=n,mn.transition=t}}return!1}function Tw(e,t,n){t=ea(n,t),t=Rj(e,t,1),e=bs(e,t,1),t=Tt(),e!==null&&(lc(e,1,t),Vt(e,t))}function ze(e,t,n){if(e.tag===3)Tw(e,e,n);else for(;t!==null;){if(t.tag===3){Tw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ss===null||!Ss.has(r))){e=ea(n,e),e=Oj(t,e,1),t=bs(t,e,1),e=Tt(),t!==null&&(lc(t,1,e),Vt(t,e));break}}t=t.return}}function u2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Tt(),e.pingedLanes|=e.suspendedLanes&n,it===e&&(ft&n)===n&&(nt===4||nt===3&&(ft&130023424)===ft&&500>Ge()-kv?bi(e,0):jv|=n),Vt(e,t)}function Zj(e,t){t===0&&(e.mode&1?(t=Fc,Fc<<=1,!(Fc&130023424)&&(Fc=4194304)):t=1);var n=Tt();e=Lr(e,t),e!==null&&(lc(e,t,n),Vt(e,n))}function d2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zj(e,n)}function h2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),Zj(e,n)}var ek;ek=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Bt.current)Ft=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ft=!1,ZO(e,t,n);Ft=!!(e.flags&131072)}else Ft=!1,Fe&&t.flags&1048576&&sj(t,ld,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Eu(e,t),e=t.pendingProps;var s=Jo(t,St.current);Oo(t,n),s=vv(null,t,r,e,s,n);var i=yv();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ut(r)?(i=!0,od(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,hv(t),s.updater=eh,t.stateNode=s,s._reactInternals=t,op(t,r,e,n),t=cp(null,t,r,!0,i,n)):(t.tag=0,Fe&&i&&iv(t),kt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Eu(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=m2(r),e=En(r,e),s){case 0:t=lp(null,t,r,e,n);break e;case 1:t=xw(null,t,r,e,n);break e;case 11:t=vw(null,t,r,e,n);break e;case 14:t=yw(null,t,r,En(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:En(r,s),lp(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:En(r,s),xw(e,t,r,s,n);case 3:e:{if(Lj(t),e===null)throw Error(L(387));r=t.pendingProps,i=t.memoizedState,s=i.element,uj(e,t),dd(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=ea(Error(L(423)),t),t=ww(e,t,r,n,s);break e}else if(r!==s){s=ea(Error(L(424)),t),t=ww(e,t,r,n,s);break e}else for(Qt=ws(t.stateNode.containerInfo.firstChild),Xt=t,Fe=!0,Dn=null,n=lj(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Qo(),r===s){t=Fr(e,t,n);break e}kt(e,t,r,n)}t=t.child}return t;case 5:return dj(t),e===null&&rp(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Xm(r,s)?o=null:i!==null&&Xm(r,i)&&(t.flags|=32),Ij(e,t),kt(e,t,o,n),t.child;case 6:return e===null&&rp(t),null;case 13:return Fj(e,t,n);case 4:return fv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xo(t,null,r,n):kt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:En(r,s),vw(e,t,r,s,n);case 7:return kt(e,t,t.pendingProps,n),t.child;case 8:return kt(e,t,t.pendingProps.children,n),t.child;case 12:return kt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,Ae(cd,r._currentValue),r._currentValue=o,i!==null)if(Un(i.value,o)){if(i.children===s.children&&!Bt.current){t=Fr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Rr(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),sp(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(L(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),sp(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}kt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Oo(t,n),s=vn(s),r=r(s),t.flags|=1,kt(e,t,r,n),t.child;case 14:return r=t.type,s=En(r,t.pendingProps),s=En(r.type,s),yw(e,t,r,s,n);case 15:return Mj(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:En(r,s),Eu(e,t),t.tag=1,Ut(r)?(e=!0,od(t)):e=!1,Oo(t,n),Aj(t,r,s),op(t,r,s,n),cp(null,t,r,!0,e,n);case 19:return $j(e,t,n);case 22:return Dj(e,t,n)}throw Error(L(156,t.tag))};function tk(e,t){return ES(e,t)}function f2(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hn(e,t,n,r){return new f2(e,t,n,r)}function Ev(e){return e=e.prototype,!(!e||!e.isReactComponent)}function m2(e){if(typeof e=="function")return Ev(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Kg)return 11;if(e===Gg)return 14}return 2}function ks(e,t){var n=e.alternate;return n===null?(n=hn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 4,322 bytes, line 40
40ons=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Au(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Ev(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case mo:return Si(n.children,s,i,t);case qg:o=8,s|=8;break;case Pm:return e=hn(12,n,t,s|2),e.elementType=Pm,e.lanes=i,e;case Am:return e=hn(13,n,t,s),e.elementType=Am,e.lanes=i,e;case Rm:return e=hn(19,n,t,s),e.elementType=Rm,e.lanes=i,e;case dS:return rh(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cS:o=10;break e;case uS:o=9;break e;case Kg:o=11;break e;case Gg:o=14;break e;case ns:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=hn(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Si(e,t,n,r){return e=hn(7,e,r,t),e.lanes=n,e}function rh(e,t,n,r){return e=hn(22,e,r,t),e.elementType=dS,e.lanes=n,e.stateNode={isHidden:!1},e}function Pf(e,t,n){return e=hn(6,e,null,t),e.lanes=n,e}function Af(e,t,n){return t=hn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function p2(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=df(0),this.expirationTimes=df(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=df(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Tv(e,t,n,r,s,i,o,l,c){return e=new p2(e,t,n,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=hn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hv(i),e}function g2(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fo,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function nk(e){if(!e)return Ps;e=e._reactInternals;e:{if(Fi(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ut(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(Ut(n))return nj(e,n,t)}return t}function rk(e,t,n,r,s,i,o,l,c){return e=Tv(n,r,!0,e,s,i,o,l,c),e.context=nk(null),n=e.current,r=Tt(),s=js(n),i=Rr(r,s),i.callback=t??null,bs(n,i,s),e.current.lanes=s,lc(e,s,r),Vt(e,r),e}function sh(e,t,n,r){var s=t.current,i=Tt(),o=js(s);return n=nk(n),t.context===null?t.context=n:t.pendingContext=n,t=Rr(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=bs(s,t,o),e!==null&&(Fn(e,s,o,i),Cu(e,s,o)),o}function xd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Pw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Pv(e,t){Pw(e,t),(e=e.alternate)&&Pw(e,t)}function v2(){return null}var sk=typeof reportError=="function"?reportError:function(e){console.error(e)};function Av(e){this._internalRoot=e}ih.prototype.render=Av.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));sh(e,t,null,null)};ih.prototype.unmount=Av.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ti(function(){sh(null,e,null,null)}),t[Ir]=null}};function ih(e){this._internalRoot=e}ih.prototype.unstable_scheduleHydration=function(e){if(e){var t=DS();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ss.length&&t!==0&&t<ss[n].priority;n++);ss.splice(n,0,e),n===0&&LS(e)}};function Rv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function oh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Aw(){}
vendor: 5,155 bytes, line 40
40function y2(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=xd(o);i.call(u)}}var o=rk(t,r,e,0,null,!1,!1,"",Aw);return e._reactRootContainer=o,e[Ir]=o.current,El(e.nodeType===8?e.parentNode:e),Ti(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=xd(c);l.call(u)}}var c=Tv(e,0,!1,null,null,!1,!1,"",Aw);return e._reactRootContainer=c,e[Ir]=c.current,El(e.nodeType===8?e.parentNode:e),Ti(function(){sh(t,c,n,r)}),c}function ah(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var l=s;s=function(){var c=xd(o);l.call(c)}}sh(t,o,e,s)}else o=y2(n,t,e,s,r);return xd(o)}OS=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ja(t.pendingLanes);n!==0&&(Qg(t,n|1),Vt(t,Ge()),!(ye&6)&&(ta=Ge()+500,$s()))}break;case 13:Ti(function(){var r=Lr(e,1);if(r!==null){var s=Tt();Fn(r,e,1,s)}}),Pv(e,1)}};Xg=function(e){if(e.tag===13){var t=Lr(e,134217728);if(t!==null){var n=Tt();Fn(t,e,134217728,n)}Pv(e,134217728)}};MS=function(e){if(e.tag===13){var t=js(e),n=Lr(e,t);if(n!==null){var r=Tt();Fn(n,e,t,r)}Pv(e,t)}};DS=function(){return Ce};IS=function(e,t){var n=Ce;try{return Ce=e,t()}finally{Ce=n}};Vm=function(e,t,n){switch(t){case"input":if(Dm(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Qd(r);if(!s)throw Error(L(90));fS(r),Dm(r,s)}}}break;case"textarea":pS(e,n);break;case"select":t=n.value,t!=null&&To(e,!!n.multiple,t,!1)}};SS=Cv;jS=Ti;var x2={usingClientEntryPoint:!1,Events:[uc,yo,Qd,wS,bS,Cv]},Da={findFiberByHostInstance:li,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},w2={bundleType:Da.bundleType,version:Da.version,rendererPackageName:Da.rendererPackageName,rendererConfig:Da.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ur.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_S(e),e===null?null:e.stateNode},findFiberByHostInstance:Da.findFiberByHostInstance||v2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yc.isDisabled&&Yc.supportsFiber)try{Kd=Yc.inject(w2),dr=Yc}catch{}}nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=x2;nn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rv(t))throw Error(L(200));return g2(e,t,null,n)};nn.createRoot=function(e,t){if(!Rv(e))throw Error(L(299));var n=!1,r="",s=sk;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Tv(e,1,!1,null,null,n,!1,r,s),e[Ir]=t.current,El(e.nodeType===8?e.parentNode:e),new Av(t)};nn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=_S(t),e=e===null?null:e.stateNode,e};nn.flushSync=function(e){return Ti(e)};nn.hydrate=function(e,t,n){if(!oh(t))throw Error(L(200));return ah(null,e,t,!0,n)};nn.hydrateRoot=function(e,t,n){if(!Rv(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=sk;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=rk(t,null,e,1,n??null,s,!1,i,o),e[Ir]=t.current,El(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new ih(t)};nn.render=function(e,t,n){if(!oh(t))throw Error(L(200));return ah(null,e,t,!1,n)};nn.unmountComponentAtNode=function(e){if(!oh(e))throw Error(L(40));return e._reactRootContainer?(Ti(function(){ah(null,null,e,!1,function(){e._reactRootContainer=null,e[Ir]=null})}),!0):!1};nn.unstable_batchedUpdates=Cv;nn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!oh(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return ah(e,t,n,!1,r)};nn.version="18.3.1-next-f1338f8080-20240426";function ik(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ik)}catch(e){console.error(e)}}ik(),iS.exports=nn;var $i=iS.exports;const ok=oc($i);var ak,Rw=$i;ak=Rw.createRoot,Rw.hydrateRoot;const b2=1,S2=1e6;let Rf=0;function j2(){return Rf=(Rf+1)%Number.MAX_SAFE_INTEGER,Rf.toString()}const Of=new Map,Ow=e=>{if(Of.has(e))return;const t=setTimeout(()=>{Of.delete(e),hl({type:"REMOVE_TOAST",toastId:e})},S2);Of.set(e,t)},k2=(e,t)=>
40{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,b2)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Ow(n):e.toasts.forEach(r=>{Ow(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Ru=[];let Ou={toasts:[]};function hl(e){Ou=k2(Ou,e),Ru.forEach(t=>{t(Ou)})}function C2({...e}){const t=j2(),n=s=>hl({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>hl({type:"DISMISS_TOAST",toastId:t});return hl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function lk(){const[e,t]=p.useState(Ou);return p.useEffect(()=>(Ru.push(t),()=>{const n=Ru.indexOf(t);n>-1&&Ru.splice(n,1)}),[e]),{...e,toast:C2,dismiss:n=>hl({type:"DISMISS_TOAST",toastId:n})}}function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Mw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lh(...e){return t=>{let n=!1;const r=e.map(s=>{const i=Mw(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Mw(e[s],null)}}}}function fe(...e){return p.useCallback(lh(...e),e)}function _2(e,t){const n=p.createContext(t),r=i=>{const{children:o,...l}=i,c=p.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function s(i){const o=p.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function sn(e,t=[]){let n=[];function r(i,o){const l=p.createContext(o),c=n.length;n=[...n,o];const u=h=>{var x;const{scope:f,children:m,...y}=h,g=((x=f==null?void 0:f[e])==null?void 0:x[c])||l,b=p.useMemo(()=>y,Object.values(y));return a.jsx(g.Provider,{value:b,children:m})};u.displayName=i+"Provider";function d(h,f){var g;const m=((g=f==null?void 0:f[e])==null?void 0:g[c])||l,y=p.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(o=>p.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,N2(s,...t)]}function N2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function As(e){const t=T2(e),n=p.forwardRef((r,s)=>{const{children:i,...o}=r,l=p.Children.toArray(i),c=l.find(A2);if(c){const u=c.props.children,d=l.map(h=>h===c?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:h);return a.jsx(t,{...o,ref:s,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return a.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}var E2=As("Slot");function T2(e){const t=p.forwardRef((n,r)=>{const{children:s,...i}=n;if(p.isValidElement(s)){const o=O2(s),l=R2(i,s.props);return s.type!==p.Fragment&&(l.ref=r?lh(r,o):o),p.cloneElement(s,l)}return p.Children.count(s)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ck=Symbol("radix.slottable");function P2(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ck,t}function A2(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ck}function R2(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...l)=>{const c=i(...l);return s(...l),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function O2(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ch(e){const t=e+"CollectionProvider",[n,r]=sn(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:b,children:x}=g,v=R.useRef(null),w=R.useRef(new Map).current;return a.jsx(s,{scope:b,itemMap:w,collectionRef:v,children:x})};o.displayName=t;const l=e+"CollectionSlot",c=As(l),u=R.forwardRef((g,b)=>{const{scope:x,children:v}=g,w=i(l,x),S=fe(b,w.collectionRef);return a.jsx(c,{ref:S,children:v})});u.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=As(d),m=R.forwardRef((g,b)=>{const{scope:x,children:v,...w}=g,S=R.useRef(null),j=fe(b,S),k=i(d,x);return R.useEffect(()=>(k.itemMap.set(S,{ref:S,...w}),()=>void k.itemMap.delete(S))),a.jsx(f,{[h]:"",ref:j,children:v})});m.displayName=d;function y(g){const b=i(e+"CollectionConsumer",g);return R.useCallback(()=>{const v=b.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((k,_)=>w.indexOf(k.ref.current)-w.indexOf(_.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:u,ItemSlot:m},y,r]}var M2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],se=M2.reduce((e,t)=>
vendor: 8,605 bytes, line 40
40{const n=As(`Primitive.${t}`),r=p.forwardRef((s,i)=>{const{asChild:o,...l}=s,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ov(e,t){e&&$i.flushSync(()=>e.dispatchEvent(t))}function zt(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function D2(e,t=globalThis==null?void 0:globalThis.document){const n=zt(e);p.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var I2="DismissableLayer",bp="dismissableLayer.update",L2="dismissableLayer.pointerDownOutside",F2="dismissableLayer.focusOutside",Dw,uk=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bi=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=p.useContext(uk),[d,h]=p.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=p.useState({}),y=fe(t,_=>h(_)),g=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(b),v=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=v>=x,j=B2(_=>{const E=_.target,P=[...u.branches].some(T=>T.contains(E));!S||P||(s==null||s(_),o==null||o(_),_.defaultPrevented||l==null||l())},f),k=U2(_=>{const E=_.target;[...u.branches].some(T=>T.contains(E))||(i==null||i(_),o==null||o(_),_.defaultPrevented||l==null||l())},f);return D2(_=>{v===u.layers.size-1&&(r==null||r(_),!_.defaultPrevented&&l&&(_.preventDefault(),l()))},f),p.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Dw=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Iw(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Dw)}},[d,f,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Iw())},[d,u]),p.useEffect(()=>{const _=()=>m({});return document.addEventListener(bp,_),()=>document.removeEventListener(bp,_)},[]),a.jsx(se.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,k.onFocusCapture),onBlurCapture:B(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,j.onPointerDownCapture)})});Bi.displayName=I2;var $2="DismissableLayerBranch",dk=p.forwardRef((e,t)=>{const n=p.useContext(uk),r=p.useRef(null),s=fe(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),a.jsx(se.div,{...e,ref:s})});dk.displayName=$2;function B2(e,t=globalThis==null?void 0:globalThis.document){const n=zt(e),r=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){hk(L2,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function U2(e,t=globalThis==null?void 0:globalThis.document){const n=zt(e),r=p.useRef(!1);return p.useEffect(()=>{const s=i=>{i.target&&!r.current&&hk(F2,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Iw(){const e=new CustomEvent(bp);document.dispatchEvent(e)}function hk(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Ov(s,i):s.dispatchEvent(i)}var V2=Bi,W2=dk,pt=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},H2="Portal",fa=p.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,i]=p.useState(!1);pt(()=>i(!0),[]);const o=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?ok.createPortal(a.jsx(se.div,{...r,ref:t}),o):null});fa.displayName=H2;function z2(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var qt=e=>{const{present:t,children:n}=e,r=q2(t),s=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=fe(r.ref,K2(s));return typeof n=="function"||r.isPresent?p.cloneElement(s,{ref:i}):null};qt.displayName="Presence";function q2(e){const[t,n]=p.useState(),r=p.useRef(null),s=p.useRef(e),i=p.useRef("none"),o=e?"mounted":"unmounted",[l,c]=z2(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Jc(r.current);i.current=l==="mounted"?u:"none"},[l]),pt(()=>{const u=r.current,d=s.current;if(d!==e){const f=i.current,m=Jc(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),pt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=m=>{const g=Jc(r.current).includes(m.animationName);if(m.target===t&&g&&(c("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=m=>{m.target===t&&(i.current=Jc(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Jc(e){return(e==null?void 0:e.animationName)||"none"}function K2(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var G2=Vg[" useInsertionEffect ".trim().toString()]||pt;function pr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,o]=Y2({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:s;{const d=p.useRef(e!==void 0);p.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=p.useCallback(d=>{var h;if(l){const f=J2(d)?d(e):d;f!==e&&((h=o.current)==null||h.call(o,f))}else i(d)},[l,e,i,o]);return[c,u]}function Y2({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),s=p.useRef(n),i=p.useRef(t);return G2(()=>{i.current=t},[t]),p.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function J2(e){return typeof e=="function"}var fk=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"}),Q2="VisuallyHidden",uh=p.forwardRef((e,t)=>a.jsx(se.span,{...e,ref:t,style:{...fk,...e.style}}));uh.displayName=Q2;var X2=uh,Mv="ToastProvider",[Dv,Z2,eM]=ch("Toast"),[mk,VG]=sn("Toast",[eM]),[tM,dh]=mk(Mv),pk=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[l,c]=p.useState(null),[u,d]=p.useState(0),h=p.useRef(!1),f=p.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Mv}\`. Expected non-empty \`string\`.`),a.jsx(Dv.Provider,{scope:t,children:a.jsx(tM,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:p.useCallback(()=>d(m=>m+1),[]),onToastRemove:p.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};pk.displayName=Mv;var gk="ToastViewport",nM=["F8"],Sp="toast.viewportPause",jp="toast.viewportResume",vk=p.forwardRef((e,t)=>
40{const{__scopeToast:n,hotkey:r=nM,label:s="Notifications ({hotkey})",...i}=e,o=dh(gk,n),l=Z2(n),c=p.useRef(null),u=p.useRef(null),d=p.useRef(null),h=p.useRef(null),f=fe(t,h,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;p.useEffect(()=>{const b=x=>{var w;r.length!==0&&r.every(S=>x[S]||x.code===S)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),p.useEffect(()=>{const b=c.current,x=h.current;if(y&&b&&x){const v=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(Sp);x.dispatchEvent(k),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(jp);x.dispatchEvent(k),o.isClosePausedRef.current=!1}},S=k=>{!b.contains(k.relatedTarget)&&w()},j=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",v),b.addEventListener("focusout",S),b.addEventListener("pointermove",v),b.addEventListener("pointerleave",j),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",v),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",v),b.removeEventListener("pointerleave",j),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[y,o.isClosePausedRef]);const g=p.useCallback(({tabbingDirection:b})=>{const v=l().map(w=>{const S=w.ref.current,j=[S,...pM(S)];return b==="forwards"?j:j.reverse()});return(b==="forwards"?v.reverse():v).flat()},[l]);return p.useEffect(()=>{const b=h.current;if(b){const x=v=>{var j,k,_;const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const E=document.activeElement,P=v.shiftKey;if(v.target===b&&P){(j=u.current)==null||j.focus();return}const D=g({tabbingDirection:P?"backwards":"forwards"}),G=D.findIndex(M=>M===E);Mf(D.slice(G+1))?v.preventDefault():P?(k=u.current)==null||k.focus():(_=d.current)==null||_.focus()}};return b.addEventListener("keydown",x),()=>b.removeEventListener("keydown",x)}},[l,g]),a.jsxs(W2,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&a.jsx(kp,{ref:u,onFocusFromOutsideViewport:()=>{const b=g({tabbingDirection:"forwards"});Mf(b)}}),a.jsx(Dv.Slot,{scope:n,children:a.jsx(se.ol,{tabIndex:-1,...i,ref:f})}),y&&a.jsx(kp,{ref:d,onFocusFromOutsideViewport:()=>{const b=g({tabbingDirection:"backwards"});Mf(b)}})]})});vk.displayName=gk;var yk="ToastFocusProxy",kp=p.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=dh(yk,n);return a.jsx(uh,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});kp.displayName=yk;var hc="Toast",rM="toast.swipeStart",sM="toast.swipeMove",iM="toast.swipeCancel",oM="toast.swipeEnd",xk=p.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[l,c]=pr({prop:r,defaultProp:s??!0,onChange:i,caller:hc});return a.jsx(qt,{present:n||l,children:a.jsx(cM,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:zt(e.onPause),onResume:zt(e.onResume),onSwipeStart:B(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:B(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:B(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:B(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});xk.displayName=hc;var[aM,lM]=mk(hc,{onClose(){}}),cM=p.forwardRef((e,t)=>
40{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:m,...y}=e,g=dh(hc,n),[b,x]=p.useState(null),v=fe(t,M=>x(M)),w=p.useRef(null),S=p.useRef(null),j=s||g.duration,k=p.useRef(0),_=p.useRef(j),E=p.useRef(0),{onToastAdd:P,onToastRemove:T}=g,F=zt(()=>{var Y;(b==null?void 0:b.contains(document.activeElement))&&((Y=g.viewport)==null||Y.focus()),o()}),D=p.useCallback(M=>{!M||M===1/0||(window.clearTimeout(E.current),k.current=new Date().getTime(),E.current=window.setTimeout(F,M))},[F]);p.useEffect(()=>{const M=g.viewport;if(M){const Y=()=>{D(_.current),u==null||u()},$=()=>{const O=new Date().getTime()-k.current;_.current=_.current-O,window.clearTimeout(E.current),c==null||c()};return M.addEventListener(Sp,$),M.addEventListener(jp,Y),()=>{M.removeEventListener(Sp,$),M.removeEventListener(jp,Y)}}},[g.viewport,j,c,u,D]),p.useEffect(()=>{i&&!g.isClosePausedRef.current&&D(j)},[i,j,g.isClosePausedRef,D]),p.useEffect(()=>(P(),()=>T()),[P,T]);const G=p.useMemo(()=>b?_k(b):null,[b]);return g.viewport?a.jsxs(a.Fragment,{children:[G&&a.jsx(uM,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:G}),a.jsx(aM,{scope:n,onClose:F,children:$i.createPortal(a.jsx(Dv.ItemSlot,{scope:n,children:a.jsx(V2,{asChild:!0,onEscapeKeyDown:B(l,()=>{g.isFocusedToastEscapeKeyDownRef.current||F(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(se.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:B(e.onKeyDown,M=>{M.key==="Escape"&&(l==null||l(M.nativeEvent),M.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:B(e.onPointerDown,M=>{M.button===0&&(w.current={x:M.clientX,y:M.clientY})}),onPointerMove:B(e.onPointerMove,M=>{if(!w.current)return;const Y=M.clientX-w.current.x,$=M.clientY-w.current.y,O=!!S.current,C=["left","right"].includes(g.swipeDirection),N=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,I=C?N(0,Y):0,V=C?0:N(0,$),W=M.pointerType==="touch"?10:2,le={x:I,y:V},ae={originalEvent:M,delta:le};O?(S.current=le,Qc(sM,h,ae,{discrete:!1})):Lw(le,g.swipeDirection,W)?(S.current=le,Qc(rM,d,ae,{discrete:!1}),M.target.setPointerCapture(M.pointerId)):(Math.abs(Y)>W||Math.abs($)>W)&&(w.current=null)}),onPointerUp:B(e.onPointerUp,M=>{const Y=S.current,$=M.target;if($.hasPointerCapture(M.pointerId)&&$.releasePointerCapture(M.pointerId),S.current=null,w.current=null,Y){const O=M.currentTarget,C={originalEvent:M,delta:Y};Lw(Y,g.swipeDirection,g.swipeThreshold)?Qc(oM,m,C,{discrete:!0}):Qc(iM,f,C,{discrete:!0}),O.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),uM=e=>{const{__scopeToast:t,children:n,...r}=e,s=dh(hc,t),[i,o]=p.useState(!1),[l,c]=p.useState(!1);return fM(()=>o(!0)),p.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:a.jsx(fa,{asChild:!0,children:a.jsx(uh,{...r,children:i&&a.jsxs(a.Fragment,{children:[s.label," ",n]})})})},dM="ToastTitle",wk=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(se.div,{...r,ref:t})});wk.displayName=dM;var hM="ToastDescription",bk=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(se.div,{...r,ref:t})});bk.displayName=hM;var Sk="ToastAction",jk=p.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?a.jsx(Ck,{altText:n,asChild:!0,children:a.jsx(Iv,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Sk}\`. Expected non-empty \`string\`.`),null)});jk.displayName=Sk;var kk="ToastClose",Iv=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=lM(kk,n);return a.jsx(Ck,{asChild:!0,children:a.jsx(se.button,{type:"button",...r,ref:t,onClick:B(e.onClick,s.onClose)})})});Iv.displayName=kk;var Ck=p.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return a.jsx(se.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function _k(e){const t=[];
vendor: 8,922 bytes, lines 40-139
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),mM(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(..._k(r))}}),t}function Qc(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?Ov(s,i):s.dispatchEvent(i)}var Lw=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function fM(e=()=>{}){const t=zt(e);pt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function mM(e){return e.nodeType===e.ELEMENT_NODE}function pM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mf(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var gM=pk,Nk=vk,Ek=xk,Tk=wk,Pk=bk,Ak=jk,Rk=Iv;function Ok(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Ok(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mk(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Ok(e))&&(r&&(r+=" "),r+=t);return r}const Fw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$w=Mk,hh=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return $w(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=i==null?void 0:i[u];if(d===null)return null;const f=Fw(d)||Fw(h);return s[u][f]}),l=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...m}=d;return Object.entries(m).every(y=>{let[g,b]=y;return Array.isArray(b)?b.includes({...i,...l}[g]):{...i,...l}[g]===b})?[...u,h,f]:u},[]);return $w(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const vM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Dk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var yM={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const xM=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...l},c)=>p.createElement("svg",{ref:c,...yM,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Dk("lucide",s),...l},[...o.map(([u,d])=>p.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const ie=(e,t)=>{const n=p.forwardRef(({className:r,...s},i)=>p.createElement(xM,{ref:i,iconNode:t,className:Dk(`lucide-${vM(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const Ik=ie("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const qe=ie("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const wM=ie("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const bM=ie("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const ma=ie("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const SM=ie("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const fh=ie("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const na=ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const jM=ie("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const Lk=ie("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const Lv=ie("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const kM=ie("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const mh=ie("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const Fk=ie("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const CM=ie("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const _M=ie("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const Fv=ie("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const $k=ie("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const $v=ie("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const Bk=ie("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const NM=ie("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const EM=ie("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const Uk=ie("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const TM=ie("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const PM=ie("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const AM=ie("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const Pi=ie("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"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const Bv=ie("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"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const RM=ie("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"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const OM=ie("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const MM=ie("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
216 * @license lucide-react v0.462.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const DM=ie("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
221 * @license lucide-react v0.462.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const Ai=ie("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"}]]);/**
226 * @license lucide-react v0.462.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const Uv=ie("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
231 * @license lucide-react v0.462.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const Vk=ie("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
236 * @license lucide-react v0.462.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const Wk=ie("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"}]]);/**
241 * @license lucide-react v0.462.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const IM=ie("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
246 * @license lucide-react v0.462.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const Bw=ie("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
250y:"oel41y"}]]);/**
251 * @license lucide-react v0.462.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const LM=ie("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
256 * @license lucide-react v0.462.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const Hk=ie("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
261 * @license lucide-react v0.462.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const Ui=ie("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
266 * @license lucide-react v0.462.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const FM=ie("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
271 * @license lucide-react v0.462.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const zk=ie("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
276 * @license lucide-react v0.462.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const $M=ie("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"}]]);/**
281 * @license lucide-react v0.462.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const BM=ie("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/**
286 * @license lucide-react v0.462.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const qk=ie("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
291 * @license lucide-react v0.462.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const Vv=ie("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"}]]);/**
296 * @license lucide-react v0.462.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const fc=ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 6,290 bytes, lines 300-305
300],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
301 * @license lucide-react v0.462.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const UM=ie("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"}]]),Wv="-",VM=e=>{const t=HM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(Wv);return l[0]===""&&l.length!==1&&l.shift(),Kk(l,t)||WM(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},Kk=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Kk(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Wv);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},Uw=/^\[(.+)\]$/,WM=e=>{if(Uw.test(e)){const t=Uw.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},HM=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return qM(Object.entries(e.classGroups),n).forEach(([i,o])=>{Cp(o,r,i,t)}),r},Cp=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Vw(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(zM(s)){Cp(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Cp(o,Vw(t,i),n,r)})})},Vw=(e,t)=>{let n=e;return t.split(Wv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},zM=e=>e.isThemeGetter,qM=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,l])=>[t+o,l])):i);return[n,s]}):e,KM=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},Gk="!",GM=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=l=>{const c=[];let u=0,d=0,h;for(let b=0;b<l.length;b++){let x=l[b];if(u===0){if(x===s&&(r||l.slice(b,b+i)===t)){c.push(l.slice(d,b)),d=b+i;continue}if(x==="/"){h=b;continue}}x==="["?u++:x==="]"&&u--}const f=c.length===0?l:l.substring(d),m=f.startsWith(Gk),y=m?f.substring(1):f,g=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:g}};return n?l=>n({className:l,parseClassName:o}):o},YM=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},JM=e=>({cache:KM(e.cacheSize),parseClassName:GM(e),...VM(e)}),QM=/\s+/,XM=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(QM);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:m}=n(u);let y=!!m,g=r(y?f.substring(0,m):f);if(!g){if(!y){l=u+(l.length>0?" "+l:l);continue}if(g=r(f),!g){l=u+(l.length>0?" "+l:l);continue}y=!1}const b=YM(d).join(":"),x=h?b+Gk:b,v=x+g;if(i.includes(v))continue;i.push(v);const w=s(g,y);for(let S=0;S<w.length;++S){const j=w[S];i.push(x+j)}l=u+(l.length>0?" "+l:l)}return l};function ZM(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Yk(t))&&(r&&(r+=" "),r+=n);return r}const Yk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Yk(e[r]))&&(n&&(n+=" "),n+=t);return n};function eD(e,...t){let n,r,s,i=o;function o(c){const u=t.reduce((d,h)=>h(d),e());return n=JM(u),r=n.cache.get,s=n.cache.set,i=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=XM(c,n);return s(c,d),d}return function(){return i(ZM.apply(null,arguments))}}const Oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Jk=/^\[(?:([a-z-]+):)?(.+)\]$/i,tD=/^\d+\/\d+$/,nD=new Set(["px","full","screen"]),rD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sD=/\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$/,iD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sr=e=>Do(e)||nD.has(e)||tD.test(e),Yr=e=>pa(e,"length",pD),Do=e=>!!e&&!Number.isNaN(Number(e)),Df=e=>pa(e,"number",Do),Ia=e=>!!e&&Number.isInteger(Number(e)),lD=e=>e.endsWith("%")&&Do(e.slice(0,-1)),he=e=>Jk.test(e),Jr=e=>rD.test(e),cD=new Set(["length","size","percentage"]),uD=e=>pa(e,cD,Qk),dD=e=>pa(e,"position",Qk),hD=new Set(["image","url"]),fD=e=>pa(e,hD,vD),mD=e=>pa(e,"",gD),La=()=>!0,pa=(e,t,n)=>{const r=Jk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},pD=e=>sD.test(e)&&!iD.test(e),Qk=()=>!1,gD=e=>oD.test(e),vD=e=>aD.test(e),yD=()=>{const e=Oe("colors"),t=Oe("spacing"),n=Oe("blur"),r=Oe("brightness"),s=Oe("borderColor"),i=Oe("borderRadius"),o=Oe("borderSpacing"),l=Oe("borderWidth"),c=Oe("contrast"),u=Oe("grayscale"),d=Oe("hueRotate"),h=Oe("invert"),f=Oe("gap"),m=Oe("gradientColorStops"),y=Oe("gradientColorStopPositions"),g=Oe("inset"),b=Oe("margin"),x=Oe("opacity"),v=Oe("padding"),w=Oe("saturate"),S=Oe("scale"),j=Oe("sepia"),k=Oe("skew"),_=Oe("space"),E=Oe("translate"),P=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",he,t],D=()=>[he,t],G=()=>["",Sr,Yr],M=()=>["auto",Do,he],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",he],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[Do,he];return{cacheSize:500,separator:":",theme:{colors:[La],spacing:[Sr,Yr],blur:["none","",Jr,he],brightness:V(),borderColor:[e],borderRadius:["n
vendor: 4,641 bytes, line 305
305one","","full",Jr,he],borderSpacing:D(),borderWidth:G(),contrast:V(),grayscale:N(),hueRotate:V(),invert:N(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[lD,Yr],inset:F(),margin:F(),opacity:V(),padding:D(),saturate:V(),scale:V(),sepia:N(),skew:V(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[Jr]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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:[...Y(),he]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ia,he]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",Ia,he]}],"grid-cols":[{"grid-cols":[La]}],"col-start-end":[{col:["auto",{span:["full",Ia,he]},he]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[La]}],"row-start-end":[{row:["auto",{span:[Ia,he]},he]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[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":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,t]}],"min-w":[{"min-w":[he,t,"min","max","fit"]}],"max-w":[{"max-w":[he,t,"none","full","min","max","fit","prose",{screen:[Jr]},Jr]}],h:[{h:[he,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Jr,Yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Df]}],"font-family":[{font:[La]}],"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",he]}],"line-clamp":[{"line-clamp":["none",Do,Df]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Sr,he]}
vendor: 5,626 bytes, line 305
305],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Sr,Yr]}],"underline-offset":[{"underline-offset":["auto",Sr,he]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],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",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),dD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",uD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:$()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[Sr,he]}],"outline-w":[{outline:[Sr,Yr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Sr,Yr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Jr,mD]}],"shadow-color":[{shadow:[La]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Jr,he]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",he]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Ia,he]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"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",he]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","
305none","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",he]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",he]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Sr,Yr,Df]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},xD=eD(yD);function ee(...e){return xD(Mk(e))}const wD=gM,Xk=p.forwardRef(({className:e,...t},n)=>a.jsx(Nk,{ref:n,className:ee("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Xk.displayName=Nk.displayName;const bD=hh("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"}}),Zk=p.forwardRef(({className:e,variant:t,...n},r)=>a.jsx(Ek,{ref:r,className:ee(bD({variant:t}),e),...n}));Zk.displayName=Ek.displayName;const SD=p.forwardRef(({className:e,...t},n)=>a.jsx(Ak,{ref:n,className:ee("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));SD.displayName=Ak.displayName;const eC=p.forwardRef(({className:e,...t},n)=>a.jsx(Rk,{ref:n,className:ee("absolute right-2 top-2 rounded-md p-1 text-foreground
305/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(fc,{className:"h-4 w-4"})}));eC.displayName=Rk.displayName;const tC=p.forwardRef(({className:e,...t},n)=>a.jsx(Tk,{ref:n,className:ee("text-sm font-semibold",e),...t}));tC.displayName=Tk.displayName;const nC=p.forwardRef(({className:e,...t},n)=>a.jsx(Pk,{ref:n,className:ee("text-sm opacity-90",e),...t}));nC.displayName=Pk.displayName;function jD(){const{toasts:e}=lk();return a.jsxs(wD,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return a.jsxs(Zk,{...i,children:[a.jsxs("div",{className:"grid gap-1",children:[n&&a.jsx(tC,{children:n}),r&&a.jsx(nC,{children:r})]}),s,a.jsx(eC,{})]},t)}),a.jsx(Xk,{})]})}var Ww=["light","dark"],kD="(prefers-color-scheme: dark)",CD=p.createContext(void 0),_D={setTheme:e=>{},themes:[]},ND=()=>{var e;return(e=p.useContext(CD))!=null?e:_D};p.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:l,nonce:c})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?Ww.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,g=!1,b=!0)=>{let x=o?o[y]:y,v=g?y+"|| ''":`'${x}'`,w="";return s&&b&&!g&&Ww.includes(y)&&(w+=`d.style.colorScheme = '${y}';`),n==="class"?g||x?w+=`c.add(${v})`:w+="null":x&&(w+=`d[s](n,${v})`),w},m=e?`!function(){${d}${f(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${kD}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${h}}catch(t){}}();`;return p.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var ED=e=>{switch(e){case"success":return AD;case"info":return OD;case"warning":return RD;case"error":return MD;default:return null}},TD=Array(12).fill(0),PD=({visible:e,className:t})=>R.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},R.createElement("div",{className:"sonner-spinner"},TD.map((n,r)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),AD=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),RD=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},R.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"})),OD=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),MD=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),DD=R.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"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ID=()=>{let[e,t]=R.useState(document.hidden);return R.useEffect(()=>{let n=()=>{t(document.hidden)};
305return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},_p=1,LD=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:_p++,i=this.toasts.find(l=>l.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:n}),{...l,...e,id:s,dismissible:o,title:n}):l):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
305this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async c=>{if(i=["resolve",c],R.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if($D(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||_p++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},It=new LD,FD=(e,t)=>{let n=(t==null?void 0:t.id)||_p++;return It.addToast({title:e,...t,id:n}),n},$D=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",BD=FD,UD=()=>It.toasts,VD=()=>It.getActiveToasts(),re=Object.assign(BD,{success:It.success,info:It.info,warning:It.warning,error:It.error,custom:It.custom,message:It.message,promise:It.promise,dismiss:It.dismiss,loading:It.loading},{getHistory:UD,getToasts:VD});function WD(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}WD(`: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;
305left: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}
305: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%);
305--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%)}
306`);function Xc(e){return e.label!==void 0}var HD=3,zD="32px",qD="16px",Hw=4e3,KD=356,GD=14,YD=20,JD=200;function jn(...e){return e.filter(Boolean).join(" ")}function QD(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var XD=e=>{var t,n,r,s,i,o,l,c,u,d,h;let{invert:f,toast:m,unstyled:y,interacting:g,setHeights:b,visibleToasts:x,heights:v,index:w,toasts:S,expanded:j,removeToast:k,defaultRichColors:_,closeButton:E,style:P,cancelButtonStyle:T,actionButtonStyle:F,className:D="",descriptionClassName:G="",duration:M,position:Y,gap:$,loadingIcon:O,expandByDefault:C,classNames:N,icons:I,closeButtonAriaLabel:V="Close toast",pauseWhenPageIsHidden:W}=e,[le,ae]=R.useState(null),[_e,Ne]=R.useState(null),[U,we]=R.useState(!1),[be,pe]=R.useState(!1),[ge,Se]=R.useState(!1),[gt,on]=R.useState(!1),[qs,Hr]=R.useState(!1),[Ks,_a]=R.useState(0),[Hi,vx]=R.useState(0),Na=R.useRef(m.duration||M||Hw),yx=R.useRef(null),Gs=R.useRef(null),FA=w===0,$A=w+1<=x,an=m.type,zi=m.dismissible!==!1,BA=m.className||"",UA=m.descriptionClassName||"",Ac=R.useMemo(()=>v.findIndex(ce=>ce.toastId===m.id)||0,[v,m.id]),VA=R.useMemo(()=>{var ce;return(ce=m.closeButton)!=null?ce:E},[m.closeButton,E]),xx=R.useMemo(()=>m.duration||M||Hw,[m.duration,M]),nf=R.useRef(0),qi=R.useRef(0),wx=R.useRef(0),Ki=R.useRef(null),[WA,HA]=Y.split("-"),bx=R.useMemo(()=>v.reduce((ce,Ee,Le)=>Le>=Ac?ce:ce+Ee.height,0),[v,Ac]),Sx=ID(),zA=m.invert||f,rf=an==="loading";qi.current=R.useMemo(()=>Ac*$+bx,[Ac,bx]),R.useEffect(()=>{Na.current=xx},[xx]),R.useEffect(()=>{we(!0)},[]),R.useEffect(()=>{let ce=Gs.current;if(ce){let Ee=ce.getBoundingClientRect().height;return vx(Ee),b(Le=>[{toastId:m.id,height:Ee,position:m.position},...Le]),()=>b(Le=>Le.filter(xn=>xn.toastId!==m.id))}},[b,m.id]),R.useLayoutEffect(()=>{if(!U)return;let ce=Gs.current,Ee=ce.style.height;ce.style.height="auto";let Le=ce.getBoundingClientRect().height;ce.style.height=Ee,vx(Le),b(xn=>xn.find(wn=>wn.toastId===m.id)?xn.map(wn=>wn.toastId===m.id?{...wn,height:Le}:wn):[{toastId:m.id,height:Le,position:m.position},...xn])},[U,m.title,m.description,b,m.id]);let zr=R.useCallback(()=>{pe(!0),_a(qi.current),b(ce=>ce.filter(Ee=>Ee.toastId!==m.id)),setTimeout(()=>{k(m)},JD)},[m,k,b,qi]);R.useEffect(()=>{if(m.promise&&an==="loading"||m.duration===1/0||m.type==="loading")return;let ce;return j||g||W&&Sx?(()=>{if(wx.current<nf.current){let Ee=new Date().getTime()-nf.current;Na.current=Na.current-Ee}
306wx.current=new Date().getTime()})():Na.current!==1/0&&(nf.current=new Date().getTime(),ce=setTimeout(()=>{var Ee;(Ee=m.onAutoClose)==null||Ee.call(m,m),zr()},Na.current)),()=>clearTimeout(ce)},[j,g,m,an,W,Sx,zr]),R.useEffect(()=>{m.delete&&zr()},[zr,m.delete]);function qA(){var ce,Ee,Le;return I!=null&&I.loading?R.createElement("div",{className:jn(N==null?void 0:N.loader,(ce=m==null?void 0:m.classNames)==null?void 0:ce.loader,"sonner-loader"),"data-visible":an==="loading"},I.loading):O?R.createElement("div",{className:jn(N==null?void 0:N.loader,(Ee=m==null?void 0:m.classNames)==null?void 0:Ee.loader,"sonner-loader"),"data-visible":an==="loading"},O):R.createElement(PD,{className:jn(N==null?void 0:N.loader,(Le=m==null?void 0:m.classNames)==null?void 0:Le.loader),visible:an==="loading"})}return R.createElement("li",{tabIndex:0,ref:Gs,className:jn(D,BA,N==null?void 0:N.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[an],(n=m==null?void 0:m.classNames)==null?void 0:n[an]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:_,"data-styled":!(m.jsx||m.unstyled||y),"data-mounted":U,"data-promise":!!m.promise,"data-swiped":qs,"data-removed":be,"data-visible":$A,"data-y-position":WA,"data-x-position":HA,"data-index":w,"data-front":FA,"data-swiping":ge,"data-dismissible":zi,"data-type":an,"data-invert":zA,"data-swipe-out":gt,"data-swipe-direction":_e,"data-expanded":!!(j||C&&U),style:{"--index":w,"--toasts-before":w,"--z-index":S.length-w,"--offset":`${be?Ks:qi.current}px`,"--initial-height":C?"auto":`${Hi}px`,...P,...m.style},onDragEnd:()=>{Se(!1),ae(null),Ki.current=null},onPointerDown:ce=>{rf||!zi||(yx.current=new Date,_a(qi.current),ce.target.setPointerCapture(ce.pointerId),ce.target.tagName!=="BUTTON"&&(Se(!0),Ki.current={x:ce.clientX,y:ce.clientY}))},onPointerUp:()=>{var ce,Ee,Le,xn;if(gt||!zi)return;Ki.current=null;let wn=Number(((ce=Gs.current)==null?void 0:ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),qr=Number(((Ee=Gs.current)==null?void 0:Ee.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ys=new Date().getTime()-((Le=yx.current)==null?void 0:Le.getTime()),bn=le==="x"?wn:qr,Kr=Math.abs(bn)/Ys;if(Math.abs(bn)>=YD||Kr>.11){_a(qi.current),(xn=m.onDismiss)==null||xn.call(m,m),Ne(le==="x"?wn>0?"right":"left":qr>0?"down":"up"),zr(),on(!0),Hr(!1);return}Se(!1),ae(null)},onPointerMove:ce=>{var Ee,Le,xn,wn;if(!Ki.current||!zi||((Ee=window.getSelection())==null?void 0:Ee.toString().length)>0)return;let qr=ce.clientY-Ki.current.y,Ys=ce.clientX-Ki.current.x,bn=(Le=e.swipeDirections)!=null?Le:QD(Y);!le&&(Math.abs(Ys)>1||Math.abs(qr)>1)&&ae(Math.abs(Ys)>Math.abs(qr)?"x":"y");let Kr={x:0,y:0};le==="y"?(bn.includes("top")||bn.includes("bottom"))&&(bn.includes("top")&&qr<0||bn.includes("bottom")&&qr>0)&&(Kr.y=qr):le==="x"&&(bn.includes("left")||bn.includes("right"))&&(bn.includes("left")&&Ys<0||bn.includes("right")&&Ys>0)&&(Kr.x=Ys),(Math.abs(Kr.x)>0||Math.abs(Kr.y)>0)&&Hr(!0),(xn=Gs.current)==null||xn.style.setProperty("--swipe-amount-x",`${Kr.x}px`),(wn=Gs.current)==null||wn.style.setProperty("--swipe-amount-y",`${Kr.y}px`)}},VA&&!m.jsx?R.createElement("button",{"aria-label":V,"data-disabled":rf,"data-close-button":!0,onClick:rf||!zi?()=>{}:()=>{var ce;zr(),(ce=m.onDismiss)==null||ce.call(m,m)},className:jn(N==null?void 0:N.closeButton,(s=m==null?void 0:m.classNames)==null?void 0:s.closeButton)},(i=I==null?void 0:I.close)!=null?i:DD):null,m.jsx||p.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:R.createElement(R.Fragment,null,an||m.icon||m.promise?R.createElement("div",{"data-icon":"",className:jn(N==null?void 0:N.icon,(o=m==null?void 0:m.classNames)==null?void 0:o.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||qA():null,m.type!=="loading"?m.
vendor: 5,553 bytes, line 306
306icon||(I==null?void 0:I[an])||ED(an):null):null,R.createElement("div",{"data-content":"",className:jn(N==null?void 0:N.content,(l=m==null?void 0:m.classNames)==null?void 0:l.content)},R.createElement("div",{"data-title":"",className:jn(N==null?void 0:N.title,(c=m==null?void 0:m.classNames)==null?void 0:c.title)},typeof m.title=="function"?m.title():m.title),m.description?R.createElement("div",{"data-description":"",className:jn(G,UA,N==null?void 0:N.description,(u=m==null?void 0:m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),p.isValidElement(m.cancel)?m.cancel:m.cancel&&Xc(m.cancel)?R.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||T,onClick:ce=>{var Ee,Le;Xc(m.cancel)&&zi&&((Le=(Ee=m.cancel).onClick)==null||Le.call(Ee,ce),zr())},className:jn(N==null?void 0:N.cancelButton,(d=m==null?void 0:m.classNames)==null?void 0:d.cancelButton)},m.cancel.label):null,p.isValidElement(m.action)?m.action:m.action&&Xc(m.action)?R.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||F,onClick:ce=>{var Ee,Le;Xc(m.action)&&((Le=(Ee=m.action).onClick)==null||Le.call(Ee,ce),!ce.defaultPrevented&&zr())},className:jn(N==null?void 0:N.actionButton,(h=m==null?void 0:m.classNames)==null?void 0:h.actionButton)},m.action.label):null))};function zw(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function ZD(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",l=i?qD:zD;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=l:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var eI=p.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:f,style:m,visibleToasts:y=HD,toastOptions:g,dir:b=zw(),gap:x=GD,loadingIcon:v,icons:w,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:j}=e,[k,_]=R.useState([]),E=R.useMemo(()=>Array.from(new Set([r].concat(k.filter(W=>W.position).map(W=>W.position)))),[k,r]),[P,T]=R.useState([]),[F,D]=R.useState(!1),[G,M]=R.useState(!1),[Y,$]=R.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),O=R.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=R.useRef(null),I=R.useRef(!1),V=R.useCallback(W=>{_(le=>{var ae;return(ae=le.find(_e=>_e.id===W.id))!=null&&ae.delete||It.dismiss(W.id),le.filter(({id:_e})=>_e!==W.id)})},[]);return R.useEffect(()=>It.subscribe(W=>{if(W.dismiss){_(le=>le.map(ae=>ae.id===W.id?{...ae,delete:!0}:ae));return}setTimeout(()=>{ok.flushSync(()=>{_(le=>{let ae=le.findIndex(_e=>_e.id===W.id);return ae!==-1?[...le.slice(0,ae),{...le[ae],...W},...le.slice(ae+1)]:[W,...le]})})})}),[]),R.useEffect(()=>{if(d!=="system"){$(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;let W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:le})=>{$(le?"dark":"light")})}catch{W.addListener(({matches:ae})=>{try{$(ae?"dark":"light")}catch(_e){console.error(_e)}})}},[d]),R.useEffect(()=>{k.length<=1&&D(!1)},[k]),R.useEffect(()=>{let W=le=>{var ae,_e;s.every(Ne=>le[Ne]||le.code===Ne)&&(D(!0),(ae=O.current)==null||ae.focus()),le.code==="Escape"&&(document.activeElement===O.current||(_e=O.current)!=null&&_e.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[s]),R.useEffect(()=>{if(O.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,I.current=!1)}},[O.current]),R.createElement("section",{ref:t,"aria-label":`${S} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((W,le)=>{var ae;let[_e,Ne]=W.split("-");return k.length?R.createElement("ol",{key:W,dir:b==="auto"?zw():b,tabIndex:-1,ref:O,className:l,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":_e,"data-lifted":F&&k.length>1&&!i,"data-x-position":Ne,style:{"--front-toast-height":`${((ae=P[0])==null?void 0:ae.height)||0}px`,"--width":`${KD}px`,"--gap":`${x}px`,...m,...ZD(c,u)},onBlur:U=>{I.current&&!U.currentTarget.contains(U.relatedTarget)&&(I.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||I.current||(I.current=!0,N.current=U.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{G||D(!1)},onDragEnd:()=>D(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},k.filter(U=>!U.position&&le===0||U.position===W).map((U,we)=>{var be,pe;return R.createElement(XD,{key:U.id,icons:w,index:we,toast:U,defaultRichColors:h,duration:(be=g==null?void 0:g.duration)!=null?be:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:y,closeButton:(pe=g==null?void 0:g.closeButton)!=null?pe
vendor: 4,190 bytes, line 306
306:o,interacting:G,position:W,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:V,toasts:k.filter(ge=>ge.position==U.position),heights:P.filter(ge=>ge.position==U.position),setHeights:T,expandByDefault:i,gap:x,loadingIcon:v,expanded:F,pauseWhenPageIsHidden:j,swipeDirections:e.swipeDirections})})):null}))});const tI=({...e})=>{const{theme:t="system"}=ND();return a.jsx(eI,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var nI=Vg[" useId ".trim().toString()]||(()=>{}),rI=0;function $n(e){const[t,n]=p.useState(nI());return pt(()=>{n(r=>r??String(rI++))},[e]),t?`radix-${t}`:""}const sI=["top","right","bottom","left"],Rs=Math.min,Yt=Math.max,wd=Math.round,Zc=Math.floor,fr=e=>({x:e,y:e}),iI={left:"right",right:"left",bottom:"top",top:"bottom"},oI={start:"end",end:"start"};function Np(e,t,n){return Yt(e,Rs(t,n))}function $r(e,t){return typeof e=="function"?e(t):e}function Br(e){return e.split("-")[0]}function ga(e){return e.split("-")[1]}function Hv(e){return e==="x"?"y":"x"}function zv(e){return e==="y"?"height":"width"}const aI=new Set(["top","bottom"]);function cr(e){return aI.has(Br(e))?"y":"x"}function qv(e){return Hv(cr(e))}function lI(e,t,n){n===void 0&&(n=!1);const r=ga(e),s=qv(e),i=zv(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=bd(o)),[o,bd(o)]}function cI(e){const t=bd(e);return[Ep(e),t,Ep(t)]}function Ep(e){return e.replace(/start|end/g,t=>oI[t])}const qw=["left","right"],Kw=["right","left"],uI=["top","bottom"],dI=["bottom","top"];function hI(e,t,n){switch(e){case"top":case"bottom":return n?t?Kw:qw:t?qw:Kw;case"left":case"right":return t?uI:dI;default:return[]}}function fI(e,t,n,r){const s=ga(e);let i=hI(Br(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Ep)))),i}function bd(e){return e.replace(/left|right|bottom|top/g,t=>iI[t])}function mI(e){return{top:0,right:0,bottom:0,left:0,...e}}function rC(e){return typeof e!="number"?mI(e):{top:e,right:e,bottom:e,left:e}}function Sd(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Gw(e,t,n){let{reference:r,floating:s}=e;const i=cr(t),o=qv(t),l=zv(o),c=Br(t),u=i==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[l]/2-s[l]/2;let m;switch(c){case"top":m={x:d,y:r.y-s.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-s.width,y:h};break;default:m={x:r.x,y:r.y}}switch(ga(t)){case"start":m[o]-=f*(n&&u?-1:1);break;case"end":m[o]+=f*(n&&u?-1:1);break}return m}const pI=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=Gw(u,r,c),f=r,m={},y=0;for(let g=0;g<l.length;g++){const{name:b,fn:x}=l[g],{x:v,y:w,data:S,reset:j}=await x({x:d,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:m,rects:u,platform:o,elements:{reference:e,floating:t}});d=v??d,h=w??h,m={...m,[b]:{...m[b],...S}},j&&y<=50&&(y++,typeof j=="object"&&(j.placement&&(f=j.placement),j.rects&&(u=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):j.rects),{x:d,y:h}=Gw(u,f,c)),g=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:m}};async function Ll(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:m=0}=$r(t,e),y=rC(m),b=l[f?h==="floating"?"reference":"floating":h],x=Sd(await i.getClippingRect
vendor: 8,956 bytes, line 306
306({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),v=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},j=Sd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:w,strategy:c}):v);return{top:(x.top-j.top+y.top)/S.y,bottom:(j.bottom-x.bottom+y.bottom)/S.y,left:(x.left-j.left+y.left)/S.x,right:(j.right-x.right+y.right)/S.x}}const gI=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=$r(e,t)||{};if(u==null)return{};const h=rC(d),f={x:n,y:r},m=qv(s),y=zv(m),g=await o.getDimensions(u),b=m==="y",x=b?"top":"left",v=b?"bottom":"right",w=b?"clientHeight":"clientWidth",S=i.reference[y]+i.reference[m]-f[m]-i.floating[y],j=f[m]-i.reference[m],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let _=k?k[w]:0;(!_||!await(o.isElement==null?void 0:o.isElement(k)))&&(_=l.floating[w]||i.floating[y]);const E=S/2-j/2,P=_/2-g[y]/2-1,T=Rs(h[x],P),F=Rs(h[v],P),D=T,G=_-g[y]-F,M=_/2-g[y]/2+E,Y=Np(D,M,G),$=!c.arrow&&ga(s)!=null&&M!==Y&&i.reference[y]/2-(M<D?T:F)-g[y]/2<0,O=$?M<D?M-D:M-G:0;return{[m]:f[m]+O,data:{[m]:Y,centerOffset:M-Y-O,...$&&{alignmentOffset:O}},reset:$}}}),vI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...b}=$r(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Br(s),v=cr(l),w=Br(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=f||(w||!g?[bd(l)]:cI(l)),k=y!=="none";!f&&k&&j.push(...fI(l,g,y,S));const _=[l,...j],E=await Ll(t,b),P=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(E[x]),h){const M=lI(s,o,S);P.push(E[M[0]],E[M[1]])}if(T=[...T,{placement:s,overflows:P}],!P.every(M=>M<=0)){var F,D;const M=(((F=i.flip)==null?void 0:F.index)||0)+1,Y=_[M];if(Y&&(!(h==="alignment"?v!==cr(Y):!1)||T.every(C=>C.overflows[0]>0&&cr(C.placement)===v)))return{data:{index:M,overflows:T},reset:{placement:Y}};let $=(D=T.filter(O=>O.overflows[0]<=0).sort((O,C)=>O.overflows[1]-C.overflows[1])[0])==null?void 0:D.placement;if(!$)switch(m){case"bestFit":{var G;const O=(G=T.filter(C=>{if(k){const N=cr(C.placement);return N===v||N==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(N=>N>0).reduce((N,I)=>N+I,0)]).sort((C,N)=>C[1]-N[1])[0])==null?void 0:G[0];O&&($=O);break}case"initialPlacement":$=l;break}if(s!==$)return{reset:{placement:$}}}return{}}}};function Yw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jw(e){return sI.some(t=>e[t]>=0)}const yI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=$r(e,t);switch(r){case"referenceHidden":{const i=await Ll(t,{...s,elementContext:"reference"}),o=Yw(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Jw(o)}}}case"escaped":{const i=await Ll(t,{...s,altBoundary:!0}),o=Yw(i,n.floating);return{data:{escapedOffsets:o,escaped:Jw(o)}}}default:return{}}}}},sC=new Set(["left","top"]);async function xI(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=Br(n),l=ga(n),c=cr(n)==="y",u=sC.has(o)?-1:1,d=i&&c?-1:1,h=$r(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof y=="number"&&(m=l==="end"?y*-1:y),c?{x:m*d,y:f*u}:{x:f*u,y:m*d}}const wI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:l}=t,c=await xI(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},bI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:b=>{let{x,y:v}=b;return{x,y:v}}},...c}=$r(e,t),u={x:n,y:r},d=await Ll(t,c),h=cr(Br(s)),f=Hv(h);let m=u[f],y=u[h];if(i){const b=f==="y"?"top":"left",x=f==="y"?"bottom":"right",v=m+d[b],w=m-d[x];m=Np(v,m,w)}if(o){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",v=y+d[b],w=y-d[x];y=Np(v,y,w)}const g=l.fn({...t,[f]:m,[h]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[h]:o}}}}}},SI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=$r(e,t),d={x:n,y:r},h=cr(s),f=Hv(h);let m=d[f],y=d[h];const g=$r(l,t),b=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=f==="y"?"height":"width",S=i.reference[f]-i.floating[w]+b.mainAxis,j=i.reference[f]+i.reference[w]-b.mainAxis;m<S?m=S:m>j&&(m=j)}if(u){var x,v;const w=f==="y"?"width":"height",S=sC.has(Br(s)),j=i.reference[h]-i.floating[w]+(S&&((x=o.offset)==null?void 0:x[h])||0)+(S?0:b.crossAxis),k=i.reference[h]+i.reference[w]+(S?0:((v=o.offset)==null?void 0:v[h])||0)-(S?b.crossAxis:0);y<j?y=j:y>k&&(y=k)}return{[f]:m,[h]:y}}}},jI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...u}=$r(e,t),d=await Ll(t,u),h=Br(s),f=ga(s),m=cr(s)==="y",{width:y,height:g}=i.floating;let b,x;h==="top"||h==="bottom"?(b=h,x=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(x=h,b=f==="end"?"top":"bottom");const v=g-d.top-d.bottom,w=y-d.left-d.right,S=Rs(g-d[b],v),j=Rs(y-d[x],w),k=!t.middlewareData.shift;let _=S,E=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(_=v),k&&!f){const T=Yt(d.left,0),F=Yt(d.right,0),D=Yt(d.top,0),G=Yt(d.bottom,0);m?E=y-2*(T!==0||F!==0?T+F:Yt(d.left,d.right)):_=g-2*(D!==0||G!==0?D+G:Yt(d.top,d.bottom))}await c({...t,availableWidth:E,availableHeight:_});const P=await o.getDimensions(l.floating);return y!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function ph(){return typeof window<"u"}function va(e){return iC(e)?(e.nodeName||"").toLowerCase():"#document"}function Zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xr(e){var t;return(t=(iC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function iC(e){return ph()?e instanceof Node||e instanceof Zt(e).Node:!1}function Vn(e){return ph()?e instanceof Element||e instanceof Zt(e).Element:!1}function gr(e){return ph()?e instanceof HTMLElement||e instanceof Zt(e).HTMLElement:!1}function Qw(e){return!ph()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zt(e).ShadowRoot}const kI=new Set(["inline","contents"]);function mc(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Wn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!kI.has(s)}const CI=new Set(["table","td","th"]);function _I(e){return CI.has(va(e))}const NI=[":popover-open",":modal"];function gh(e){return NI.some(t=>{try{return e.matches(t)}catch{return!1}})}const EI=["transform","translate","scale","rotate","perspective"],TI=["transform","translate","scale","rotate","perspective","filter"],PI=["paint","layout","strict","content"];function Kv(e){const t=Gv(),n=Vn(e)?Wn(e):e;return EI.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||TI.some(r=>(n.willChange||"").includes(r))||PI.some(r=>(n.contain||"").includes(r))}function AI(e){let t=Os(e);for(;gr(t)&&!ra(t);){if(Kv(t))return t;if(gh(t))return null;t=Os(t)}return null}function Gv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const RI=new Set(["html","body","#document"]);function ra(e){return RI.has(va(e))}function Wn(e){return Zt(e).getComputedStyle(e)}function vh(e){return Vn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Os(e){if(va(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qw(e)&&e.host||xr(e);return Qw(t)?t.host:t}function oC(e){const t=Os(e);return ra(t)?e.ownerDocument?e.ownerDocument.body:e.body:gr(t)&&mc(t)?t:oC(t)}function Fl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=oC(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=Zt(s);if(i){const l=Tp(o);
vendor: 4,127 bytes, line 306
306return t.concat(o,o.visualViewport||[],mc(s)?s:[],l&&n?Fl(l):[])}return t.concat(s,Fl(s,[],n))}function Tp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function aC(e){const t=Wn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=gr(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,l=wd(n)!==i||wd(r)!==o;return l&&(n=i,r=o),{width:n,height:r,$:l}}function Yv(e){return Vn(e)?e:e.contextElement}function Io(e){const t=Yv(e);if(!gr(t))return fr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=aC(t);let o=(i?wd(n.width):n.width)/r,l=(i?wd(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const OI=fr(0);function lC(e){const t=Zt(e);return!Gv()||!t.visualViewport?OI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function MI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zt(e)?!1:t}function Ri(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Yv(e);let o=fr(1);t&&(r?Vn(r)&&(o=Io(r)):o=Io(e));const l=MI(i,n,r)?lC(i):fr(0);let c=(s.left+l.x)/o.x,u=(s.top+l.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const f=Zt(i),m=r&&Vn(r)?Zt(r):r;let y=f,g=Tp(y);for(;g&&r&&m!==y;){const b=Io(g),x=g.getBoundingClientRect(),v=Wn(g),w=x.left+(g.clientLeft+parseFloat(v.paddingLeft))*b.x,S=x.top+(g.clientTop+parseFloat(v.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,h*=b.y,c+=w,u+=S,y=Zt(g),g=Tp(y)}}return Sd({width:d,height:h,x:c,y:u})}function Jv(e,t){const n=vh(e).scrollLeft;return t?t.left+n:Ri(xr(e)).left+n}function cC(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Jv(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function DI(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=xr(r),l=t?gh(t.floating):!1;if(r===o||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=fr(1);const d=fr(0),h=gr(r);if((h||!h&&!i)&&((va(r)!=="body"||mc(o))&&(c=vh(r)),gr(r))){const m=Ri(r);u=Io(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const f=o&&!h&&!i?cC(o,c,!0):fr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-c.scrollTop*u.y+d.y+f.y}}function II(e){return Array.from(e.getClientRects())}function LI(e){const t=xr(e),n=vh(e),r=e.ownerDocument.body,s=Yt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Yt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Jv(e);const l=-n.scrollTop;return Wn(r).direction==="rtl"&&(o+=Yt(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:l}}function FI(e,t){const n=Zt(e),r=xr(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,l=0,c=0;if(s){i=s.width,o=s.height;const u=Gv();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:l,y:c}}const $I=new Set(["absolute","fixed"]);function BI(e,t){const n=Ri(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=gr(e)?Io(e):fr(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:o,height:l,x:c,y:u}}function Xw(e,t,n){let r;if(t==="viewport")r=FI(e,n);else if(t==="document")r=LI(xr(e));else if(Vn(t))r=BI(t,n);else{const s=lC(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Sd(r)}function uC(e,t){const n=Os(e);return n===t||!Vn(n)||ra(n)?!1:Wn(n).position==="fixed"||uC(n,t)}function UI(e,t){const n=t.get(e);if(n)return n;let r=Fl(e,[],!1).filter(l=>Vn(l)&&va(l)!=="body"),s=null;const i=Wn(e).position==="fixed";let o=i?Os(e):e;for(;Vn(o)&&!ra(o);){const l=Wn(o),c=Kv(o);!c&&l.position==="fixed"&&(s=null),(i?!c&&!s:!c&&l.position==="static"&&!!s&&$I.has(s.position)||mc(o)&&!c&&uC(e,o))?r=r.filter(d=>d!==o):s=l,o=Os(o)}return t.set(e,r),r}function VI(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?gh(t)?[]:UI(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,d)=>{const h=Xw(t,d,s);return u.top=Yt(h.top,u.top),u.right=Rs(h.right,u.right),u.bottom=Rs(h.bottom,u.bottom),u.left=Yt(h.left,u.left),u},Xw(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function WI(e){const{width:t,height:n}=aC(e);return{width:t,height:n}}
vendor: 9,787 bytes, line 306
306function HI(e,t,n){const r=gr(t),s=xr(t),i=n==="fixed",o=Ri(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=fr(0);function u(){c.x=Jv(s)}if(r||!r&&!i)if((va(t)!=="body"||mc(s))&&(l=vh(t)),r){const m=Ri(t,!0,i,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else s&&u();i&&!r&&s&&u();const d=s&&!r&&!i?cC(s,l):fr(0),h=o.left+l.scrollLeft-c.x-d.x,f=o.top+l.scrollTop-c.y-d.y;return{x:h,y:f,width:o.width,height:o.height}}function If(e){return Wn(e).position==="static"}function Zw(e,t){if(!gr(e)||Wn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xr(e)===n&&(n=n.ownerDocument.body),n}function dC(e,t){const n=Zt(e);if(gh(e))return n;if(!gr(e)){let s=Os(e);for(;s&&!ra(s);){if(Vn(s)&&!If(s))return s;s=Os(s)}return n}let r=Zw(e,t);for(;r&&_I(r)&&If(r);)r=Zw(r,t);return r&&ra(r)&&If(r)&&!Kv(r)?n:r||AI(e)||n}const zI=async function(e){const t=this.getOffsetParent||dC,n=this.getDimensions,r=await n(e.floating);return{reference:HI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qI(e){return Wn(e).direction==="rtl"}const KI={convertOffsetParentRelativeRectToViewportRelativeRect:DI,getDocumentElement:xr,getClippingRect:VI,getOffsetParent:dC,getElementRects:zI,getClientRects:II,getDimensions:WI,getScale:Io,isElement:Vn,isRTL:qI};function hC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function GI(e,t){let n=null,r;const s=xr(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:h,width:f,height:m}=u;if(l||t(),!f||!m)return;const y=Zc(h),g=Zc(s.clientWidth-(d+f)),b=Zc(s.clientHeight-(h+m)),x=Zc(d),w={rootMargin:-y+"px "+-g+"px "+-b+"px "+-x+"px",threshold:Yt(0,Rs(1,c))||1};let S=!0;function j(k){const _=k[0].intersectionRatio;if(_!==c){if(!S)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},1e3)}_===1&&!hC(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(j,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,w)}n.observe(e)}return o(!0),i}function YI(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Yv(e),d=s||i?[...u?Fl(u):[],...Fl(t)]:[];d.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const h=u&&l?GI(u,n):null;let f=-1,m=null;o&&(m=new ResizeObserver(x=>{let[v]=x;v&&v.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let y,g=c?Ri(e):null;c&&b();function b(){const x=Ri(e);g&&!hC(g,x)&&n(),g=x,y=requestAnimationFrame(b)}return n(),()=>{var x;d.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),h==null||h(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(y)}}const JI=wI,QI=bI,XI=vI,ZI=jI,eL=yI,e0=gI,tL=SI,nL=(e,t,n)=>{const r=new Map,s={platform:KI,...n},i={...s.platform,_c:r};return pI(e,t,{...s,platform:i})};var rL=typeof document<"u",sL=function(){},Mu=rL?p.useLayoutEffect:sL;function jd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!jd(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!jd(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function fC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function t0(e,t){const n=fC(e);return Math.round(t*n)/n}function Lf(e){const t=p.useRef(e);return Mu(()=>{t.current=e}),t}function iL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=p.useState(r);jd(f,r)||m(r);const[y,g]=p.useState(null),[b,x]=p.useState(null),v=p.useCallback(C=>{C!==k.current&&(k.current=C,g(C))},[]),w=p.useCallback(C=>{C!==_.current&&(_.current=C,x(C))},[]),S=i||y,j=o||b,k=p.useRef(null),_=p.useRef(null),E=p.useRef(d),P=c!=null,T=Lf(c),F=Lf(s),D=Lf(u),G=p.useCallback(()=>{if(!k.current||!_.current)return;const C={placement:t,strategy:n,middleware:f};F.current&&(C.platform=F.current),nL(k.current,_.current,C).then(N=>{const I={...N,isPositioned:D.current!==!1};M.current&&!jd(E.current,I)&&(E.current=I,$i.flushSync(()=>{h(I)}))})},[f,t,n,F,D]);Mu(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,h(C=>({...C,isPositioned:!1})))},[u]);const M=p.useRef(!1);Mu(()=>(M.current=!0,()=>{M.current=!1}),[]),Mu(()=>{if(S&&(k.current=S),j&&(_.current=j),S&&j){if(T.current)return T.current(S,j,G);G()}},[S,j,G,T,P]);const Y=p.useMemo(()=>({reference:k,floating:_,setReference:v,setFloating:w}),[v,w]),$=p.useMemo(()=>({reference:S,floating:j}),[S,j]),O=p.useMemo(()=>{const C={position:n,left:0,top:0};if(!$.floating)return C;const N=t0($.floating,d.x),I=t0($.floating,d.y);return l?{...C,transform:"translate("+N+"px, "+I+"px)",...fC($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:N,top:I}},[n,l,$.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:G,refs:Y,elements:$,floatingStyles:O}),[d,G,Y,$,O])}const oL=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?e0({element:r.current,padding:s}).fn(n):{}:r?e0({element:r,padding:s}).fn(n):{}}}},aL=(e,t)=>({...JI(e),options:[e,t]}),lL=(e,t)=>({...QI(e),options:[e,t]}),cL=(e,t)=>({...tL(e),options:[e,t]}),uL=(e,t)=>({...XI(e),options:[e,t]}),dL=(e,t)=>({...ZI(e),options:[e,t]}),hL=(e,t)=>({...eL(e),options:[e,t]}),fL=(e,t)=>({...oL(e),options:[e,t]});var mL="Arrow",mC=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return a.jsx(se.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});mC.displayName=mL;var pL=mC;function Qv(e){const[t,n]=p.useState(void 0);return pt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Xv="Popper",[pC,Bs]=sn(Xv),[gL,gC]=pC(Xv),vC=e=>{const{__scopePopper:t,children:n}=e,[r,s]=p.useState(null);return a.jsx(gL,{scope:t,anchor:r,onAnchorChange:s,children:n})};vC.displayName=Xv;var yC="PopperAnchor",xC=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=gC(yC,n),o=p.useRef(null),l=fe(t,o);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:a.jsx(se.div,{...s,ref:l})});xC.displayName=yC;var Zv="PopperContent",[vL,yL]=pC(Zv),wC=p.forwardRef((e,t)=>{var U,we,be,pe,ge,Se;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:y,...g}=e,b=gC(Zv,n),[x,v]=p.useState(null),w=fe(t,gt=>v(gt)),[S,j]=p.useState(null),k=Qv(S),_=(k==null?void 0:k.width)??0,E=(k==null?void 0:k.height)??0,P=r+(i!=="center"?"-"+i:""),T=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},F=Array.isArray(u)?u:[u],D=F.length>0,G={padding:T,boundary:F.filter(wL),altBoundary:D},{refs:M,floatingStyles:Y,placement:$,isPositioned:O,middlewareData:C}=iL({strategy:"fixed",placement:P,whileElementsMounted:(...gt)=>YI(...gt,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[aL({mainAxis:s+E,alignmentAxis:o}),c&&lL({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?cL():void 0,...G}),c&&uL({...G}),dL({...G,apply:({elements:gt,rects:on,availableWidth:qs,availableHeight:Hr})=>{const{width:Ks,height:_a}=on.reference,Hi=gt.floating.style;Hi.setProperty("--radix-popper-available-width",`${qs}px`),Hi.setProperty("--radix-popper-available-height",`${Hr}px`),Hi.setProperty("--radix-popper-anchor-width",`${Ks}px`),Hi.setProperty("--radix-popper-anchor-height",`${_a}px`)}}),S&&fL({element:S,padding:l}),bL({arrowWidth:_,arrowHeight:E}),f&&hL({strategy:"referenceHidden",...G})]}),[N,I]=jC($),V=zt(y);pt(()=>{O&&(V==null||V())},[O,V]);const W=(U=C.arrow)==null?void 0:U.x,le=(we=C.arrow)==null?void 0:we.y,ae=((be=C.arrow)==null?void 0:be.centerOffset)!==0,[_e,Ne]=p.useState();return pt(()=>{x&&Ne(window.getComputedStyle(x).zIndex)},[x]),a.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:O?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(pe=C.transformOrigin)==null?void 0:pe.x,(ge=C.transformOrigin)==null?void 0:ge.y].join(" "),...((Se=C.hide)==null?void 0:Se.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(vL,{scope:n,placedSide:N,onArrowChange:j,arrowX:W,arrowY:le,shouldHideArrow:ae,children:a.jsx(se.div,{"data-side":N,"data-align":I,...g,ref:w,style:{...g.style,animation:O?void 0:"none"}})})})});wC.displayName=Zv;var bC="PopperArrow",xL={top:"bottom",right:"left",bottom:"top",left:"r
306ight"},SC=p.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=yL(bC,r),o=xL[i.placedSide];return a.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:a.jsx(pL,{...s,ref:n,style:{...s.style,display:"block"}})})});SC.displayName=bC;function wL(e){return e!==null}var bL=e=>({name:"transformOrigin",options:e,fn(t){var b,x,v;const{placement:n,rects:r,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=jC(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((x=s.arrow)==null?void 0:x.x)??0)+l/2,m=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=o?h:`${f}px`,g=`${-c}px`):u==="top"?(y=o?h:`${f}px`,g=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=o?h:`${m}px`):u==="left"&&(y=`${r.floating.width+c}px`,g=o?h:`${m}px`),{data:{x:y,y:g}}}});function jC(e){const[t,n="center"]=e.split("-");return[t,n]}var ey=vC,pc=xC,yh=wC,xh=SC,[wh,WG]=sn("Tooltip",[Bs]),ty=Bs(),kC="TooltipProvider",SL=700,n0="tooltip.open",[jL,CC]=wh(kC),_C=e=>{const{__scopeTooltip:t,delayDuration:n=SL,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=p.useRef(!0),l=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),a.jsx(jL,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:i})};_C.displayName=kC;var NC="Tooltip",[HG,bh]=wh(NC),Pp="TooltipTrigger",kL=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=bh(Pp,n),i=CC(Pp,n),o=ty(n),l=p.useRef(null),c=fe(t,l,s.onTriggerChange),u=p.useRef(!1),d=p.useRef(!1),h=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(pc,{asChild:!0,...o,children:a.jsx(se.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:B(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:B(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:B(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:B(e.onBlur,s.onClose),onClick:B(e.onClick,s.onClose)})})});kL.displayName=Pp;var CL="TooltipPortal",[zG,_L]=wh(CL,{forceMount:void 0}),sa="TooltipContent",EC=p.forwardRef((e,t)=>{const n=_L(sa,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=bh(sa,e.__scopeTooltip);return a.jsx(qt,{present:r||o.open,children:o.disableHoverableContent?a.jsx(TC,{side:s,...i,ref:t}):a.jsx(NL,{side:s,...i,ref:t})})}),NL=p.forwardRef((e,t)=>{const n=bh(sa,e.__scopeTooltip),r=CC(sa,e.__scopeTooltip),s=p.useRef(null),i=fe(t,s),[o,l]=p.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,f=p.useCallback(()=>{l(null),h(!1)},[h]),m=p.useCallback((y,g)=>{const b=y.currentTarget,x={x:y.clientX,y:y.clientY},v=RL(x,b.getBoundingClientRect()),w=OL(x,v),S=ML(g.getBoundingClientRect()),j=IL([...w,...S]);l(j),h(!0)},[h]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(c&&d){const y=b=>m(b,d),g=b=>m(b,c);return c.addEventListener("pointerleave",y),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",g)}}},[c,d,m,f]),p.useEffect(()=>{if(o){const y=g=>{const b=g.target,x={x:g.clientX,y:g.clientY},v=(c==null?void 0:c.contains(b))||(d==null?void 0:d.contains(b)),w=!DL(x,o);v?f():w&&(f(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,d,o,u,f]),a.jsx(TC,{...e,ref:i})}),[EL,TL]=wh(NC,{isInside:!1}),PL=P2("TooltipContent"),TC=p.forwardRef((e,t)=>
vendor: 5,459 bytes, line 306
306{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...l}=e,c=bh(sa,n),u=ty(n),{onClose:d}=c;return p.useEffect(()=>(document.addEventListener(n0,d),()=>document.removeEventListener(n0,d)),[d]),p.useEffect(()=>{if(c.trigger){const h=f=>{const m=f.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),a.jsx(Bi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:a.jsxs(yh,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(PL,{children:r}),a.jsx(EL,{scope:n,isInside:!0,children:a.jsx(X2,{id:c.contentId,role:"tooltip",children:s||r})})]})})});EC.displayName=sa;var PC="TooltipArrow",AL=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=ty(n);return TL(PC,n).isInside?null:a.jsx(xh,{...s,...r,ref:t})});AL.displayName=PC;function RL(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function OL(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ML(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function DL(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],u=l.x,d=l.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function IL(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),LL(t)}function LL(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var FL=_C,AC=EC;const $L=FL,BL=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(AC,{ref:r,sideOffset:t,className:ee("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));BL.displayName=AC.displayName;var Sh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},jh=typeof window>"u"||"Deno"in globalThis;function Tn(){}function UL(e,t){return typeof e=="function"?e(t):e}function VL(e){return typeof e=="number"&&e>=0&&e!==1/0}function WL(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ap(e,t){return typeof e=="function"?e(t):e}function HL(e,t){return typeof e=="function"?e(t):e}function r0(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==ny(o,t.options))return!1}else if(!Bl(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||i&&!i(t))}function s0(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if($l(t.options.mutationKey)!==$l(i))return!1}else if(!Bl(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function ny(e,t){return((t==null?void 0:t.queryKeyHashFn)||$l)(e)}function $l(e){return JSON.stringify(e,(t,n)=>Rp(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Bl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Bl(e[n],t[n])):!1}function RC(e,t){if(e===t)return e;const n=i0(e)&&i0(t);if(n||Rp(e)&&Rp(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,l=n?[]:{},c=new Set(r);let u=0;for(let d=0;d<o;d++){const h=n?d:i[d];(!n&&c.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,u++):(l[h]=RC(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return s===o&&u===s?e:l}return t}function i0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Rp(e){if(!o0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;
vendor: 6,309 bytes, line 306
306return!(!o0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function o0(e){return Object.prototype.toString.call(e)==="[object Object]"}function zL(e){return new Promise(t=>{setTimeout(t,e)})}function qL(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?RC(e,t):t}function KL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function GL(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ry=Symbol();function OC(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ry?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var mi,ls,Uo,B1,YL=(B1=class extends Sh{constructor(){super();je(this,mi);je(this,ls);je(this,Uo);ue(this,Uo,t=>{if(!jh&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){A(this,ls)||this.setEventListener(A(this,Uo))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,ls))==null||t.call(this),ue(this,ls,void 0))}setEventListener(t){var n;ue(this,Uo,t),(n=A(this,ls))==null||n.call(this),ue(this,ls,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){A(this,mi)!==t&&(ue(this,mi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof A(this,mi)=="boolean"?A(this,mi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},mi=new WeakMap,ls=new WeakMap,Uo=new WeakMap,B1),MC=new YL,Vo,cs,Wo,U1,JL=(U1=class extends Sh{constructor(){super();je(this,Vo,!0);je(this,cs);je(this,Wo);ue(this,Wo,t=>{if(!jh&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){A(this,cs)||this.setEventListener(A(this,Wo))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,cs))==null||t.call(this),ue(this,cs,void 0))}setEventListener(t){var n;ue(this,Wo,t),(n=A(this,cs))==null||n.call(this),ue(this,cs,t(this.setOnline.bind(this)))}setOnline(t){A(this,Vo)!==t&&(ue(this,Vo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return A(this,Vo)}},Vo=new WeakMap,cs=new WeakMap,Wo=new WeakMap,U1),kd=new JL;function QL(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function XL(e){return Math.min(1e3*2**e,3e4)}function DC(e){return(e??"online")==="online"?kd.isOnline():!0}var IC=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ff(e){return e instanceof IC}function LC(e){let t=!1,n=0,r=!1,s;const i=QL(),o=g=>{var b;r||(f(new IC(g)),(b=e.abort)==null||b.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>MC.isFocused()&&(e.networkMode==="always"||kd.isOnline())&&e.canRun(),d=()=>DC(e.networkMode)&&e.canRun(),h=g=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,g),s==null||s(),i.resolve(g))},f=g=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,g),s==null||s(),i.reject(g))},m=()=>new Promise(g=>{var b;s=x=>{(r||u())&&g(x)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;s=void 0,r||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(r)return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(h).catch(x=>{var k;if(r)return;const v=e.retry??(jh?0:3),w=e.retryDelay??XL,S=typeof w=="function"?w(n,x):w,j=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,x);if(t||!j){f(x);return}n++,(k=e.onFail)==null||k.call(e,n,x),zL(S).then(()=>u()?void 0:m()).then(()=>{t?f(x):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?y():m().then(y),i)}}var ZL=e=>setTimeout(e,0);function e3(){let e=[],t=0,n=l=>{l()},r=l=>{l()},s=ZL;const i=l=>{t?e.push(l):s(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var _t=e3(),pi,V1,FC=(V1=class{constructor(){je(this,pi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),VL(this.gcTime)&&ue(this,pi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(jh?1/0:5*60*1e3))}clearGcTimeout(){A(this,pi)&&(clearTimeout(A(this,pi)),ue(this,pi,void 0))}},pi=new WeakMap,V1),Ho,gi,cn,vi,wt,sc,yi,An,kr,W1,t3=(W1=class extends FC{constructor(t){super();je(this,An);je(this,Ho);je(this,gi);je(this,cn);je(this,vi);je(this,wt);je(this,sc);je(this,yi);ue(this,yi,!1),ue(this,sc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ue(this,vi,t.client),ue(this,cn,A(this,vi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ue(this,Ho,r3(this.options)),this.state=t.state??A(this,Ho),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=A(this,wt))==null?void 0:t.promise}setOptions(t){this.options={...A(this,sc),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,cn).remove(this)}setData(t,n){const r=qL(this.state.data,t,this.options);return vt(this,An,kr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){vt(this,An,kr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=A(this,wt))==null?void 0:r.promise;return(s=A(this,wt))==null||s.cancel(t),n?n.then(Tn).catch(Tn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,Ho))}isActive(){return this.observers.some(t=>HL(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ry||this.state.dataUpdateCount+this.state.errorUpdate
vendor: 1,274 bytes, line 306
306Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ap(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!WL(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=A(this,wt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=A(this,wt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),A(this,cn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(A(this,wt)&&(A(this,yi)?A(this,wt).cancel({revert:!0}):A(this,wt).cancelRetry()),this.scheduleGc()),A(this,cn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||vt(this,An,kr).call(this,{type:"invalidate"})}
vendor: 13,738 bytes, line 306
306fetch(t,n){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(A(this,wt))return A(this,wt).continueRetry(),A(this,wt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(m=>m.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ue(this,yi,!0),r.signal)})},i=()=>{const f=OC(this.options,n),y=(()=>{const g={client:A(this,vi),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return ue(this,yi,!1),this.options.persister?this.options.persister(f,y,this):f(y)},l=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:A(this,vi),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(l,this),ue(this,gi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&vt(this,An,kr).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=f=>{var m,y,g,b;Ff(f)&&f.silent||vt(this,An,kr).call(this,{type:"error",error:f}),Ff(f)||((y=(m=A(this,cn).config).onError)==null||y.call(m,f,this),(b=(g=A(this,cn).config).onSettled)==null||b.call(g,this.state.data,f,this)),this.scheduleGc()};return ue(this,wt,LC({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var m,y,g,b;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(x){c(x);return}(y=(m=A(this,cn).config).onSuccess)==null||y.call(m,f,this),(b=(g=A(this,cn).config).onSettled)==null||b.call(g,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,m)=>{vt(this,An,kr).call(this,{type:"failed",failureCount:f,error:m})},onPause:()=>{vt(this,An,kr).call(this,{type:"pause"})},onContinue:()=>{vt(this,An,kr).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),A(this,wt).start()}},Ho=new WeakMap,gi=new WeakMap,cn=new WeakMap,vi=new WeakMap,wt=new WeakMap,sc=new WeakMap,yi=new WeakMap,An=new WeakSet,kr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...n3(r.data,this.options),fetchMeta:t.meta??null};case"success":return ue(this,gi,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Ff(s)&&s.revert&&A(this,gi)?{...A(this,gi),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),_t.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),A(this,cn).notify({query:this,type:"updated",action:t})})},W1);function n3(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:DC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function r3(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var er,H1,s3=(H1=class extends Sh{constructor(t={}){super();je(this,er);this.config=t,ue(this,er,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??ny(s,n);let o=this.get(i);return o||(o=new t3({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){A(this,er).has(t.queryHash)||(A(this,er).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=A(this,er).get(t.queryHash);n&&(t.destroy(),n===t&&A(this,er).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){_t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return A(this,er).get(t)}getAll(){return[...A(this,er).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>r0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>r0(t,r)):n}notify(t){_t.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){_t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){_t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},er=new WeakMap,H1),tr,jt,xi,nr,Xr,z1,i3=(z1=class extends FC{constructor(t){super();je(this,nr);je(this,tr);je(this,jt);je(this,xi);this.mutationId=t.mutationId,ue(this,jt,t.mutationCache),ue(this,tr,[]),this.state=t.state||o3(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){A(this,tr).includes(t)||(A(this,tr).push(t),this.clearGcTimeout(),A(this,jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ue(this,tr,A(this,tr).filter(n=>n!==t)),this.scheduleGc(),A(this,jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,tr).length||(this.state.status==="pending"?this.scheduleGc():A(this,jt).remove(this))}continue(){var t;return((t=A(this,xi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,l,c,u,d,h,f,m,y,g,b,x,v,w,S,j,k,_,E;const n=()=>{vt(this,nr,Xr).call(this,{type:"continue"})};ue(this,xi,LC({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,T)=>{vt(this,nr,Xr).call(this,{type:"failed",failureCount:P,error:T})},onPause:()=>{vt(this,nr,Xr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,jt).canRun(this)}));const r=this.state.status==="pending",s=!A(this,xi).canStart();try{if(r)n();else{vt(this,nr,Xr).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=A(this,jt).config).onMutate)==null?void 0:o.call(i,t,this));const T=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));T!==this.state.context&&vt(this,nr,Xr).call(this,{type:"pending",context:T,variables:t,isPaused:s})}const P=await A(this,xi).start();return await((d=(u=A(this,jt).config).onSuccess)==null?void 0:d.call(u,P,t,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,P,t,this.state.context)),await((y=(m=A(this,jt).config).onSettled)==null?void 0:y.call(m,P,null,this.state.variables,this.state.context,this)),await((b=(g=this.options).onSettled)==null?void 0:b.call(g,P,null,t,this.state.context)),vt(this,nr,Xr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((v=(x=A(this,jt).config).onError)==null?void 0:v.call(x,P,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,P,t,this.state.context)),await((k=(j=A(this,jt).config).onSettled)==null?void 0:k.call(j,void 0,P,this.state.variables,this.state.context,this)),await((E=(_=this.options).onSettled)==null?void 0:E.call(_,void 0,P,t,this.state.context)),P}finally{vt(this,nr,Xr).call(this,{type:"error",error:P})}}finally{A(this,jt).runNext(this)}}},tr=new WeakMap,jt=new WeakMap,xi=new WeakMap,nr=new WeakSet,Xr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),_t.batch(()=>{A(this,tr).forEach(r=>{r.onMutationUpdate(t)}),A(this,jt).notify({mutation:this,type:"updated",action:t})})},z1);function o3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Tr,Rn,ic,q1,a3=(q1=class extends Sh{constructor(t={}){super();je(this,Tr);je(this,Rn);je(this,ic);this.config=t,ue(this,Tr,new Set),ue(this,Rn,new Map),ue(this,ic,0)}build(t,n,r){const s=new i3({mutationCache:this,mutationId:++Rc(this,ic)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){A(this,Tr).add(t);const n=eu(t);if(typeof n=="string"){const r=A(this,Rn).get(n);r?r.push(t):A(this,Rn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(A(this,Tr).delete(t)){const n=eu(t);if(typeof n=="string"){const r=A(this,Rn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&A(this,Rn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=eu(t);if(typeof n=="string"){const r=A(this,Rn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=eu(t);if(typeof n=="string"){const s=(r=A(this,Rn).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){_t.batch(()=>{A(this,Tr).forEach(t=>{this.notify({type:"removed",mutation:t})}),A(this,Tr).clear(),A(this,Rn).clear()})}getAll(){return Array.from(A(this,Tr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>s0(n,r))}findAll(t={}){return this.getAll().filter(n=>s0(t,n))}notify(t){_t.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return _t.batch(()=>Promise.all(t.map(n=>n.continue().catch(Tn))))}},Tr=new WeakMap,Rn=new WeakMap,ic=new WeakMap,q1);function eu(e){var t;return(t=e.options.scope)==null?void 0:t.id}function a0(e){return{onFetch:(t,n)=>{var d,h,f,m,y;const r=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let g=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=OC(t.options,t.fetchOptions),v=async(w,S,j)=>{if(g)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const _=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:S,direction:j?"backward":"forward",meta:t.options.meta};return b(F),F})(),E=await x(_),{maxPages:P}=t.options,T=j?GL:KL;return{pages:T(w.pages,E,P),pageParams:T(w.pageParams,S,P)}};if(s&&i.length){const w=s==="backward",S=w?l3:l0,j={pages:i,pageParams:o},k=S(r,j);l=await v(j,k,w)}else{const w=e??i.length;do{const S=c===0?o[0]??r.initialPageParam:l0(r,l);if(c>0&&S==null)break;l=await v(l,S),c++}while(c<w)}return l};t.options.persister?t.fetchFn=()=>{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function l0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function l3(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var We,us,ds,zo,qo,hs,Ko,Go,K1,c3=(K1=class{constructor(e={}){je(this,We);je(this,us);je(this,ds);je(this,zo);je(this,qo);je(this,hs);je(this,Ko);je(this,Go);ue(this,We,e.queryCache||new s3),ue(this,us,e.mutationCache||new a3),ue(this,ds,e.defaultOptions||{}),ue(this,zo,new Map),ue(this,qo,new Map),ue(this,hs,0)}mount(){Rc(this,hs)._++,A(this,hs)===1&&(ue(this,Ko,MC.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,We).onFocus())})),ue(this,Go,kd.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,We).onOnline())})))}unmount(){var e,t;Rc(this,hs)._--,A(this,hs)===0&&((e=A(this,Ko))==null||e.call(this),ue(this,Ko,void 0),(t=A(this,Go))==null||t.call(this),ue(this,Go,void 0))}isFetching(e){return A(this,We).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return A(this,us).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=A(this,We).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=A(this,We).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ap(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return A(this,We).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=A(this,We).get(r.queryHash),i=s==null?void 0:s.state.data,o=UL(t,i);if(o!==void 0)return A(this,We).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return _t.batch(()=>A(this,We).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=A(this,We).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=A(this,We);_t.batch(()=>
306{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=A(this,We);return _t.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=_t.batch(()=>A(this,We).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Tn).catch(Tn)}invalidateQueries(e,t={}){return _t.batch(()=>(A(this,We).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=_t.batch(()=>A(this,We).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Tn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Tn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=A(this,We).build(this,t);return n.isStaleByTime(Ap(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Tn).catch(Tn)}fetchInfiniteQuery(e){return e.behavior=a0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Tn).catch(Tn)}ensureInfiniteQueryData(e){return e.behavior=a0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return kd.isOnline()?A(this,us).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,We)}getMutationCache(){return A(this,us)}getDefaultOptions(){return A(this,ds)}setDefaultOptions(e){ue(this,ds,e)}setQueryDefaults(e,t){A(this,zo).set($l(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...A(this,zo).values()],n={};return t.forEach(r=>{Bl(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){A(this,qo).set($l(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...A(this,qo).values()],n={};return t.forEach(r=>{Bl(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...A(this,ds).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ny(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ry&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...A(this,ds).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){A(this,We).clear(),A(this,us).clear()}},We=new WeakMap,us=new WeakMap,ds=new WeakMap,zo=new WeakMap,qo=new WeakMap,hs=new WeakMap,Ko=new WeakMap,Go=new WeakMap,K1),u3=p.createContext(void 0),d3=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(u3.Provider,{value:e,children:t}));/**
307 * @remix-run/router v1.23.0
308 *
309 * Copyright (c) Remix Software Inc.
310 *
311 * This source code is licensed under the MIT license found in the
312 * LICENSE.md file in the root directory of this source tree.
313 *
314 * @license MIT
315 */function Ul(){return Ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ul.apply(this,arguments)}var ps;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ps||(ps={}));const c0="popstate";function h3(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:l}=r.location;return Op("",{pathname:i,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Cd(s)}return m3(t,n,null,e)}function Ye(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $C(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function f3(){return Math.random().toString(36).substr(2,8)}function u0(e,t){return{usr:e.state,key:e.key,idx:t}}function Op(e,t,n,r){return n===void 0&&(n=null),Ul({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ya(t):t,{state:n,key:t&&t.key||r||f3()})}function Cd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ya(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function m3(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,l=ps.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(Ul({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){l=ps.Pop;let b=d(),x=b==null?null:b-u;u=b,c&&c({action:l,location:g.location,delta:x})}function f(b,x){l=ps.Push;let v=Op(g.location,b,x);u=d()+1;let w=u0(v,u),S=g.createHref(v);try{o.pushState(w,"",S)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(S)}i&&c&&c({action:l,location:g.location,delta:1})}function m(b,x){l=ps.Replace;let v=Op(g.location,b,x);u=d();let w=u0(v,u),S=g.createHref(v);o.replaceState(w,"",S),i&&c&&c({action:l,location:g.location,delta:0})}function y(b){let x=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof b=="string"?b:Cd(b);return v=v.replace(/ $/,"%20"),Ye(x,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,x)}let g={get action(){return l},get location(){return e(s,o)},listen(b){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(c0,h),c=b,()=>{s.removeEventListener(c0,h),c=null}},createHref(b){return t(s,b)},createURL:y,encodeLocation(b){let x=y(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:f,replace:m,go(b){return o.go(b)}};return g}var d0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(d0||(d0={}));function p3(e,t,n){return n===void 0&&(n="/"),g3(e,t,n,!1)}function g3(e,t,n,r){let s=typeof t=="string"?ya(t):t,i=sy(s.pathname||"/",n);if(i==null)return null;let o=BC(e);v3(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=E3(i);l=_3(o[c],u,r)}return l}function BC(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(Ye(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
315id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Cs([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(Ye(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),BC(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:k3(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,o);else for(let c of UC(i.path))s(i,o,c)}),t}function UC(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=UC(r.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function v3(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:C3(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const y3=/^:[\w-]+$/,x3=3,w3=2,b3=1,S3=10,j3=-2,h0=e=>e==="*";function k3(e,t){let n=e.split("/"),r=n.length;return n.some(h0)&&(r+=j3),t&&(r+=w3),n.filter(s=>!h0(s)).reduce((s,i)=>s+(y3.test(i)?x3:i===""?b3:S3),r)}function C3(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function _3(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=f0({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=f0({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 6,917 bytes, lines 315-324
315Object.assign(s,h.params),o.push({params:s,pathname:Cs([i,h.pathname]),pathnameBase:R3(Cs([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=Cs([i,h.pathnameBase]))}return o}function f0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=N3(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:m}=d;if(f==="*"){let g=l[h]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const y=l[h];return m&&!y?u[f]=void 0:u[f]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function N3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),$C(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function E3(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return $C(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function sy(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function T3(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?ya(e):e;return{pathname:n?n.startsWith("/")?n:P3(n,t):t,search:O3(r),hash:M3(s)}}function P3(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function $f(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function A3(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function iy(e,t){let n=A3(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function oy(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=ya(e):(s=Ul({},e),Ye(!s.pathname||!s.pathname.includes("?"),$f("?","pathname","search",s)),Ye(!s.pathname||!s.pathname.includes("#"),$f("#","pathname","hash",s)),Ye(!s.search||!s.search.includes("#"),$f("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,l;if(o==null)l=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}l=h>=0?t[h]:"/"}let c=T3(s,l),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Cs=e=>e.join("/").replace(/\/\/+/g,"/"),R3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),O3=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,M3=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function D3(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const VC=["post","put","patch","delete"];new Set(VC);const I3=["get",...VC];new Set(I3);/**
316 * React Router v6.30.1
317 *
318 * Copyright (c) Remix Software Inc.
319 *
320 * This source code is licensed under the MIT license found in the
321 * LICENSE.md file in the root directory of this source tree.
322 *
323 * @license MIT
324 */function Vl(){return Vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vl.apply(this,arguments)}const ay=p.createContext(null),L3=p.createContext(null),Us=p.createContext(null),kh=p.createContext(null),Vr=p.createContext({outlet:null,matches:[],isDataRoute:!1}),WC=p.createContext(null);function F3(e,t){let{relative:n}=t===void 0?{}:t;xa()||Ye(!1);let{basename:r,navigator:s}=p.useContext(Us),{hash:i,pathname:o,search:l}=zC(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:Cs([r,o])),s.createHref({pathname:c,search:l,hash:i})}function xa(){return p.useContext(kh)!=null}function qn(){return xa()||Ye(!1),p.useContext(kh).location}function HC(e){p.useContext(Us).static||p.useLayoutEffect(e)}function wa(){let{isDataRoute:e}=p.useContext(Vr);return e?X3():$3()}function $3(){xa()||Ye(!1);let e=p.useContext(ay),{basename:t,future:n,navigator:r}=p.useContext(Us),{matches:s}=p.useContext(Vr),{pathname:i}=qn(),o=JSON.stringify(iy(s,n.v7_relativeSplatPath)),l=p.useRef(!1);return HC(()=>{l.current=!0}),p.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let h=oy(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Cs([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,o,i,e])}function B3(){let{matches:e}=p.useContext(Vr),t=e[e.length-1];return t?t.params:{}}function zC(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(Us),{matches:s}=p.useContext(Vr),{pathname:i}=qn(),o=JSON.stringify(iy(s,r.v7_relativeSplatPath));return p.useMemo(()=>oy(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function U3(e,t){return V3(e,t)}function V3(e,t,n,r){xa()||Ye(!1);let{navigator:s}=p.useContext(Us),{matches:i}=p.useContext(Vr),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=qn(),d;if(t){var h;let b=typeof t=="string"?ya(t):t;c==="/"||(h=b.pathname)!=null&&h.startsWith(c)||Ye(!1),d=b}else d=u;let f=d.pathname||"/",m=f;if(c!=="/"){let b=c.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=p3(e,{pathname:m}),g=K3(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Cs([c,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:Cs([c,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&g?p.createElement(kh.Provider,{value:{location:Vl({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ps.Pop}},g):g}function W3(){let e=Q3(),t=D3(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application 
324Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:s},n):null,null)}const H3=p.createElement(W3,null);class z3 extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?p.createElement(Vr.Provider,{value:this.props.routeContext},p.createElement(WC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function q3(e){let{routeContext:t,match:n,children:r}=e,s=p.useContext(ay);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(Vr.Provider,{value:t},r)}function K3(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||Ye(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:m}=n,y=h.route.loader&&f[h.route.id]===void 0&&(!m||m[h.route.id]===void 0);if(h.route.lazy||y){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,f)=>{let m,y=!1,g=null,b=null;n&&(m=l&&h.route.id?l[h.route.id]:void 0,g=h.route.errorElement||H3,c&&(u<0&&f===0?(y=!0,b=null):u===f&&(y=!0,b=h.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,f+1)),v=()=>{let w;return m?w=g:y?w=b:h.route.Component?w=p.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,p.createElement(q3,{match:h,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?p.createElement(z3,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:v(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):v()},null)}var qC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(qC||{}),_d=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(_d||{});function G3(e){let t=p.useContext(ay);return t||Ye(!1),t}function Y3(e){let t=p.useContext(L3);return t||Ye(!1),t}function J3(e){let t=p.useContext(Vr);return t||Ye(!1),t}function KC(e){let t=J3(),n=t.matches[t.matches.length-1];return n.route.id||Ye(!1),n.route.id}function Q3(){var e;let t=p.useContext(WC),n=Y3(_d.UseRouteError),r=KC(_d.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function X3(){let{router:e}=G3(qC.UseNavigateStable),t=KC(_d.UseNavigateStable),n=p.useRef(!1);return HC(()=>{n.current=!0}),p.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Vl({fromRouteId:t},i)))},[e,t])}function Z3(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function GC(e){let{to:t,replace:n,state:r,relative:s}=e;xa()||Ye(!1);let{future:i,static:o}=p.useContext(Us),{matches:l}=p.useContext(Vr),{pathname:c}=qn(),u=wa(),d=oy(t,iy(l,i.v7_relativeSplatPath),c,s==="path"),h=JSON.stringify(d);return p.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:s}),[u,h,s,n,r]),null}function de(e){Ye(!1)}function e4(e){let{basename:t="/",children:n=null,location:r,navigationType:s=ps.Pop,navigator:i,static:o=!1,future:l}=e;xa()&&Ye(!1);let c=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:c,navigator:i,static:o,future:Vl({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof r=="string"&&(r=ya(r));let{pathname:d="/",search:h="",hash:f="",state:m=null,key:y="default"}=r,g=p.useMemo(()=>
324{let b=sy(d,c);return b==null?null:{location:{pathname:b,search:h,hash:f,state:m,key:y},navigationType:s}},[c,d,h,f,m,y,s]);return g==null?null:p.createElement(Us.Provider,{value:u},p.createElement(kh.Provider,{children:n,value:g}))}function t4(e){let{children:t,location:n}=e;return U3(Mp(t),n)}new Promise(()=>{});function Mp(e,t){t===void 0&&(t=[]);let n=[];return p.Children.forEach(e,(r,s)=>{if(!p.isValidElement(r))return;let i=[...t,s];if(r.type===p.Fragment){n.push.apply(n,Mp(r.props.children,i));return}r.type!==de&&Ye(!1),!r.props.index||!r.props.children||Ye(!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=Mp(r.props.children,i)),n.push(o)}),n}/**
325 * React Router DOM v6.30.1
326 *
327 * Copyright (c) Remix Software Inc.
328 *
329 * This source code is licensed under the MIT license found in the
330 * LICENSE.md file in the root directory of this source tree.
331 *
332 * @license MIT
333 */function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dp.apply(this,arguments)}function n4(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function r4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function s4(e,t){return e.button===0&&(!t||t==="_self")&&!r4(e)}function Ip(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function i4(e,t){let n=Ip(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const o4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],a4="6";try{window.__reactRouterVersion=a4}catch{}const l4="startTransition",m0=Vg[l4];function c4(e){let{basename:t,children:n,future:r,window:s}=e,i=p.useRef();i.current==null&&(i.current=h3({window:s,v5Compat:!0}));let o=i.current,[l,c]=p.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=p.useCallback(h=>{u&&m0?m0(()=>c(h)):c(h)},[c,u]);return p.useLayoutEffect(()=>o.listen(d),[o,d]),p.useEffect(()=>Z3(r),[r]),p.createElement(e4,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const u4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",d4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,X=p.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,f=n4(t,o4),{basename:m}=p.useContext(Us),y,g=!1;if(typeof u=="string"&&d4.test(u)&&(y=u,u4))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),j=sy(S.pathname,m);S.origin===w.origin&&j!=null?u=j+S.search+S.hash:g=!0}catch{}let b=F3(u,{relative:s}),x=h4(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:h});function v(w){r&&r(w),w.defaultPrevented||x(w)}return p.createElement("a",Dp({},f,{href:y||b,onClick:g||i?r:v,ref:n,target:c}))});var p0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(p0||(p0={}));var g0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(g0||(g0={}));function h4(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=wa(),u=qn(),d=zC(e,{relative:o});return p.useCallback(h=>{if(s4(h,n)){h.preventDefault();let f=r!==void 0?r:Cd(u)===Cd(d);c(e,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,d,r,s,n,e,i,o,l])}function YC(e){let t=p.useRef(Ip(e)),n=p.useRef(!1),r=qn(),s=p.useMemo(()=>i4(r.search,n.current?null:t.current),[r.search]),i=wa(),o=p.useCallback((l,c)=>{const u=Ip(typeof l=="function"?l(s):l);n.current=!0,i("?"+u,c)},[i,s]);return[s,o]}var f4=typeof Element<"u",m4=typeof Map=="function",p4=typeof Set=="function",g4=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Du(e,t){if(e===t)return!0;
333if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Du(e[r],t[r]))return!1;return!0}var i;if(m4&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Du(r.value[1],t.get(r.value[0])))return!1;return!0}if(p4&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(g4&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(f4&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!Du(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var v4=function(t,n){try{return Du(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const y4=oc(v4);var x4=function(e,t,n,r,s,i,o,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,s,i,o,l],d=0;c=new Error(t.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},w4=x4;const v0=oc(w4);var b4=function(t,n,r,s){var i=r?r.call(s,t,n):void 0;if(i!==void 0)return!!i;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var o=Object.keys(t),l=Object.keys(n);if(o.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(n),u=0;u<o.length;u++){var d=o[u];if(!c(d))return!1;var h=t[d],f=n[d];if(i=r?r.call(s,h,f,d):void 0,i===!1||i===void 0&&h!==f)return!1}return!0};const S4=oc(b4);var JC=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(JC||{}),Bf={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"]}},y0=Object.values(JC),Ch={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},QC=Object.entries(Ch).reduce((e,[t,n])=>(e[n]=t,e),{}),In="data-rh",Lo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Fo=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},j4=e=>{let t=Fo(e,"title");const n=Fo(e,Lo.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Fo(e,Lo.DEFAULT_TITLE);return t||r||void 0},k4=e=>Fo(e,Lo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Uf=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),C4=(e,t)=>
333t.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 l=s[i].toLowerCase();if(e.indexOf(l)!==-1&&r[l])return n.concat(r)}}return n},[]),_4=e=>console&&typeof console.warn=="function"&&console.warn(e),Fa=(e,t,n)=>{const r={};return n.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&_4(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,i)=>{const o={};i.filter(c=>{let u;const d=Object.keys(c);for(let f=0;f<d.length;f+=1){const m=d[f],y=m.toLowerCase();t.indexOf(y)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(y==="rel"&&c[y].toLowerCase()==="stylesheet")&&(u=y),t.indexOf(m)!==-1&&(m==="innerHTML"||m==="cssText"||m==="itemprop")&&(u=m)}if(!u||!c[u])return!1;const h=c[u].toLowerCase();return r[u]||(r[u]={}),o[u]||(o[u]={}),r[u][h]?!1:(o[u][h]=!0,!0)}).reverse().forEach(c=>s.push(c));const l=Object.keys(o);for(let c=0;c<l.length;c+=1){const u=l[c],d={...r[u],...o[u]};r[u]=d}return s},[]).reverse()},N4=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},E4=e=>({baseTag:C4(["href"],e),bodyAttributes:Uf("bodyAttributes",e),defer:Fo(e,Lo.DEFER),encode:Fo(e,Lo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Uf("htmlAttributes",e),linkTags:Fa("link",["rel","href"],e),metaTags:Fa("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Fa("noscript",["innerHTML"],e),onChangeClientState:k4(e),scriptTags:Fa("script",["src","innerHTML"],e),styleTags:Fa("style",["cssText"],e),title:j4(e),titleAttributes:Uf("titleAttributes",e),prioritizeSeoTags:N4(e,Lo.PRIORITIZE_SEO_TAGS)}),XC=e=>Array.isArray(e)?e.join(""):e,T4=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Vf=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(T4(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},x0=(e,t)=>({...e,[t]:void 0}),P4=["noscript","script","style"],Lp=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),ZC=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),A4=(e,t,n,r)=>{const s=ZC(n),i=XC(t);return s?`<${e} ${In}="true" ${s}>${Lp(i,r)}</${e}>`:`<${e} ${In}="true">${Lp(i,r)}</${e}>`},R4=(e,t,n=!0)=>t.reduce((r,s)=>{const i=s,o=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const h=typeof i[d]>"u"?d:`${d}="${Lp(i[d],n)}"`;return u?`${u} ${h}`:h},""),l=i.innerHTML||i.cssText||"",c=P4.indexOf(e)===-1;return`${r}<${e} ${In}="true" ${o}${c?"/>":`>${l}</${e}>`}`},""),e_=(e,t={})=>Object.keys(e).reduce((n,r)=>{const s=Ch[r];return n[s||r]=e[r],n},t),O4=(e,t,n)=>{const r={key:t,[In]:!0},s=e_(n,r);return[R.createElement("title",s,t)]},Iu=(e,t)=>t.map((n,r)=>{const s={key:r,[In]:!0};return Object.keys(n).forEach(i=>{const l=Ch[i]||i;if(l==="innerHTML"||l==="cssText"){const c=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:c}}else s[l]=n[i]}),R.createElement(e,s)}),ln=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>O4(e,t.title,t.titleAttributes),toString:()=>A4(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>e_(t),toString:()=>ZC(t)};default:return{toComponent:()=>Iu(e,t),toString:()=>R4(e,t,n)}}},M4=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const s=Vf(e,Bf.meta),i=Vf(t,Bf.link),o=Vf(n,Bf.script);return{priorityMethods:{toComponent:()=>[...Iu("meta",s.priority),...Iu("link",i.priority),...Iu("script",o.priority)],toString:()=>`${ln("meta",s.priority,r)} ${ln("link",i.priority,r)} ${ln("script",o.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:o.default}},D4=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:o,title:l="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:d,metaTags:h,scriptTags:f}=e,m={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:m,linkTags:d,metaTags:h,scriptTags:f}=M4(e)),{priority:m,base:ln("base",t,r),bodyAttributes:ln("bodyAttributes",n,r),htmlAttributes:ln("htmlAttributes",s,r),link:ln("link",d,r),meta:ln("meta",h,r),noscript:ln("noscript",i,r),script:ln("script",f,r),style:ln("style",o,r),title:ln("title",{title:l,titleAttributes:c},r)}},Fp=D4,tu=[],ly=!!(typeof window<"u"&&window.document&&window.document.createElement),$p=class{constructor(e,t){br(this,"instances",[]);br(this,"canUseDOM",ly);br(this,"context");br(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?tu:this.instances,add:e=>{(this.canUseDOM?tu:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?tu:this.instances).indexOf(e);(this.canUseDOM?tu:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=Fp({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},I4=parseInt(R.version.split(".")[0],10),Bp=I4>=19,L4={},t_=R.createContext(L4),wi,n_=(wi=class extends p.Component{constructor(n){super(n);br(this,"helmetData");Bp?this.helmetData=null:this.helmetData=new $p(this.props.context||{},wi.canUseDOM)}render(){return Bp?R.createElement(R.Fragment,null,this.props.children):R.createElement(t_.Provider,{value:this.helmetData.value},this.props.children)}},br(wi,"canUseDOM",ly),wi),Yi=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${In}]`),s=[].slice.call(r),i=[];let o;return t&&t.length&&t.forEach(l=>{const c=document.createElement(e);for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u))if(u==="innerHTML")c.innerHTML=l.innerHTML;else if(u==="cssText"){const d=l.cssText;
333c.appendChild(document.createTextNode(d))}else{const d=u,h=typeof l[d]>"u"?"":l[d];c.setAttribute(u,h)}c.setAttribute(In,"true"),s.some((u,d)=>(o=d,c.isEqualNode(u)))?s.splice(o,1):i.push(c)}),s.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}),i.forEach(l=>n.appendChild(l)),{oldTags:s,newTags:i}},Up=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(In),s=r?r.split(","):[],i=[...s],o=Object.keys(t);for(const l of o){const c=t[l]||"";n.getAttribute(l)!==c&&n.setAttribute(l,c),s.indexOf(l)===-1&&s.push(l);const u=i.indexOf(l);u!==-1&&i.splice(u,1)}for(let l=i.length-1;l>=0;l-=1)n.removeAttribute(i[l]);s.length===i.length?n.removeAttribute(In):n.getAttribute(In)!==o.join(",")&&n.setAttribute(In,o.join(","))},F4=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=XC(e)),Up("title",t)},w0=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:o,noscriptTags:l,onChangeClientState:c,scriptTags:u,styleTags:d,title:h,titleAttributes:f}=e;Up("body",r),Up("html",s),F4(h,f);const m={baseTag:Yi("base",n),linkTags:Yi("link",i),metaTags:Yi("meta",o),noscriptTags:Yi("noscript",l),scriptTags:Yi("script",u),styleTags:Yi("style",d)},y={},g={};Object.keys(m).forEach(b=>{const{newTags:x,oldTags:v}=m[b];x.length&&(y[b]=x),v.length&&(g[b]=m[b].oldTags)}),t&&t(),c(e,y,g)},$a=null,$4=e=>{$a&&cancelAnimationFrame($a),e.defer?$a=requestAnimationFrame(()=>{w0(e,()=>{$a=null})}):(w0(e),$a=null)},B4=$4,b0=class extends p.Component{constructor(){super(...arguments);br(this,"rendered",!1)}shouldComponentUpdate(t){return!S4(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const s=E4(t.get().map(i=>{const{context:o,...l}=i.props;return l}));n_.canUseDOM?B4(s):Fp&&(r=Fp(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Lu=[],S0=e=>{const t={};for(const n of Object.keys(e))t[QC[n]||n]=e[n];return t},Js=e=>{const t={};for(const n of Object.keys(e)){const r=Ch[n];t[r||n]=e[n]}return t},j0=(e,t)=>{if(!ly)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const r="data-rh-managed",s=n.getAttribute(r),i=s?s.split(","):[],o=Object.keys(t);for(const l of i)o.includes(l)||n.removeAttribute(l);for(const l of o){const c=t[l];c==null||c===!1?n.removeAttribute(l):c===!0?n.setAttribute(l,""):n.setAttribute(l,String(c))}o.length>0?n.setAttribute(r,o.join(",")):n.removeAttribute(r)},Wf=()=>{const e={},t={};for(const n of Lu){const{htmlAttributes:r,bodyAttributes:s}=n.props;r&&Object.assign(e,S0(r)),s&&Object.assign(t,S0(s))}j0("html",e),j0("body",t)},U4=class extends p.Component{componentDidMount(){Lu.push(this),Wf()}componentDidUpdate(){Wf()}componentWillUnmount(){const e=Lu.indexOf(this);e!==-1&&Lu.splice(e,1),Wf()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return R.createElement("title",Js(t),e)}renderBase(){const{base:e}=this.props;return e?R.createElement("base",Js(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>R.createElement("meta",{key:n,...Js(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>R.createElement("link",{key:n,...Js(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=Js(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),R.createElement("script",{key:n,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{cssText:r,...s}=t,i=Js(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),R.createElement("style",{key:n,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...s}=t,i=Js(s);return r&&(i.dangerouslySetInnerHTML={__html:r}),R.createElement("noscript",{key:n,...i})})}render(){return R.createElement(R.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Em,V4=(Em=class extends p.Component{shouldComponentUpdate(e){return!y4(x0(this.props,"helmetData"),x0(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}
333warnOnInvalidChildren(e,t){return v0(y0.some(n=>e.type===n),typeof e.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 ${y0.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),v0(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return R.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,o=Object.keys(i).reduce((c,u)=>(c[QC[u]||u]=i[u],c),{});let{type:l}=r;switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(r,s),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,s);break;default:t=this.mapObjectTypeChildren(r,t,o,s);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof $p)){const s=r;r=new $p(s.context,!0),delete n.helmetData}return Bp?R.createElement(U4,{...n}):r?R.createElement(b0,{...n,context:r.value}):R.createElement(t_.Consumer,null,s=>R.createElement(b0,{...n,context:s}))}},br(Em,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Em);function W4(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})}const H4=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);
333class cy extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class z4 extends cy{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class k0 extends cy{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class C0 extends cy{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Vp;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Vp||(Vp={}));class q4{constructor(t,{headers:n={},customFetch:r,region:s=Vp.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=H4(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return W4(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:l,method:c,body:u,signal:d,timeout:h}=r;let f={},{region:m}=r;m||(m=this.region);const y=new URL(`${this.url}/${n}`);m&&m!=="any"&&(f["x-region"]=m,y.searchParams.set("forceFunctionRegion",m));let g;u&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",g=u):typeof u=="string"?(f["Content-Type"]="text/plain",g=u):typeof FormData<"u"&&u instanceof FormData?g=u:(f["Content-Type"]="application/json",g=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?g=JSON.stringify(u):g=u;let b=d;h&&(o=new AbortController,i=setTimeout(()=>o.abort(),h),d?(b=o.signal,d.addEventListener("abort",()=>o.abort())):b=o.signal);const x=yield this.fetch(y.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),l),body:g,signal:b}).catch(j=>{throw new z4(j)}),v=x.headers.get("x-relay-error");if(v&&v==="true")throw new k0(x);if(!x.ok)throw new C0(x);let w=((s=x.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return w==="application/json"?S=yield x.json():w==="application/octet-stream"||w==="application/pdf"?S=yield x.blob():w==="text/event-stream"?S=x:w==="multipart/form-data"?S=yield x.formData():S=yield x.text(),{data:S,error:null,response:x}}catch(l){return{data:null,error:l,response:l instanceof C0||l instanceof k0?l.context:void 0}}finally{i&&clearTimeout(i)}})}}const r_=3,_0=e=>Math.min(1e3*2**e,3e4),K4=[520,503],s_=["GET","HEAD","OPTIONS"];var G4=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
333de=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function N0(e,t){return new Promise(n=>{if(t!=null&&t.aborted){n();return}const r=setTimeout(()=>{t==null||t.removeEventListener("abort",s),n()},e);function s(){clearTimeout(r),n()}t==null||t.addEventListener("abort",s)})}function Y4(e,t,n,r){return!(!r||n>=r_||!s_.includes(e)||!K4.includes(t))}var J4=class{constructor(e){var t,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=e.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=e.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=e.retry)!==null&&i!==void 0?i:!0,e.fetch?this.fetch=e.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(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){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 u=new Headers(n.headers);o>0&&u.set("X-Retry-Count",String(o));let d;try{d=await r(n.url.toString(),{method:n.method,headers:u,body:JSON.stringify(n.body,(h,f)=>typeof f=="bigint"?f.toString():f),signal:n.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!s_.includes(n.method))throw h;if(n.retryEnabled&&o<r_){const f=_0(o);o++,await N0(f,n.signal);continue}throw h}if(Y4(n.method,d.status,o,n.retryEnabled)){var l,c;const h=(l=(c=d.headers)===null||c===void 0?void 0:c.get("Retry-After"))!==null&&l!==void 0?l:null,f=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:_0(o);await d.text(),o++,await N0(f,n.signal);continue}return await n.processResponse(d)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var l;let c="",u="",d="";const h=o==null?void 0:o.cause;if(h){var f,m,y,g;const v=(f=h==null?void 0:h.message)!==null&&f!==void 0?f:"",w=(m=h==null?void 0:h.code)!==null&&m!==void 0?m:"";c=`${(y=o==null?void 0:o.name)!==null&&y!==void 0?y:"FetchError"}: ${o==null?void 0:o.message}`,c+=`
334
335Caused by: ${(g=h==null?void 0:h.name)!==null&&g!==void 0?g:"Error"}: ${v}`,w&&(c+=` (${w})`),h!=null&&h.stack&&(c+=`
336${h.stack}`)}else{var b;c=(b=o==null?void 0:o.stack)!==null&&b!==void 0?b:""}const x=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(d="",u="Request was aborted (timeout or manual cancellation)",x>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${x} 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.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(d="",u="HTTP headers exceeded server limits (typically 16KB)",x>this.urlLengthLimit&&(u+=`. Your request URL is ${x} 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:`${(l=o==null?void 0:o.name)!==null&&l!==void 0?l:"FetchError"}: ${o==null?void 0:o.message}`,details:c,hint:u,code:d},data:null,count:null,status:0,statusText:""}}
336)),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,s=null,i=e.status,o=e.statusText;if(e.ok){var l,c;if(t.method!=="HEAD"){var u;const f=await e.text();f===""||(t.headers.get("Accept")==="text/csv"||t.headers.get("Accept")&&(!((u=t.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?r=f:r=JSON.parse(f))}const d=(l=t.headers.get("Prefer"))===null||l===void 0?void 0:l.match(/count=(exact|planned|estimated)/),h=(c=e.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");d&&h&&h.length>1&&(s=parseInt(h[1])),t.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 d=await e.text();try{n=JSON.parse(d),Array.isArray(n)&&e.status===404&&(r=[],n=null,i=200,o="OK")}catch{e.status===404&&d===""?(i=204,o="No Content"):n={message:d}}if(n&&t.shouldThrowOnError)throw new G4(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},Q4=class extends J4{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const l=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${c}"; options=${l};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const E0=new RegExp("[,()]");var ao=class extends Q4{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&E0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&E0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
336n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},X4=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=e,this.headers=new Headers(t),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(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",o),r&&c.append("Prefer",`count=${r}`),new ao({method:s,url:l,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);i.searchParams.set("columns",c.join(","))}}return new ao({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&l.searchParams.set("on_conflict",t),r&&c.append("Prefer",`count=${r}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);l.searchParams.set("columns",d.join(","))}}return new ao({method:o,url:l,headers:c,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new ao({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new ao({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Wl(e){"@babel/helpers - typeof";return Wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wl(e)}function Z4(e,t){if(Wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eF(e){var t=Z4(e,"string");return Wl(t)=="symbol"?t:t+""}function tF(e,t,n){return(t=eF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function nu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T0(Object(n),!0).forEach(function(r){tF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var nF=class i_{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:l}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const c=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,d)=>{const h=new AbortController,f=setTimeout(()=>h.abort(),i),m=d==null?void 0:d.signal;if(m){if(m.aborted)return clearTimeout(f),c(u,d);const y=()=>{clearTimeout(f),h.abort()};return m.addEventListener("abort",y,{once:!0}),c(u,nu(nu({},d),{},{signal:h.signal})).finally(()=>{clearTimeout(f),m.removeEventListener("abort",y)})}return c(u,nu(nu({},d),{},{signal:h.signal})).finally(()=>clearTimeout(f))}:this.fetch=c,this.retry=l}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new X4(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new i_(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let l;const c=new URL(`${this.url}/rpc/${t}`);let u;const d=m=>m!==null&&typeof m=="object"&&(!Array.isArray(m)||m.some(d)),h=r&&Object.values(n).some(d);h?(l="POST",u=n):r||s?(l=r?"HEAD":"GET",Object.entries(n).filter(([m,y])=>y!==void 0).map(([m,y])=>[m,Array.isArray(y)?`{${y.join(",")}}`:`${y}
336`]).forEach(([m,y])=>{c.searchParams.append(m,y)})):(l="POST",u=n);const f=new Headers(this.headers);return h?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new ao({method:l,url:c,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class rF{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
337import ws from "ws"
338new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
339
340Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const sF="2.103.3",iF=`realtime-js/${sF}`,oF="1.0.0",o_="2.0.0",aF=o_,lF=1e4,cF=100,os={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},a_={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},Wp={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class uF{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=t.topic,l=(s=t.ref)!==null&&s!==void 0?s:"",c=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+o.length+u.length+h.length,m=new ArrayBuffer(this.HEADER_LENGTH+f);let y=new DataView(m),g=0;y.setUint8(g++,this.KINDS.userBroadcastPush),y.setUint8(g++,c.length),y.setUint8(g++,l.length),y.setUint8(g++,o.length),y.setUint8(g++,u.length),y.setUint8(g++,h.length),y.setUint8(g++,n),Array.from(c,x=>y.setUint8(g++,x.charCodeAt(0))),Array.from(l,x=>y.setUint8(g++,x.charCodeAt(0))),Array.from(o,x=>y.setUint8(g++,x.charCodeAt(0))),Array.from(u,x=>y.setUint8(g++,x.charCodeAt(0))),Array.from(h,x=>y.setUint8(g++,x.charCodeAt(0)));var b=new Uint8Array(m.byteLength+r.byteLength);return b.set(new Uint8Array(m),0),b.set(new Uint8Array(r),m.byteLength),b.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,l,c]=r;
340return n({join_ref:s,ref:i,topic:o,event:l,payload:c})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),l=n.getUint8(4);let c=this.HEADER_LENGTH+4;const u=r.decode(t.slice(c,c+s));c=c+s;const d=r.decode(t.slice(c,c+i));c=c+i;const h=r.decode(t.slice(c,c+o));c=c+o;const f=t.slice(c,t.byteLength),m=l===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,y={type:this.BROADCAST_EVENT,event:d,payload:m};return o>0&&(y.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var Pe;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Pe||(Pe={}));const P0=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=dF(o,e,t,s),i),{}):{}},dF=(e,t,n,r)=>{const s=t.find(l=>
vendor: 5,056 bytes, line 340
340l.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?l_(i,o):Hp(o)},l_=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return pF(t,n)}switch(e){case Pe.bool:return hF(t);case Pe.float4:case Pe.float8:case Pe.int2:case Pe.int4:case Pe.int8:case Pe.numeric:case Pe.oid:return fF(t);case Pe.json:case Pe.jsonb:return mF(t);case Pe.timestamp:return gF(t);case Pe.abstime:case Pe.date:case Pe.daterange:case Pe.int4range:case Pe.int8range:case Pe.money:case Pe.reltime:case Pe.text:case Pe.time:case Pe.timestamptz:case Pe.timetz:case Pe.tsrange:case Pe.tstzrange:return Hp(t);default:return Hp(t)}},Hp=e=>e,hF=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},fF=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},mF=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},pF=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(l=>l_(t,l))}return e},gF=e=>typeof e=="string"?e.replace(" ","T"):e,c_=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var fl=e=>typeof e=="function"?e:function(){return e},vF=typeof self<"u"?self:null,lo=typeof window<"u"?window:null,Zn=vF||lo||globalThis,yF="2.0.0",xF=1e4,wF=1e3,rr={connecting:0,open:1,closing:2,closed:3},Mt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},_r={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},zp={longpoll:"longpoll",websocket:"websocket"},bF={complete:4},qp="base64url.bearer.phx.",ru=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},u_=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},SF=class{constructor(e,t,n){this.state=Mt.closed,this.topic=e,this.params=fl(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new ru(this,_r.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new u_(()=>{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=Mt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=Mt.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=Mt.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=Mt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}
340`,this.joinPush.timeout),new ru(this,_r.leave,fl({}),this.timeout).send(),this.state=Mt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(_r.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Mt.closed,this.bindings=[]}onClose(e){this.on(_r.close,e)}onError(e){return this.on(_r.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new ru(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Mt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(_r.close,"leave")},n=new ru(this,_r.leave,fl({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Mt.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Mt.closed}isErrored(){return this.state===Mt.errored}isJoined(){return this.state===Mt.joined}isJoining(){return this.state===Mt.joining}isLeaving(){return this.state===Mt.leaving}},Nd=class{static request(e,t,n,r,s,i,o){if(Zn.XDomainRequest){let l=new Zn.XDomainRequest;return this.xdomainRequest(l,e,t,r,s,i,o)}else if(Zn.XMLHttpRequest){let l=new Zn.XMLHttpRequest;return this.xhrRequest(l,e,t,n,r,s,i,o)}else{if(Zn.fetch&&Zn.AbortController)return this.fetchRequest(e,t,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,i,o){let l={method:e,headers:n,body:r},c=null;return s&&(c=new AbortController,setTimeout(()=>c.abort(),s),l.signal=c.signal),Zn.fetch(t,l).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),c}static xdomainRequest(e,t,n,r,s,i,o){return e.timeout=s,e.open(t,n),e.onload=()=>{let l=this.parseJSON(e.responseText);o&&o(l)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,i,o,l){e.open(t,n,!0),e.timeout=i;for(let[c,u]of Object.entries(r))e.setRequestHeader(c,u);return e.onerror=()=>l&&l(null),e.onreadystatechange=()=>{if(e.readyState===bF.complete&&l){let c=this.parseJSON(e.responseText);l(c)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let s=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}}
vendor: 1,548 bytes, line 340
340,jF=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},Ji=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(qp)&&(this.authToken=atob(t[1].slice(qp.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=rr.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+zp.websocket),"$1/"+zp.longpoll)}endpointURL(){return Nd.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=rr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===rr.open||this.readyState===rr.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:s}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=rr.open,this.onopen({}),this.poll();break;
340case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=jF(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
341`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let s of this.reqs)s.abort();this.readyState=rr.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=Nd.request(e,this.endpointURL(),t,n,this.timeout,o,l=>{this.reqs.delete(i),this.isActive()&&s(l)}),this.reqs.add(i)}},kF=class Xa{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Xa.syncState(this.state,s,i,o),this.pendingDiffs.forEach(c=>{this.state=Xa.syncDiff(this.state,c,i,o)}),this.pendingDiffs=[],l()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Xa.syncDiff(this.state,s,i,o),l())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Xa.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let i=this.clone(t),o={},l={};return this.map(i,(c,u)=>{n[c]||(l[c]=u)}),this.map(n,(c,u)=>{let d=i[c];if(d){let h=u.metas.map(g=>g.phx_ref),f=d.metas.map(g=>g.phx_ref),m=u.metas.filter(g=>f.indexOf(g.phx_ref)<0),y=d.metas.filter(g=>h.indexOf(g.phx_ref)<0);m.length>0&&(o[c]=u,o[c].metas=m),y.length>0&&(l[c]=this.clone(d),l[c].metas=y)}else o[c]=u}),this.syncDiff(i,{joins:o,leaves:l},r,s)}static syncDiff(t,n,r,s){let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(l,c)=>{let u=t[l];if(t[l]=this.clone(c),u){let d=t[l].metas.map(f=>f.phx_ref),h=u.metas.filter(f=>d.indexOf(f.phx_ref)<0);t[l].metas.unshift(...h)}r(l,u,c)}),this.map(o,(l,c)=>{let u=t[l];if(!u)return;let d=c.metas.map(h=>h.phx_ref);u.metas=u.metas.filter(h=>d.indexOf(h.phx_ref)<0),s(l,u,c),u.metas.length===0&&delete t[l]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},su={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,s,i,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+n.length+s.length+r.length,l=new ArrayBuffer(this.HEADER_LENGTH+o),c=new DataView(l),u=0;c.setUint8(u++,this.KINDS.push),c.setUint8(u++,t.length),c.setUint8(u++,n.length),c.setUint8(u++,s.length),c.setUint8(u++,r.length),Array.from(t,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(n,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(s,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(r,h=>c.setUint8(u++,h.charCodeAt(0)));var d=new Uint8Array(l.byteLength+i.byteLength);return d.set(new Uint8Array(l),0),d.set(new Uint8Array(i),l.byteLength),d.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
vendor: 8,419 bytes, line 341
341,decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,l=n.decode(e.slice(o,o+r));o=o+r;let c=n.decode(e.slice(o,o+s));o=o+s;let u=n.decode(e.slice(o,o+i));o=o+i;let d=e.slice(o,e.byteLength);return{join_ref:l,ref:null,topic:c,event:u,payload:d}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),l=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(l,l+r));l=l+r;let u=n.decode(e.slice(l,l+s));l=l+s;let d=n.decode(e.slice(l,l+i));l=l+i;let h=n.decode(e.slice(l,l+o));l=l+o;let f=e.slice(l,e.byteLength),m={status:h,response:f};return{join_ref:c,ref:u,topic:d,event:_r.reply,payload:m}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(e.slice(i,i+r));i=i+r;let l=n.decode(e.slice(i,i+s));i=i+s;let c=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:l,payload:c}}},CF=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||xF,this.transport=t.transport||Zn.WebSocket||Ji,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||Zn&&Zn.sessionStorage,this.establishedConnections=0,this.defaultEncoder=su.encode.bind(su),this.defaultDecoder=su.decode.bind(su),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Ji?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;lo&&lo.addEventListener&&(lo.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),lo.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),lo.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=r=>t.rejoinAfterMs?t.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>t.reconnectAfterMs?t.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(r,s,i)=>{console.log(`${r}: ${s}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=fl(t.params||{}),this.endPoint=`${e}/${zp.websocket}`,this.vsn=t.vsn||yF,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new u_(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Ji}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=Nd.appendParams(Nd.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=fl(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ji?this.connectWithFallback(Ji,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Ji:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${qp}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(e),l=c=>{this.log("transport",`falling back to ${o}...`,c),this.off([s,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return l("memorized");this.fallbackTimer=setTimeout(l,t),i=this.onError(c=>{this.log("transport","error",c),r&&!n&&(clearTimeout(this.fallbackTimer),l(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let c=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${c}`,"true"),this.log("transport",`established ${c} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(l,t),this.ping(c=>{this.log("transport","connected to primary after",c),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),wF,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===rr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError()}
341triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(_r.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case rr.connecting:return"connecting";case rr.open:return"open";case rr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new SF(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const l=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",l)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let l=0;l<this.channels.length;l++){const c=this.channels[l];c.isMember(n,r,s,o)&&c.trigger(r,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class ml{constructor(t,n){const r=NF(n);this.presence=new kF(t.getChannel(),r),this.presence.onJoin((s,i,o)=>{const l=ml.onJoinPayload(s,i,o);t.getChannel().trigger("presence",l)}),this.presence.onLeave((s,i,o)=>{const l=ml.onLeavePayload(s,i,o);t.getChannel().trigger("presence",l)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return ml.transformState(this.presence.state)}static transformState(t){return t=_F(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=Fu(s),n},{})}static onJoinPayload(t,n,r){const s=A0(n),i=Fu(r);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,n,r){const s=A0(n),i=Fu(r);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function Fu(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function _F(e){return JSON.parse(JSON.stringify(e))}function NF(e){return(e==null?void 0:e.events)&&{events:e.events}}function A0(e){return e!=null&&e.metas?Fu(e):[]}var R0;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(R0||(R0={}));class EF{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new ml(this.channel.channelAdapter,n)}}class TF{constructor(t,n,r){const s=PF(r);this.channel=t.getSocket().channel(n,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let s;try{s=this.channel.push(t,n,r)}catch{throw new Error(`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>cF){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===os.joined}isJoined(){return this.state===os.joined}isJoining(){return this.state===os.joining}isClosed(){return this.state===os.closed}isLeaving(){return this.state===os.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function PF(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var O0;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(O0||(O0={}));var Co;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Co||(Co={}));var Nr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Nr||(Nr={}));class pl{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new TF(this.socket.socketAdapter,t,this.params),this.presence=new EF(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=c_(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(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:l,private:c}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(m=>m.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[Co.PRESENCE]&&this.bindings[Co.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},f={broadcast:o,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(m=>{t==null||t(Nr.CHANNEL_ERROR,m)}),this._onClose(()=>t==null?void 0:t(Nr.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:m})=>
341{if(this.socket._isManualToken()||this.socket.setAuth(),m===void 0){t==null||t(Nr.SUBSCRIBED);return}this._updatePostgresBindings(m,t)}).receive("error",m=>{this.state=os.errored,t==null||t(Nr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(m).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Nr.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let l=0;l<i;l++){const c=s[l],{filter:{event:u,schema:d,table:h,filter:f}}=c,m=t&&t[l];if(m&&m.event===u&&pl.isFilterValueEqual(m.schema,d)&&pl.isFilterValueEqual(m.table,h)&&pl.isFilterValueEqual(m.filter,f))o.push(Object.assign(Object.assign({},c),{id:m.id}));else{this.unsubscribe(),this.state=os.errored,n==null||n(Nr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=os.errored&&n&&n(Nr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===Co.PRESENCE||t===Co.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject(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:t,payload:n,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
341in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,l,c;const u=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(t,n,r){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,r),o={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,i,o,l,c,u,d;const h=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,r))return!1;const f=(s=this.bindings[h])===null||s===void 0?void 0:s.find(m=>m.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in f){const m=f.id,y=(i=f.filter)===null||i===void 0?void 0:i.event;return m&&((o=n.ids)===null||o===void 0?void 0:o.includes(m))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((l=n.data)===null||l===void 0?void 0:l.type.toLocaleLowerCase()))}else{const m=(u=(c=f==null?void 0:f.filter)===null||c===void 0?void 0:c.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return m==="*"||m===((d=n==null?void 0:n.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:i,join:o}=a_;return n&&[r,s,i,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:l,type:c,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:l,eventType:c,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=P0(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=P0(t.columns,t.old_record)),n}}class AF{constructor(t,n){this.socket=new CF(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Wp.connecting}isDisconnecting(){return this.socket.connectionState()==Wp.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const RF={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},OF=[1e3,2e3,5e3,1e4],MF=1e4,DF=`
342  addEventListener("message", (e) => {
343    if (e.data.event === "start") {
344      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
345    }
346  });`;class IF{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
346,this.ref=0,this.serializer=new uF,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new AF(t,s),this.httpEndpoint=c_(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n}
347
348To use Realtime in Node.js, you need to provide a WebSocket implementation:
349
350Option 1: Use Node.js 22+ which has native WebSocket support
351Option 2: Install and provide the "ws" package:
352
353  npm install ws
354
355  import ws from "ws"
356  const client = new RealtimeClient(url, {
357    ...options,
358    transport: ws
359  })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(t);return this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||Wp.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new pl(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:iF};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(a_.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([DF],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,i,o,l,c,u,d;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const h={};
359h.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:lF,h.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:RF.HEARTBEAT_INTERVAL,h.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:rF.getWebSocketConstructor(),h.params=t==null?void 0:t.params,h.logger=t==null?void 0:t.logger,h.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),h.reconnectAfterMs=(l=t==null?void 0:t.reconnectAfterMs)!==null&&l!==void 0?l:g=>OF[g-1]||MF;let f,m;const y=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:aF;switch(y){case oF:f=(g,b)=>b(JSON.stringify(g)),m=(g,b)=>b(JSON.parse(g));break;case o_:f=this.serializer.encode.bind(this.serializer),m=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${h.vsn}`)}if(h.vsn=y,h.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:f,h.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:m,h.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,h.params=Object.assign(Object.assign({},h.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,h.autoSendHeartbeat=!this.worker}return h}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var Hl=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function LF(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function FF(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function $F(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const l=LF(e.baseUrl,r,s),c=await FF(e.auth),u=await t(l,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...c,...o},body:i?JSON.stringify(i):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),f=h&&d?JSON.parse(d):d;if(!u.ok){const m=h?f:void 0,y=m==null?void 0:m.error;throw new Hl((y==null?void 0:y.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:m})}return{status:u.status,headers:u.headers,data:f}}}}function iu(e){return e.join("�")}var BF=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:iu(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${iu(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${iu(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${iu(e.namespace)}`}),!0}catch(t){if(t instanceof Hl&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof Hl&&n.status===409)return;throw n}}};function Qi(e){return e.join("�")}var UF=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Qi(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof Hl&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Hl&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},VF=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=$F({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new BF(this.client,t),this.tableOps=new UF(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
359async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function zl(e){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function WF(e,t){if(zl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HF(e){var t=WF(e,"string");return zl(t)=="symbol"?t:t+""}function zF(e,t,n){return(t=HF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M0(Object(n),!0).forEach(function(r){zF(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var _h=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Nh(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Kp=class extends _h{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return te({},super.toJSON())}},d_=class extends _h{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const qF=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),KF=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Gp=e=>{if(Array.isArray(e))return e.map(n=>Gp(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=Gp(r)}),t},GF=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),D0=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},YF=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let i=parseInt(s.status,10);Number.isFinite(i)||(i=500),s.json().then(o=>{const l=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new Kp(D0(o),i,l,r))}).catch(()=>{const o=i+"";t(new Kp(s.statusText||`HTTP ${i} error`,i,o,r))})}else t(new d_(D0(e),e,r))},JF=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};if(e==="GET"||e==="HEAD"||!r)return te(te({},s),n);if(KF(r)){var i;const o=(t==null?void 0:t.headers)||{};let l;for(const[c,u]of Object.entries(o))c.toLowerCase()==="content-type"&&(l=u);s.headers=QF(o,"Content-Type",(i=l)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return t!=null&&t.duplex&&(s.duplex=t.duplex),te(te({},s),n)};function QF(e,t,n){const r=te({},e);for(const s of Object.keys(r))s.toLowerCase()===t.toLowerCase()&&delete r[s];return r[t]=n,r}async function Ba(e,t,n,r,s,i,o){return new Promise((l,c)=>{e(n,JF(t,r,s,i)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(o==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>l(u)).catch(u=>YF(u,c,r,o))})}function h_(e="storage"){return{get:async(t,n,r,s)=>Ba(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>Ba(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>Ba(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>Ba(t,"HEAD",n,te(te({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>Ba(t,"DELETE",n,s,i,r,e)}}const XF=h_("storage"),{get:ql,post:Pn,put:Yp,head:ZF,remove:uy}=XF,Jt=h_("vectors");var ba=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=Object.fromEntries(Object.entries(t).map(([s,i])=>[s.toLowerCase(),i])),this.fetch=qF(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=te(te({},this.headers),{},{[e.toLowerCase()]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Nh(n))return{data:null,error:n};throw n}}},e$=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Nh(t))return{data:null,error:t};throw t}}};let f_;f_=Symbol.toStringTag;var t$=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[f_]="BlobDownloadBuilder",this.promise=null}asStream(){return new e$(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Nh(t))return{data:null,error:t};throw t}}};const n$={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},I0={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var r$=class extends ba{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=te(te({},I0),r);let l=te(te({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),c&&i.append("metadata",s.encodeMetadata(c)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),c&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(c))):(i=n,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers&&(l=te(te({},l),r.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?Yp:Pn)(s.fetch,`${s.url}/object/${d}`,i,te({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:h.Id,fullPath:h.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),l=new URL(s.url+`/object/upload/sign/${o}`);return l.searchParams.set("token",t),s.handleOperation(async()=>{let c;const u=te(te({},I0),r),d=te(te({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",u.cacheControl)):(c=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:i,fullPath:(await Yp(s.fetch,l.toString(),c,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=te({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await Pn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),l=o.searchParams.get("token");if(!l)throw new _h("No token returned by API");return{signedUrl:o.toString(),path:e,token:l}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await Pn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
359stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Pn(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await Pn(r.fetch,`${r.url}/object/sign/${s}`,te({expiresIn:t},i?{transform:n.transform}:{}),{headers:r.headers});const l=new URLSearchParams;n!=null&&n.download&&l.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&l.set("cacheNonce",String(n.cacheNonce));const c=l.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${c?`&${c}`:""}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await Pn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{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(l=>te(te({},l),{},{signedUrl:l.signedURL?encodeURI(`${r.url}${l.signedURL}${o?`&${o}`:""}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;t!=null&&t.transform&&this.applyTransformOptsToQuery(s,t.transform),(t==null?void 0:t.cacheNonce)!=null&&s.set("cacheNonce",String(t.cacheNonce));const i=s.toString(),o=this._getFinalPath(e),l=()=>ql(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new t$(l,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Gp(await ql(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await ZF(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(Nh(s)){var r;const i=s instanceof Kp?s.status:s instanceof d_?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=new URLSearchParams;t!=null&&t.download&&r.set("download",t.download===!0?"":t.download),t!=null&&t.transform&&this.applyTransformOptsToQuery(r,t.transform),(t==null?void 0:t.cacheNonce)!=null&&r.set("cacheNonce",String(t.cacheNonce));const s=r.toString(),i=typeof(t==null?void 0:t.transform)=="object"&&t.transform!==null&&Object.keys(t.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(e){var t=this;return t.handleOperation(async()=>await uy(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=te(te(te({},n$),t),{},{prefix:e||""});return await Pn(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=te({},e);return await Pn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(e,t){return t.width&&e.set("width",t.width.toString()),t.height&&e.set("height",t.height.toString()),t.resize&&e.set("resize",t.resize),t.format&&e.set("format",t.format),t.quality&&e.set("quality",t.quality.toString()),e}};const s$="2.103.3",gc={"X-Client-Info":`storage-js/${s$}`};var i$=class extends ba{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=te(te({},gc),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await ql(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ql(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Pn(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Yp(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Pn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await uy(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},o$=class extends ba{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=te(te({},gc),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Pn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await ql(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await uy(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!GF(e))throw new _h("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 VF({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
359),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...l)=>{try{return{data:await o.apply(s,l),error:null}}catch(c){if(r)throw c;return{data:null,error:c}}}}})}},a$=class extends ba{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=te(te({},gc),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Jt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Jt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},l$=class extends ba{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=te(te({},gc),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},c$=class extends ba{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=te(te({},gc),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Jt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},u$=class extends c${constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new d$(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},d$=class extends a${constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new h$(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
359,h$=class extends l${constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,te(te({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},f$=class extends i${constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new r$(this.url,this.headers,e,this.fetch)}get vectors(){return new u$(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new o$(this.url+"/iceberg",this.headers,this.fetch)}};function Eh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}const m_="2.103.3",co=30*1e3,Jp=3,Hf=Jp*co,m$="http://localhost:9999",p$="supabase.auth.token",g$={"X-Client-Info":`gotrue-js/${m_}`},Qp="X-Supabase-Api-Version",p_={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},v$=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,y$=10*60*1e3;class Kl extends Error{constructor(t,n,r){super(t),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 K(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class x$ extends Kl{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function w$(e){return K(e)&&e.name==="AuthApiError"}class ai extends Kl{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Wr extends Kl{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Kt extends Wr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ou(e){return K(e)&&e.name==="AuthSessionMissingError"}class Xi extends Wr{constructor(){super("Auth session or user missing","AuthInvalidToken
359ResponseError",500,void 0)}}class au extends Wr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class lu extends Wr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function b$(e){return K(e)&&e.name==="AuthImplicitGrantRedirectError"}class L0 extends Wr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class S$ extends Wr{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 Xp extends Wr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function zf(e){return K(e)&&e.name==="AuthRetryableFetchError"}class F0 extends Wr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Zp extends Wr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Ed="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),$0=` 	
360\r=`.split(""),j$=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<$0.length;t+=1)e[$0[t].charCodeAt(0)]=-2;for(let t=0;t<Ed.length;t+=1)e[Ed[t].charCodeAt(0)]=t;return e})();function B0(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Ed[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Ed[r]),t.queuedBits-=6}}function g_(e,t,n){const r=j$[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function U0(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{_$(o,r,n)};for(let o=0;o<e.length;o+=1)g_(e.charCodeAt(o),s,i);return t.join("")}function k$(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function C$(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}k$(r,t)}}function _$(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function $o(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)g_(e.charCodeAt(s),n,r);return new Uint8Array(t)}function N$(e){const t=[];return C$(e,n=>t.push(n)),new Uint8Array(t)}function di(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>B0(s,n,r)),B0(null,n,r),t.join("")}function E$(e){return Math.round(Date.now()/1e3)+e}function T$(){return Symbol("auth-callback")}const at=()=>typeof window<"u"&&typeof document<"u",Qs={tested:!1,writable:!1},v_=()=>{if(!at())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Qs.tested)return Qs.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Qs.tested=!0,Qs.writable=!0}catch{Qs.tested=!0,Qs.writable=!1}return Qs.writable};function P$(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const y_=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),A$=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",uo=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Xs=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},ot=async(e,t)=>{await e.removeItem(t)};class Th{constructor(){this.promise=new Th.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Th.promiseConstructor=Promise;function cu(e){const t=e.split(".");if(t.length!==3)throw new Zp("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!v$.test(t[r]))throw new Zp("JWT not in base64url format");return{header:JSON.parse(U0(t[0])),payload:JSON.parse(U0(t[1])),signature:$o(t[2]),raw:{header:t[0],payload:t[1]}}}async function R$(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function O$(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function M$(e){return("0"+e.toString(16)).substr(-2)}function D$(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,M$).join("")}async function I$(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",
360n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function L$(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await I$(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Zi(e,t,n=!1){const r=D$();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await uo(e,`${t}-code-verifier`,s);const i=await L$(r);return[i,r===i?"plain":"s256"]}const F$=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function $$(e){const t=e.headers.get(Qp);if(!t||!t.match(F$))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function B$(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function U$(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const V$=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function eo(e){if(!V$.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function qf(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function W$(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function V0(e){return JSON.parse(JSON.stringify(e))}const si=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),H$=[502,503,504,520,521,522,523,524,530];async function W0(e){var t;if(!A$(e))throw new Xp(si(e),0);if(H$.includes(e.status))throw new Xp(si(e),e.status);let n;try{n=await e.json()}catch(i){throw new ai(si(i),i)}let r;const s=$$(e);if(s&&s.getTime()>=p_["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 F0(si(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Kt}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 F0(si(n),e.status,n.weak_password.reasons);throw new x$(si(n),e.status||500,r)}const z$=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function Z(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Qp]||(i[Qp]=p_["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await q$(e,t,n+l,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function q$(e,t,n,r,s,i){const o=z$(t,r,s,i);let l;try{l=await e(n,Object.assign({},o))}catch(c){throw console.error(c),new Xp(si(c),0)}if(l.ok||await W0(l),r!=null&&r.noResolveJson)return l;try{return await l.json()}catch(c){await W0(c)}}function Cn(e){var t;let n=null;Y$(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=E$(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function H0(e){const t=Cn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function as(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function K$(e){return{data:e,error:null}}function G$(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=Eh(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function z0(e){return e}function Y$(e){return e.access_token&&e.refresh_token&&e.expires_in}const Kf=["global","local","others"];class J${constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=y_(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(t,n=Kf[0]){if(Kf.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Kf.join(", ")}`);try{return await Z(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(K(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await Z(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:as})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Eh(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await Z(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:G$,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(K(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await Z(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:as})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await Z(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:z0});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);u[`${b}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(K(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){eo(t);try{return await Z(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:as})}catch(n){if(K(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){eo(t);try{return await Z(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:as})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){eo(t);
360try{return await Z(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:as})}catch(r){if(K(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){eo(t.userId);try{const{data:n,error:r}=await Z(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(K(n))return{data:null,error:n};throw n}}async _deleteFactor(t){eo(t.userId),eo(t.id);try{return{data:await Z(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(K(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await Z(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:z0});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return m.length>0&&(m.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);u[`${b}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(K(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await Z(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await Z(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await Z(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(K(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await Z(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(K(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await Z(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await Z(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(K(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await Z(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await Z(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(K(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await Z(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(K(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await Z(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(K(n))return{data:null,error:n};throw n}}}function q0(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Yn={debug:!!(globalThis&&v_()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};
360class x_ extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class K0 extends x_{}async function Q$(e,t,n){Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new K0(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Yn.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await n()}})}catch(i){if(t>0&&clearTimeout(s),(i==null?void 0:i.name)==="AbortError"&&t>0){if(r.signal.aborted)return Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await n()}finally{Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw Yn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new K0(`Lock "${e}" was released because another request stole it`)}throw i}}function X$(){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 w_(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function Z$(e){return parseInt(e,16)}function e5(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function t5(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:l,requestId:c,resources:u,scheme:d,uri:h,version:f}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
361`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const m=w_(e.address),y=d?`${d}://${r}
361`:r,g=e.statement?`${e.statement}
362`:"",b=`${y} wants you to sign in with your Ethereum account:
363${m}
364
365${g}`;let x=`URI: ${h}
366Version: ${f}
367Chain ID: ${n}${o?`
368Nonce: ${o}`:""}
369Issued At: ${i.toISOString()}`;if(s&&(x+=`
370Expiration Time: ${s.toISOString()}`),l&&(x+=`
371Not Before: ${l.toISOString()}`),c&&(x+=`
372Request ID: ${c}`),u){let v=`
373Resources:`;for(const w of u){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);v+=`
374- ${w}`}x+=v}return`${b}
375${x}`}class Je extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}}class Td extends Je{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function n5({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Je({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Je({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Je({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Je({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Je({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Je({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new Je({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Je({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(b_(o)){if(i.rp.id!==o)return new Je({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Je({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Je({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Je({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Je({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function r5({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Je({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Je({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(b_(r)){if(n.rpId!==r)return new Je({message:`The RP ID "${n.rpId}
375" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Je({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Je({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Je({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class s5{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const i5=new s5;function o5(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=Eh(e,["challenge","user","excludeCredentials"]),i=$o(t).buffer,o=Object.assign(Object.assign({},n),{id:$o(n.id).buffer}),l=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){l.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const u=r[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:$o(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function a5(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Eh(e,["challenge","allowCredentials"]),s=$o(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const l=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},l),{id:$o(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return i}function l5(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:di(new Uint8Array(e.response.attestationObject)),clientDataJSON:di(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function c5(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:di(new Uint8Array(s.authenticatorData)),clientDataJSON:di(new Uint8Array(s.clientDataJSON)),signature:di(new Uint8Array(s.signature)),userHandle:s.userHandle?di(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function b_(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function G0(){var e,t;return!!(at()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function u5(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Td("Browser returned unexpected credential type",t)}:{data:null,error:new Td("Empty credential response",t)}}catch(t){return{data:null,error:n5({error:t,options:e})}}}async function d5(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Td("Browser returned unexpected credential type",t)}:{data:null,error:new Td("Empty credential response",t)}}
375catch(t){return{data:null,error:r5({error:t,options:e})}}}const h5={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},f5={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Pd(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const l=r[i];t(l)?r[i]=Pd(l,o):r[i]=Pd(o)}else r[i]=o}return r}function m5(e,t){return Pd(h5,e,t||{})}function p5(e,t){return Pd(f5,e,t||{})}class g5{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:l,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!l)return{data:null,error:c};const u=s??i5.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:d}=l.webauthn.credential_options.publicKey;if(!d.name){const h=r;if(h)d.name=`${d.id}:${h}`;else{const m=(await this.client.getUser()).data.user,y=((o=m==null?void 0:m.user_metadata)===null||o===void 0?void 0:o.name)||(m==null?void 0:m.email)||(m==null?void 0:m.id)||"User";d.name=`${d.id}:${y}`}}d.displayName||(d.displayName=d.name)}switch(l.webauthn.type){case"create":{const d=m5(l.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:f}=await u5({publicKey:d,signal:u});return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}case"request":{const d=p5(l.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:f}=await d5(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:d,signal:u}));return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}}}catch(l){return K(l)?{data:null,error:l}:{data:null,error:new ai("Unexpected error in challenge",l)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Kl("rpId is required for WebAuthn authentication")};try{if(!G0())return{data:null,error:new ai("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:l};const{webauthn:c}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:c.type,rpId:n,rpOrigins:r,credential_response:c.credential_response}})}catch(o){return K(o)?{data:null,error:o}:{data:null,error:new ai("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Kl("rpId is required for WebAuthn registration")};try{if(!G0())return{data:null,error:new ai("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var h;return(h=d.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return c?this._verify({factorId:o.id,challengeId:c.challengeId,webauthn:{rpId:n,rpOrigins:r,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(o){return K(o)?{data:null,error:o}:{data:null,error:new ai("Unexpected error in register",o)}}}}
375X$();const v5={url:m$,storageKey:p$,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:g$,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function Y0(e,t,n){return await n()}const to={};class Gl{get jwks(){var t,n;return(n=(t=to[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){to[this.storageKey]=Object.assign(Object.assign({},to[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=to[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){to[this.storageKey]=Object.assign(Object.assign({},to[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},v5),t);if(this.storageKey=i.storageKey,this.instanceID=(n=Gl.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Gl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&at()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new J$({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=y_(i.fetch),this.lock=i.lock||Y0,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&at()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=Q$:this.lock=Y0,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 g5(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:v_()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=q0(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=q0(this.memoryStorage)),at()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${m_}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(at()&&(n=P$(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),at()&&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),b$(i)){const c=(t=i.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return K(n)?this._returnResult({error:n}):this._returnResult({error:new ai("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await Z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Cn}),{data:o,error:l}=i;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(K(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:d,password:h,options:f}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await Zi(this.storage,this.storageKey)),i=await Z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:m,code_challenge_method:y},xform:Cn})}else if("phone"in t){const{phone:d,password:h,options:f}=t;i=await Z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Cn})}else throw new au("You must provide either an email or phone number and a password");const{data:o,error:l}=i;if(l||!o)return await ot(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(await ot(this.storage,`${this.storageKey}-code-verifier`),K(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:l}=t;n=await Z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:H0})}else if("phone"in t){const{phone:i,password:o,options:l}=t;n=await Z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:H0})}else throw new au("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 Xi;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(K(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,l,c,u,d,h,f;let m,y;if("message"in t)m=t.message,y=t.signature;else{const{chain:g,wallet:b,statement:x,options:v}=t;let w;if(at())if(typeof b=="object")w=b;else{const P=window;if("ethereum"in P&&typeof P.ethereum=="object"&&"request"in P.ethereum&&typeof P.ethereum.request=="function")w=P.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"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=b}const S=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href),j=await w.request({method:"eth_requestAccounts"}).then(P=>P).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!j||j.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=w_(j[0]);let _=(r=v==null?void 0:v.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!_){const P=await w.request({method:"eth_chainId"});_=Z$(P)}const E={domain:S.host,address:k,statement:x,uri:S.href,version:"1",chainId:_,nonce:(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=v==null?void 0:v.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=v==null?void 0:v.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=v==null?void 0:v.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=v==null?void 0:v.signInWithEthereum)===null||d===void 0?void 0:d.resources};m=t5(E),y=await w.request({method:"personal_sign",params:[e5(m),k]})}try{const{data:g,error:b}=await Z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:m,signature:y}
375,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Cn});if(b)throw b;if(!g||!g.session||!g.user){const x=new Xi;return this._returnResult({data:{user:null,session:null},error:x})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:b})}catch(g){if(K(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var n,r,s,i,o,l,c,u,d,h,f,m;let y,g;if("message"in t)y=t.message,g=t.signature;else{const{chain:b,wallet:x,statement:v,options:w}=t;let S;if(at())if(typeof x=="object")S=x;else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))S=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=x}const j=new URL((n=w==null?void 0:w.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()},w==null?void 0:w.signInWithSolana),{version:"1",domain:j.host,uri:j.href}),v?{statement:v}:null));let _;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")_=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)_=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in _&&"signature"in _&&(typeof _.signedMessage=="string"||_.signedMessage instanceof Uint8Array)&&_.signature instanceof Uint8Array)y=typeof _.signedMessage=="string"?_.signedMessage:new TextDecoder().decode(_.signedMessage),g=_.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");y=[`${j.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${j.href}`,`Issued At: ${(s=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((h=(d=w==null?void 0:w.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...w.signInWithSolana.resources.map(_=>`- ${_}`)]:[]].join(`
376`);const k=await S.signMessage(new TextEncoder().encode(y),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=k}}try{const{data:b,error:x}=await Z(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:di(g)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:Cn});if(x)throw x;if(!b||!b.session||!b.user){const v=new Xi;return this._returnResult({data:{user:null,session:null},error:v})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:x})}catch(b){if(K(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const n=await Xs(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new S$;const{data:i,error:o}=await Z(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Cn});if(await ot(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const l=new Xi;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await ot(this.storage,`${this.storageKey}-code-verifier`),K(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,l=await Z(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:Cn}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new Xi;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(n){if(K(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Zi(this.storage,this.storageKey));const{error:h}=await Z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await Z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new au("You must provide either an email or phone number.")}catch(l){if(await ot(this.storage,`${this.storageKey}-code-verifier`),K(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:l}=await Z(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Cn});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if(K(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,o;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await Zi(this.storage,this.storageKey));const u=await Z(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:K$});return!((i=u.data)===null||i===void 0)&&i.url&&at()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(l){if(await ot(this.storage,`${this.storageKey}-code-verifier`),K(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Kt;const{error:s}=await Z(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(K(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await Z(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:l}=await Z(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l})}throw new au("You must provide either an email or phone number and a type")}catch(n){if(K(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Xs(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
376id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Hf:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await Xs(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=qf()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=W$(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await Z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:as}):await this._useSession(async n=>{var r,s,i;const{data:o,error:l}=n;if(l)throw l;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Kt}:await Z(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:as})})}catch(n){if(K(n))return ou(n)&&(await this._removeSession(),await ot(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new Kt;const o=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await Zi(this.storage,this.storageKey));const{data:u,error:d}=await Z(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:o.access_token,xform:as});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await ot(this.storage,`${this.storageKey}-code-verifier`),K(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Kt;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=cu(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};i=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});i={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(K(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:l}=n;if(l)throw l;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Kt;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(K(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!at())throw new lu("No browser detected.");
376if(t.error||t.error_description||t.error_code)throw new lu(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new L0("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new lu("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new L0("No code detected.");const{data:v,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:l,expires_at:c,token_type:u}=t;if(!i||!l||!o||!u)throw new lu("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(l);let f=d+h;c&&(f=parseInt(c));const m=f-d;m*1e3<=co&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${h}s`);const y=f-h;d-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,d):d-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,d);const{data:g,error:b}=await this._getUser(i);if(b)throw b;const x={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:f,refresh_token:o,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:x,redirectType:t.type},error:null})}catch(r){if(K(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Xs(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!ou(i))return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(w$(l)&&(l.status===404||l.status===401||l.status===403)||ou(l)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await ot(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=T$(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),ou(i)?console.warn(i):console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await Zi(this.storage,this.storageKey,!0));try{return await Z(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await ot(this.storage,`${this.storageKey}-code-verifier`),K(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,l,c,u,d;const{data:h,error:f}=i;if(f)throw f;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await Z(this.fetch,"GET",m,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return at()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(K(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
376if(s)throw s;const{options:o,provider:l,token:c,access_token:u,nonce:d}=t,h=await Z(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:l,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Cn}),{data:f,error:m}=h;return m?this._returnResult({data:{user:null,session:null},error:m}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Xi}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:m}))}catch(s){if(await ot(this.storage,`${this.storageKey}-code-verifier`),K(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await Z(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await O$(async s=>(s>0&&await R$(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await Z(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Cn})),(s,i)=>{const o=200*Math.pow(2,s);return i&&zf(i)&&Date.now()+o-r<co})}catch(r){if(this._debug(n,"error",r),K(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),at()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await Xs(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Xs(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await uo(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:qf()}else if(s&&!s.user&&!s.user){const o=await Xs(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await ot(this.storage,this.storageKey+"-user"),await uo(this.storage,this.storageKey,s)):s.user=qf()}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()<Hf;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Hf}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),zf(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(s.access_token);!l&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Kt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Th;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new Kt;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const l={data:i.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(i){if(this._debug(s,"error",i),K(i)){const o={data:null,error:i};return zf(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,n)}catch(c){i.push(c)}});if(await Promise.all(o),i.length>0){for(let l=0;l<i.length;l+=1)console.error(i[l]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await ot(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await uo(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=V0(s);await uo(this.storage,this.storageKey,i)}else{const s=V0(n);await uo(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await ot(this.storage,this.storageKey),await ot(this.storage,this.storageKey+"-code-verifier"),await ot(this.storage,this.storageKey+"-user"),this.userStorage&&await ot(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&at()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
376catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),co);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/co);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${co}ms, refresh threshold is ${Jp} ticks`),s<=Jp&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof x_)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!at()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await Zi(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(l.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await Z(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await Z(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?l5(t.webauthn.credential_response):c5(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await Z(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await Z(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:l}=o;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:o5(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:a5(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:m}=cu(t);let y=null;m.aal&&(y=m.aal);let g=y;const{data:{user:b},error:x}=await this.getUser(t);if(x)return this._returnResult({data:null,error:x});((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&&(g="aal2");const w=m.amr||[];return{data:{currentLevel:y,nextLevel:g,currentAuthenticationMethods:w},error:null}}catch(m){if(K(m))return this._returnResult({data:null,error:m});throw m}const{data:{session:o},error:l}
376=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=cu(o.access_token);let u=null;c.aal&&(u=c.aal);let d=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(m=>m.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const f=c.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await Z(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Kt})})}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Kt});const o=await Z(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&at()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Kt});const o=await Z(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&at()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await Z(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 Kt})})}catch(t){if(K(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await Z(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Kt})})}catch(n){if(K(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(l=>l.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(l=>l.kid===t),r&&this.jwks_cached_at+y$>s)return r;const{data:i,error:o}=await Z(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(l=>l.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:m,error:y}
376=await this.getSession();if(y||!m.session)return this._returnResult({data:null,error:y});r=m.session.access_token}const{header:s,payload:i,signature:o,raw:{header:l,payload:c}}=cu(r);n!=null&&n.allowExpired||B$(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:m}=await this.getUser(r);if(m)throw m;return{data:{claims:i,header:s,signature:o},error:null}}const d=U$(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,o,N$(`${l}.${c}`)))throw new Zp("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(K(r))return this._returnResult({data:null,error:r});throw r}}}Gl.nextInstanceID={};const y5=Gl,x5="2.103.3";let Za="";typeof Deno<"u"?Za="deno":typeof document<"u"?Za="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Za="react-native":Za="node";const w5={"X-Client-Info":`supabase-js-${Za}/${x5}`},b5={headers:w5},S5={schema:"public"},j5={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},k5={};function Yl(e){"@babel/helpers - typeof";return Yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yl(e)}function C5(e,t){if(Yl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _5(e){var t=C5(e,"string");return Yl(t)=="symbol"?t:t+""}function N5(e,t,n){return(t=_5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J0(Object(n),!0).forEach(function(r){N5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const E5=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),T5=()=>Headers,P5=(e,t,n)=>{const r=E5(n),s=T5();return async(i,o)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),r(i,He(He({},o),{},{headers:u}))}};function A5(e){return e.endsWith("/")?e:e+"/"}function R5(e,t){var n,r;const{db:s,auth:i,realtime:o,global:l}=e,{db:c,auth:u,realtime:d,global:h}=t,f={db:He(He({},c),s),auth:He(He({},u),i),realtime:He(He({},d),o),storage:{},global:He(He(He({},h),l),{},{headers:He(He({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=l==null?void 0:l.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function O5(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(A5(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var M5=class extends y5{constructor(e){super(e)}},D5=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=O5(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,l={db:S5,realtime:k5,auth:He(He({},j5),{},{storageKey:o}),global:b5},c=R5(n??{},l);if(this.storageKey=(r=c.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=P5(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(He({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new nF(new URL("rest/v1",i).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new f$(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new q4(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
376channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:l,debug:c,throwOnError:u},d,h){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new M5({url:this.authUrl.href,headers:He(He({},f),d),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:l,debug:c,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(m=>m.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new IF(this.realtimeUrl.href,He(He({},e),{},{params:He(He({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const I5=(e,t,n)=>new D5(e,t,n);function L5(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}L5()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const F5="https://raelslzpbjmhkgahgvfr.supabase.co",$5="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJhZWxzbHpwYmptaGtnYWhndmZyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzUxMzA4MjQsImV4cCI6MjA5MDcwNjgyNH0.o12YWxJmlGNDB_-j8qnyKmUF-jWjcnVpHs5DzW2TVJc",Q=I5(F5,$5,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),S_=p.createContext({session:null,user:null,loading:!0,isAdmin:!1,signOut:async()=>{}}),dy=()=>p.useContext(S_),B5=({children:e})=>{const[t,n]=p.useState(null),[r,s]=p.useState(null),[i,o]=p.useState(!1),[l,c]=p.useState(!0);p.useEffect(()=>{const{data:{subscription:d}}=Q.auth.onAuthStateChange((h,f)=>{n(f),s((f==null?void 0:f.user)??null),c(!1),f!=null&&f.user?setTimeout(async()=>{const{data:m}=await Q.from("user_roles").select("role").eq("user_id",f.user.id).eq("role","admin").maybeSingle();o(!!m)},0):o(!1)});return Q.auth.getSession().then(({data:{session:h}})=>{n(h),s((h==null?void 0:h.user)??null),c(!1)}),()=>d.unsubscribe()},[]);const u=async()=>{await Q.auth.signOut()};return a.jsx(S_.Provider,{value:{session:t,user:r,loading:l,isAdmin:i,signOut:u},children:e})},j_=p.createContext({});function U5(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const V5=typeof window<"u",W5=V5?p.useLayoutEffect:p.useEffect,hy=p.createContext(null);function fy(e,t){e.indexOf(t)===-1&&e.push(t)}function Ad(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const vr=(e,t,n)=>n>t?t:n<e?e:n;let Ph=()=>{},ia=()=>{};const Ms={},k_=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function C_(e){return typeof e=="object"&&e!==null}const __=e=>/^0[^.\s]+$/u.test(e);function N_(e){let t;return()=>(t===void 0&&(t=e()),t)}const pn=e=>e,H5=(e,t)=>n=>t(e(n)),vc=(...e)=>e.reduce(H5),Jl=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class my{constructor(){this.subscriptions=[]}add(t){return fy(this.subscriptions,t),()=>Ad(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wt=e=>e*1e3,fn=e=>e/1e3;function E_(e,t){return t?e*(1e3/t):0}
vendor: 8,527 bytes, line 376
376const T_=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,z5=1e-7,q5=12;function K5(e,t,n,r,s){let i,o,l=0;do o=t+(n-t)/2,i=T_(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>z5&&++l<q5);return o}function yc(e,t,n,r){if(e===t&&n===r)return pn;const s=i=>K5(i,0,1,e,n);return i=>i===0||i===1?i:T_(s(i),t,r)}const P_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,A_=e=>t=>1-e(1-t),R_=yc(.33,1.53,.69,.99),py=A_(R_),O_=P_(py),M_=e=>e>=1?1:(e*=2)<1?.5*py(e):.5*(2-Math.pow(2,-10*(e-1))),gy=e=>1-Math.sin(Math.acos(e)),D_=A_(gy),I_=P_(gy),G5=yc(.42,0,1,1),Y5=yc(0,0,.58,1),L_=yc(.42,0,.58,1),J5=e=>Array.isArray(e)&&typeof e[0]!="number",F_=e=>Array.isArray(e)&&typeof e[0]=="number",Q0={linear:pn,easeIn:G5,easeInOut:L_,easeOut:Y5,circIn:gy,circInOut:I_,circOut:D_,backIn:py,backInOut:O_,backOut:R_,anticipate:M_},Q5=e=>typeof e=="string",X0=e=>{if(F_(e)){ia(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return yc(t,n,r,s)}else if(Q5(e))return ia(Q0[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Q0[e];return e},uu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Z0={value:null,addProjectionMetrics:null};function X5(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){o.has(h)&&(d.schedule(h),e()),c++,h(l)}const d={schedule:(h,f=!1,m=!1)=>{const g=m&&s?n:r;return f&&o.add(h),g.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(l=h,s){i=!0;return}s=!0;const f=n;n=r,r=f,n.forEach(u),t&&Z0.value&&Z0.value.frameloop[t].push(c),c=0,n.clear(),s=!1,i&&(i=!1,d.process(h))}};return d}const Z5=40;function $_(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=uu.reduce((w,S)=>(w[S]=X5(i,t?S:void 0),w),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:f,render:m,postRender:y}=o,g=()=>{const w=Ms.useManualTiming,S=w?s.timestamp:performance.now();n=!1,w||(s.delta=r?1e3/60:Math.max(Math.min(S-s.timestamp,Z5),1)),s.timestamp=S,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),m.process(s),y.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},b=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:uu.reduce((w,S)=>{const j=o[S];return w[S]=(k,_=!1,E=!1)=>(n||b(),j.schedule(k,_,E)),w},{}),cancel:w=>{for(let S=0;S<uu.length;S++)o[uu[S]].cancel(w)},state:s,steps:o}}const{schedule:Te,cancel:Ds,state:ct,steps:Gf}=$_(typeof requestAnimationFrame<"u"?requestAnimationFrame:pn,!0);let $u;function eB(){$u=void 0}const Nt={now:()=>($u===void 0&&Nt.set(ct.isProcessing||Ms.useManualTiming?ct.timestamp:performance.now()),$u),set:e=>{$u=e,queueMicrotask(eB)}},B_=e=>t=>typeof t=="string"&&t.startsWith(e),U_=B_("--"),tB=B_("var(--"),vy=e=>tB(e)?nB.test(e.split("/*")[0].trim()):!1,nB=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function eb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Sa={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ql={...Sa,transform:e=>vr(0,1,e)},du={...Sa,default:1},gl=e=>Math.round(e*1e5)/1e5,yy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rB(e){return e==null}const sB=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xy=(e,t)=>n=>!!(typeof n=="string"&&sB.test(n)&&n.startsWith(e)||t&&!rB(n)&&Object.prototype.hasOwnProperty.call(n,t)),V_=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,l]=r.match(yy);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},iB=e=>vr(0,255,e),Yf={...Sa,transform:e=>Math.round(iB(e))},hi={test:xy("rgb","red"),parse:V_("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Yf.transform(e)+", "+Yf.transform(t)+", "+Yf.transform(n)+", "+gl(Ql.transform(r))+")"};function oB(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const eg={test:xy("#"),parse:oB,transform:hi.transform},xc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Zr=xc("deg"),mr=xc("%"),q=xc("px"),aB=xc("vh"),lB=xc("vw"),tb={...mr,parse:e=>mr.parse(e)/100,transform:e=>mr.transform(e*100)},_o={test:xy("hsl","hue"),parse:V_("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+mr.transform(gl(t))+", "+mr.transform(gl(n))+", "+gl(Ql.transform(r))+")"},Qe={test:e=>hi.test(e)||eg.test(e)||_o.test(e),parse:e=>hi.test(e)?hi.parse(e):_o.test(e)?_o.parse(e):eg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?hi.transform(e):_o.transform(e),getAnimatableNone:e=>{const t=Qe.parse(e);return t.alpha=0,Qe.transform(t)}},cB=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function uB(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(yy))==null?void 0:t.length)||0)+(((n=e.match(cB))==null?void 0:n.length)||0)>0}const W_="number",H_="color",dB="var",hB="var(",nb="${}",fB=/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 oa(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const l=t.replace(fB,c=>(Qe.test(c)?(r.color.push(i),s.push(H_),n.push(Qe.parse(c))):c.startsWith(hB)?(r.var.push(i),s.push(dB),n.push(c)):(r.number.push(i),s.push(W_),n.push(parseFloat(c))),++i,nb)).split(nb);return{values:n,split:l,indexes:r,types:s}}function mB(e){return oa(e).values}function z_({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===W_?s+=gl(r[i]):o===H_?s+=Qe.transform(r[i]):s+=r[i]}return s}}function pB(e){return z_(oa(e))}const gB=e=>typeof e=="number"?0:Qe.test(e)?Qe.getAnimatableNone(e):e,vB=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:gB(e);function yB(e){const t=oa(e);return z_(t)(t.values.map((r,s)=>vB(r,t.split[s])))}const Bn={test:uB,parse:mB,createTransformer:pB,getAnimatableNone:yB};function Jf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function xB({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;s=Jf(c,l,e+1/3),i=Jf(c,l,e),o=Jf(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Rd(e,t){return n=>n>0?t:e}const De=(e,t,n)=>e+(t-e)*n,Qf=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},wB=[eg,hi,_o],bB=e=>wB.find(t=>t.test(e));function rb(e){const t=bB(e);if(Ph(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===_o&&(n=xB(n)),n}const sb=(e,t)=>{const n=rb(e),r=rb(t);if(!n||!r)return Rd(e,t);const s={...n};return i=>(s.red=Qf(n.red,r.red,i),s.green=Qf(n.green,r.green,i),s.blue=Qf(n.blue,r.blue,i),s.alpha=De(n.alpha,r.alpha,i),hi.transform(s))},tg=new Set(["none","hidden"]);function SB(e,t){return tg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jB(e,t){return n=>De(e,t,n)}function wy(e){return typeof e=="number"?jB:typeof e=="string"?vy(e)?Rd:Qe.test(e)?sb:_B:Array.isArray(e)?q_:typeof e=="object"?Qe.test(e)?sb:kB:Rd}function q_(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>wy(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function kB(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=wy(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function CB(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],l=e.values[o]??0;n[s]=l,r[i]++}return n}const _B=(e,t)=>{const n=Bn.createTransformer(t),r=oa(e),s=oa(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?tg.has(e)&&!s.values.length||tg.has(t)&&!r.values.length?SB(e,t):vc(q_(CB(r,s),s.values),n):(Ph(!0,`Complex values '${e}' and '${t}
376' 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"),Rd(e,t))};function K_(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?De(e,t,n):wy(e)(e,t)}const NB=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Te.update(t,n),stop:()=>Ds(t),now:()=>ct.isProcessing?ct.timestamp:Nt.now()}},G_=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Od=2e4;function by(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Od;)t+=n,r=e.next(t);return t>=Od?1/0:t}function EB(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(by(r),Od);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:fn(s)}}const $e={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ng(e,t){return e*Math.sqrt(1-t*t)}const TB=12;function PB(e,t,n){let r=n;for(let s=1;s<TB;s++)r=r-e(r)/t(r);return r}const Xf=.001;function AB({duration:e=$e.duration,bounce:t=$e.bounce,velocity:n=$e.velocity,mass:r=$e.mass}){let s,i;Ph(e<=Wt($e.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=vr($e.minDamping,$e.maxDamping,o),e=vr($e.minDuration,$e.maxDuration,fn(e)),o<1?(s=u=>{const d=u*o,h=d*e,f=d-n,m=ng(u,o),y=Math.exp(-h);return Xf-f/m*y},i=u=>{const h=u*o*e,f=h*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,y=Math.exp(-h),g=ng(Math.pow(u,2),o);return(-s(u)+Xf>0?-1:1)*((f-m)*y)/g}):(s=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-Xf+d*h},i=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const l=5/e,c=PB(s,i,l);if(e=Wt(e),isNaN(c))return{stiffness:$e.stiffness,damping:$e.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const RB=["duration","bounce"],OB=["stiffness","damping","mass"];function ib(e,t){return t.some(n=>e[n]!==void 0)}function MB(e){let t={velocity:$e.velocity,stiffness:$e.stiffness,damping:$e.damping,mass:$e.mass,isResolvedFromDuration:!1,...e};if(!ib(e,OB)&&ib(e,RB))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*vr(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:$e.mass,stiffness:s,damping:i}}else{const n=AB({...e,velocity:0});t={...t,...n,mass:$e.mass},t.isResolvedFromDuration=!0}return t}function Md(e=$e.visualDuration,t=$e.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:m}=MB({...n,velocity:-fn(n.velocity||0)}),y=f||0,g=u/(2*Math.sqrt(c*d)),b=o-i,x=fn(Math.sqrt(c/d)),v=Math.abs(b)<5;r||(r=v?$e.restSpeed.granular:$e.restSpeed.default),s||(s=v?$e.restDelta.granular:$e.restDelta.default);let w,S,j,k,_,E;if(g<1)j=ng(x,g),k=(y+g*x*b)/j,w=T=>{const F=Math.exp(-g*x*T);return o-F*(k*Math.sin(j*T)+b*Math.cos(j*T))},_=g*x*k+b*j,E=g*x*b-k*j,S=T=>Math.exp(-g*x*T)*(_*Math.sin(j*T)+E*Math.cos(j*T));else if(g===1){w=F=>o-Math.exp(-x*F)*(b+(y+x*b)*F);const T=y+x*b;S=F=>Math.exp(-x*F)*(x*T*F-y)}else{const T=x*Math.sqrt(g*g-1);w=M=>{const Y=Math.exp(-g*x*M),$=Math.min(T*M,300);return o-Y*((y+g*x*b)*Math.sinh($)+T*b*Math.cosh($))/T};const F=(y+g*x*b)/T,D=g*x*F-b*T,G=g*x*b-F*T;S=M=>{const Y=Math.exp(-g*x*M),$=Math.min(T*M,300);return Y*(D*Math.sinh($)+G*Math.cosh($))}}const P={calculatedDuration:m&&h||null,velocity:T=>Wt(S(T)),next:T=>{if(!m&&g<1){const D=Math.exp(-g*x*T),G=Math.sin(j*T),M=Math.cos(j*T),Y=o-D*(k*G+b*M),$=Wt(D*(_*G+E*M));return l.done=Math.abs($)<=r&&Math.abs(o-Y)<=s,l.value=l.done?o:Y,l}const F=w(T);if(m)l.done=T>=h;else{const D=Wt(S(T));l.done=Math.abs(D)<=r&&Math.abs(o-F)<=s}return l.value=l.done?o:F,l},toString:()=>{const T=Math.min(by(P),Od),F=G_(D=>P.next(T*D).value,T,30);return T+"ms "+F},toTransition:()=>{}};return P}Md.applyToOptions=e=>{const t=EB(e,100,Md);return e.ease=t.ease,e.duration=Wt(t.duration),e.type="keyframes",e};const DB=5;function Y_(e,t,n){const r=Math.max(t-DB,0);return E_(n-e(r),t-r)}function rg({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},m=E=>l!==void 0&&E<l||c!==void 0&&E>c,y=E=>l===void 0?c:c===void 0||Math.abs(l-E)<Math.abs(c-E)?l:c;let g=n*t;const b=h+g,x=o===void 0?b:o(b);x!==b&&(g=x-h);const v=E=>-g*Math.exp(-E/r),w=E=>x+v(E),S=E=>{const P=v(E),T=w(E);f.done=Math.abs(P)<=u,f.value=f.done?x:T};let j,k;const _=E=>{m(f.value)&&(j=E,k=Md({keyframes:[f.value,y(f.value)],velocity:Y_(w,E,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return _(0),{calculatedDuration:null,next:E=>{let P=!1;return!k&&j===void 0&&(P=!0,S(E),_(E)),j!==void 0&&E>=j?k.next(E-j):(!P&&S(E),f)}}}
vendor: 14,577 bytes, line 376
376function IB(e,t,n){const r=[],s=n||Ms.mix||K_,i=e.length-1;for(let o=0;o<i;o++){let l=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||pn:t;l=vc(c,l)}r.push(l)}return r}function LB(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(ia(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=IB(t,r,s),c=l.length,u=d=>{if(o&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=Jl(e[h],e[h+1],d);return l[h](f)};return n?d=>u(vr(e[0],e[i-1],d)):u}function FB(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Jl(0,t,r);e.push(De(n,1,s))}}function $B(e){const t=[0];return FB(t,e.length-1),t}function BB(e,t){return e.map(n=>n*t)}function UB(e,t){return e.map(()=>t||L_).splice(0,e.length-1)}function vl({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=J5(r)?r.map(X0):X0(r),i={done:!1,value:t[0]},o=BB(n&&n.length===t.length?n:$B(t),e),l=LB(o,t,{ease:Array.isArray(s)?s:UB(t,s)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const VB=e=>e!==null;function Ah(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(VB),l=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!l||r===void 0?i[l]:r}const WB={decay:rg,inertia:rg,tween:vl,keyframes:vl,spring:Md};function J_(e){typeof e.type=="string"&&(e.type=WB[e.type])}class Sy{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const HB=e=>e/100;class Dd extends Sy{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Nt.now()&&this.tick(Nt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;J_(t);const{type:n=vl,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:l}=t;const c=n||vl;c!==vl&&typeof l[0]!="number"&&(this.mixKeyframes=vc(HB,K_(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=by(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:m,type:y,onUpdate:g,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?x<0:x>s;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,S=r;if(h){const E=Math.min(this.currentTime,s)/l;let P=Math.floor(E),T=E%1;!T&&E>=1&&(T=1),T===1&&P--,P=Math.min(P,h+1),!!(P%2)&&(f==="reverse"?(T=1-T,m&&(T-=m/l)):f==="mirror"&&(S=o)),w=vr(0,1,T)*l}let j;v?(this.delayState.value=d[0],j=this.delayState):j=S.next(w),i&&!v&&(j.value=i(j.value));let{done:k}=j;!v&&c!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return _&&y!==rg&&(j.value=Ah(d,this.options,b,this.speed)),g&&g(j.value),_&&this.finish(),j}then(t,n){return this.finished.then(t,n)}get duration(){return fn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+fn(t)}get time(){return fn(this.currentTime)}set time(t){t=Wt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Y_(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Nt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=fn(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=NB,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Nt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function zB(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const fi=e=>e*180/Math.PI,sg=e=>{const t=fi(Math.atan2(e[1],e[0]));return ig(t)},qB={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:sg,rotateZ:sg,skewX:e=>fi(Math.atan(e[1])),skewY:e=>fi(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ig=e=>(e=e%360,e<0&&(e+=360),e),ob=sg,ab=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),lb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),KB={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ab,scaleY:lb,scale:e=>(ab(e)+lb(e))/2,rotateX:e=>ig(fi(Math.atan2(e[6],e[5]))),rotateY:e=>ig(fi(Math.atan2(-e[2],e[0]))),rotateZ:ob,rotate:ob,skewX:e=>fi(Math.atan(e[4])),skewY:e=>fi(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function og(e){return e.includes("scale")?1:0}function ag(e,t){if(!e||e==="none")return og(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=KB,s=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=qB,s=l}if(!s)return og(t);const i=r[t],o=s[1].split(",").map(YB);return typeof i=="function"?i(o):o[i]}const GB=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ag(n,t)};function YB(e){return parseFloat(e.trim())}const ja=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ka=new Set(ja),cb=e=>e===Sa||e===q,JB=new Set(["x","y","z"]),QB=ja.filter(e=>!JB.has(e));function XB(e){const t=[];return QB.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const gs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ag(t,"x"),y:(e,{transform:t})=>ag(t,"y")};gs.translateX=gs.x;gs.translateY=gs.y;const ji=new Set;let lg=!1,cg=!1,ug=!1;function Q_(){if(cg){const e=Array.from(ji).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=XB(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var l;(l=r.getValue(i))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}cg=!1,lg=!1,ji.forEach(e=>e.complete(ug)),ji.clear()}function X_(){ji.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(cg=!0)})}function ZB(){ug=!0,X_(),Q_(),ug=!1}class jy{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ji.add(this),lg||(lg=!0,Te.read(X_),Te.resolveKeyframes(Q_))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}zB(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ji.delete(this)}cancel(){this.state==="scheduled"&&(ji.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const eU=e=>e.startsWith("--");function Z_(e,t,n){eU(t)?e.style.setProperty(t,n):e.style[t]=n}const tU={};function eN(e,t){const n=N_(e);return()=>tU[t]??n()}const nU=eN(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),tN=eN(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),el=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ub={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:el([0,.65,.55,1]),circOut:el([.55,0,1,.45]),backIn:el([.31,.01,.66,-.59]),backOut:el([.33,1.53,.69,.99])};function nN(e,t){if(e)return typeof e=="function"?tN()?G_(e,t):"ease-out":F_(e)?el(e):Array.isArray(e)?e.map(n=>nN(n,t)||ub.easeOut):ub[e]}function rU(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=nN(l,s);Array.isArray(h)&&(d.easing=h);const f={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function rN(e){return typeof e=="function"&&"applyToOptions"in e}function sU({type:e,...t}){return rN(e)&&tN()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class sN extends Sy{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,ia(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=sU(t);this.animation=rU(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=Ah(s,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Z_(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return fn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+fn(t)}get time(){return fn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wt(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&nU()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),pn):s(this)}}const iN={anticipate:M_,backInOut:O_,circInOut:I_};function iU(e){return e in iN}function oU(e){typeof e.ease=="string"&&iU(e.ease)&&(e.ease=iN[e.ease])}const Zf=10;class aU extends sN{constructor(t){oU(t),J_(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new Dd({...o,autoplay:!1}),c=Math.max(Zf,Nt.now()-this.startTime),u=vr(0,Zf,c-Zf),d=l.sample(c).value,{name:h}=this.options;i&&h&&Z_(i,h,d),n.setWithVelocity(l.sample(Math.max(0,c-u)).value,d,u),l.stop()}}const db=(e,t)=>
376t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Bn.test(e)||e==="0")&&!e.startsWith("url("));function lU(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function cU(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=db(s,t),l=db(i,t);return Ph(o===l,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!l?!1:lU(e)||(n==="spring"||rN(n))&&r}function dg(e){e.duration=0,e.type="keyframes"}const oN=new Set(["opacity","clipPath","filter","transform"]),uU=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function dU(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&uU.test(e[t]))return!0;return!1}const hU=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),fU=N_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function mU(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return fU()&&n&&(oN.has(n)||hU.has(n)&&dU(l))&&(n!=="transform"||!d)&&!u&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const pU=40;class gU extends Sy{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:l,name:c,motionValue:u,element:d,...h}){var y;super(),this.stop=()=>{var g,b;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Nt.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:c,motionValue:u,element:d,...h},m=(d==null?void 0:d.KeyframeResolver)||jy;this.keyframeResolver=new m(l,(g,b,x)=>this.onKeyframesResolved(g,b,f,!x),c,u,d),(y=this.keyframeResolver)==null||y.scheduleResolve()}onKeyframesResolved(t,n,r,s){var x,v;this.keyframeResolver=void 0;const{name:i,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=Nt.now();let h=!0;cU(t,i,o,l)||(h=!1,(Ms.instantAnimations||!c)&&(d==null||d(Ah(t,r,n))),t[0]=t[t.length-1],dg(r),r.repeat=0);const m={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>pU?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=h&&!u&&mU(m),g=(v=(x=m.motionValue)==null?void 0:x.owner)==null?void 0:v.current;let b;if(y)try{b=new aU({...m,element:g})}catch{b=new Dd(m)}else b=new Dd(m);b.finished.then(()=>{this.notifyFinished()}).catch(pn),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),ZB()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function aN(e,t,n,r=0,s=1){const i=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:l-i*r}const vU=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yU(e){const t=vU.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const xU=4;function lN(e,t,n=1){ia(n<=xU,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=yU(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return k_(o)?parseFloat(o):o}return vy(s)?lN(s,t,n+1):s}const wU={type:"spring",stiffness:500,damping:25,restSpeed:10},bU=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),SU={type:"keyframes",duration:.8},jU={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kU=(e,{keyframes:t})=>t.length>2?SU:ka.has(e)?e.startsWith("scale")?bU(t[1]):wU:jU;function cN(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function ky(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?cN(n,e):n}const CU=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function _U(e){for(const t in e)if(!CU.has(t))return!0;return!1}const Cy=(e,t,n,r={},s,i)=>o=>{const l=ky(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Wt(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:s};_U(l)||Object.assign(d,kU(e,d)),d.duration&&(d.duration=Wt(d.duration)),d.repeatDelay&&(d.repeatDelay=Wt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(dg(d),d.delay===0&&(h=!0)),(Ms.instantAnimations||Ms.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,dg(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!i&&t.get()!==void 0){const f=Ah(d.keyframes,l);if(f!==void 0){Te.update(()=>{d.onUpdate(f),d.onComplete()});return}}return l.isSync?new Dd(d):new gU(d)};function hb(e){const t=[{},{}];
vendor: 39,523 bytes, line 376
376return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function _y(e,t,n,r){if(typeof t=="function"){const[s,i]=hb(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=hb(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function ki(e,t,n){const r=e.getProps();return _y(r,t,n!==void 0?n:r.custom,e)}const uN=new Set(["width","height","top","left","right","bottom",...ja]),fb=30,NU=e=>!isNaN(parseFloat(e));class EU{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=Nt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Nt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=NU(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new my);const r=this.events[t].add(n);return t==="change"?()=>{r(),Te.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Nt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>fb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,fb);return E_(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function aa(e,t){return new EU(e,t)}const hg=e=>Array.isArray(e);function TU(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,aa(n))}function PU(e){return hg(e)?e[e.length-1]||0:e}function AU(e,t){const n=ki(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const l=PU(i[o]);TU(e,o,l)}}const ht=e=>!!(e&&e.getVelocity);function RU(e){return!!(ht(e)&&e.add)}function fg(e,t){const n=e.getValue("willChange");if(RU(n))return n.add(t);if(!n&&Ms.WillChange){const r=new Ms.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Ny(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const OU="framerAppearId",dN="data-"+Ny(OU);function hN(e){return e.props[dN]}function MU({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function fN(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...l}=t;const c=e.getDefaultTransition();i=i?cN(i,c):c;const u=i==null?void 0:i.reduceMotion;r&&(i=r);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const f in l){const m=e.getValue(f,e.latestValues[f]??null),y=l[f];if(y===void 0||h&&MU(h,f))continue;const g={delay:n,...ky(i||{},f)},b=m.get();if(b!==void 0&&!m.isAnimating()&&!Array.isArray(y)&&y===b&&!g.velocity){Te.update(()=>m.set(y));continue}let x=!1;if(window.MotionHandoffAnimation){const S=hN(e);if(S){const j=window.MotionHandoffAnimation(S,f,Te);j!==null&&(g.startTime=j,x=!0)}}fg(e,f);const v=u??e.shouldReduceMotion;m.start(Cy(f,m,y,v&&uN.has(f)?{type:!1}:g,e,x));const w=m.animation;w&&d.push(w)}if(o){const f=()=>Te.update(()=>{o&&AU(e,o)});d.length?Promise.all(d).then(f):f()}return d}function mg(e,t,n={}){var c;const r=ki(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(fN(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=s;return DU(e,t,u,d,h,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[i,o]:[o,i];return u().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function DU(e,t,n=0,r=0,s=0,i=1,o){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(mg(c,t,{...o,delay:n+(typeof r=="function"?0:r)+aN(e.variantChildren,c,r,s,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function IU(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>mg(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=mg(e,t,n);else{const s=typeof t=="function"?ki(e,t,n.custom):t;r=Promise.all(fN(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const LU={test:e=>e==="auto",parse:e=>e},mN=e=>t=>t.test(e),pN=[Sa,q,mr,Zr,lB,aB,LU],mb=e=>pN.find(mN(e));function FU(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||__(e):!0}const $U=new Set(["brightness","contrast","saturate","opacity"]);function BU(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(yy)||[];if(!r)return e;const s=n.replace(r,"");let i=$U.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const UU=/\b([a-z-]*)\(.*?\)/gu,pg={...Bn,getAnimatableNone:e=>{const t=e.match(UU);return t?t.map(BU).join(" "):e}},gg={...Bn,getAnimatableNone:e=>{const t=Bn.parse(e);return Bn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},pb={...Sa,transform:Math.round},VU={rotate:Zr,rotateX:Zr,rotateY:Zr,rotateZ:Zr,scale:du,scaleX:du,scaleY:du,scaleZ:du,skew:Zr,skewX:Zr,skewY:Zr,distance:q,translateX:q,translateY:q,translateZ:q,x:q,y:q,z:q,perspective:q,transformPerspective:q,opacity:Ql,originX:tb,originY:tb,originZ:q},Ey={borderWidth:q,borderTopWidth:q,borderRightWidth:q,borderBottomWidth:q,borderLeftWidth:q,borderRadius:q,borderTopLeftRadius:q,borderTopRightRadius:q,borderBottomRightRadius:q,borderBottomLeftRadius:q,width:q,maxWidth:q,height:q,maxHeight:q,top:q,right:q,bottom:q,left:q,inset:q,insetBlock:q,insetBlockStart:q,insetBlockEnd:q,insetInline:q,insetInlineStart:q,insetInlineEnd:q,padding:q,paddingTop:q,paddingRight:q,paddingBottom:q,paddingLeft:q,paddingBlock:q,paddingBlockStart:q,paddingBlockEnd:q,paddingInline:q,paddingInlineStart:q,paddingInlineEnd:q,margin:q,marginTop:q,marginRight:q,marginBottom:q,marginLeft:q,marginBlock:q,marginBlockStart:q,marginBlockEnd:q,marginInline:q,marginInlineStart:q,marginInlineEnd:q,fontSize:q,backgroundPositionX:q,backgroundPositionY:q,...VU,zIndex:pb,fillOpacity:Ql,strokeOpacity:Ql,numOctaves:pb},WU={...Ey,color:Qe,backgroundColor:Qe,outlineColor:Qe,fill:Qe,stroke:Qe,borderColor:Qe,borderTopColor:Qe,borderRightColor:Qe,borderBottomColor:Qe,borderLeftColor:Qe,filter:pg,WebkitFilter:pg,mask:gg,WebkitMask:gg},gN=e=>WU[e],HU=new Set([pg,gg]);function vN(e,t){let n=gN(e);return HU.has(n)||(n=Bn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zU=new Set(["auto","none","0"]);function qU(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!zU.has(i)&&oa(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=vN(n,s)}class KU extends jy{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),vy(h))){const f=lN(h,n.current);f!==void 0&&(t[d]=f),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!uN.has(r)||t.length!==2)return;const[s,i]=t,o=mb(s),l=mb(i),c=eb(s),u=eb(i);if(c!==u&&gs[r]){this.needsMeasurement=!0;return}if(o!==l)if(cb(o)&&cb(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else gs[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||FU(t[s]))&&r.push(s);r.length&&qU(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=gs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function yN(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const xN=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function GU(e){return C_(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Ty,cancel:qG}=$_(queueMicrotask,!1),_n={x:!1,y:!1};function wN(){return _n.x||_n.y}function YU(e){return e==="x"||e==="y"?_n[e]?null:(_n[e]=!0,()=>{_n[e]=!1}):_n.x||_n.y?null:(_n.x=_n.y=!0,()=>{_n.x=_n.y=!1})}function bN(e,t){const n=yN(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function JU(e){return!(e.pointerType==="touch"||wN())}function QU(e,t,n={}){const[r,s,i]=bN(e,n);return r.forEach(o=>{let l=!1,c=!1,u;const d=()=>{o.removeEventListener("pointerleave",y)},h=b=>{u&&(u(b),u=void 0),d()},f=b=>{l=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,h(b))},m=()=>{l=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},y=b=>{if(b.pointerType!=="touch"){if(l){c=!0;return}h(b)}},g=b=>{if(!JU(b))return;c=!1;const x=t(o,b);typeof x=="function"&&(u=x,o.addEventListener("pointerleave",y,s))};o.addEventListener("pointerenter",g,s),o.addEventListener("pointerdown",m,s)}),i}const SN=(e,t)=>t?e===t?!0:SN(e,t.parentElement):!1,Py=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,XU=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ZU(e){return XU.has(e.tagName)||e.isContentEditable===!0}const eV=new Set(["INPUT","SELECT","TEXTAREA"]);function tV(e){return eV.has(e.tagName)||e.isContentEditable===!0}const Bu=new WeakSet;function gb(e){return t=>{t.key==="Enter"&&e(t)}}function em(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nV=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=gb(()=>{if(Bu.has(n))return;em(n,"down");const s=gb(()=>{em(n,"up")}),i=()=>em(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function vb(e){return Py(e)&&!wN()}const yb=new WeakSet;function rV(e,t,n={}){const[r,s,i]=bN(e,n),o=l=>{const c=l.currentTarget;if(!vb(l)||yb.has(l))return;Bu.add(c),n.stopPropagation&&yb.add(l);const u=t(c,l),d=(m,y)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Bu.has(c)&&Bu.delete(c),vb(m)&&typeof u=="function"&&u(m,{success:y})},h=m=>{d(m,c===window||c===document||n.useGlobalTarget||SN(c,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,s),GU(l)&&(l.addEventListener("focus",u=>nV(u,s)),!ZU(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}function Ay(e){return C_(e)&&"ownerSVGElement"in e}const Uu=new WeakMap;let es;const jN=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Ay(r)&&"getBBox"in r?r.getBBox()[t]:r[n],sV=jN("inline","width","offsetWidth"),iV=jN("block","height","offsetHeight");function oV({target:e,borderBoxSize:t}){var n;(n=Uu.get(e))==null||n.forEach(r=>{r(e,{get width(){return sV(e,t)},get height(){return iV(e,t)}})})}function aV(e){e.forEach(oV)}function lV(){typeof ResizeObserver>"u"||(es=new ResizeObserver(aV))}function cV(e,t){es||lV();const n=yN(e);return n.forEach(r=>{let s=Uu.get(r);s||(s=new Set,Uu.set(r,s)),s.add(t),es==null||es.observe(r)}),()=>{n.forEach(r=>{const s=Uu.get(r);s==null||s.delete(t),s!=null&&s.size||es==null||es.unobserve(r)})}}const Vu=new Set;let No;function uV(){No=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Vu.forEach(t=>t(e))},window.addEventListener("resize",No)}function dV(e){return Vu.add(e),No||uV(),()=>{Vu.delete(e),!Vu.size&&typeof No=="function"&&(window.removeEventListener("resize",No),No=void 0)}}function xb(e,t){return typeof e=="function"?dV(e):cV(e,t)}function hV(e){return Ay(e)&&e.tagName==="svg"}const fV=[...pN,Qe,Bn],mV=e=>fV.find(mN(e)),wb=()=>({translate:0,scale:1,origin:0,originPoint:0}),Eo=()=>({x:wb(),y:wb()}),bb=()=>({min:0,max:0}),Ze=()=>({x:bb(),y:bb()}),pV=new WeakMap;function Rh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Xl(e){return typeof e=="string"||Array.isArray(e)}const Ry=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Oy=["initial",...Ry];function Oh(e){return Rh(e.animate)||Oy.some(t=>Xl(e[t]))}function kN(e){return!!(Oh(e)||e.variants)}function gV(e,t,n){for(const r in t){const s=t[r],i=n[r];if(ht(s))e.addValue(r,s);else if(ht(i))e.addValue(r,aa(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,aa(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const vg={current:null},CN={current:!1},vV=typeof window<"u";function yV(){if(CN.current=!0,!!vV)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>vg.current=e.matches;e.addEventListener("change",t),t()}else vg.current=!1}const Sb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Id={};function _N(e){Id=e}function xV(){return Id}class wV{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=jy,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Nt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Te.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=Oh(n),this.isVariantNode=kN(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const y=f[m];u[m]!==void 0&&ht(y)&&y.set(u[m])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,pV.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(CN.current||yV(),this.shouldReduceMotion=vg.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ds(this.notifyUpdate),Ds(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&oN.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:l,times:c,ease:u,duration:d}=n.accelerate,h=new sN({element:this.current,name:t,keyframes:l,times:c,ease:u,duration:Wt(d)}),f=o(h);this.valueSubscriptions.set(t,()=>{f(),h.cancel()});return}const r=ka.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Id){const n=Id[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ze()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Sb.length;r++){const s=Sb[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=gV(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=aa(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(k_(r)||__(r))?r=parseFloat(r):!mV(r)&&Bn.test(n)&&(r=vN(t,n)),this.setBaseTarget(t,ht(r)?r.get():r)),ht(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=_y(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ht(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new my),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ty.render(this.render)}}class NN extends wV{constructor(){super(...arguments),this.KeyframeResolver=KU}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ht(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Vs{constructor(t){this.isMounted=!1,this.node=t}update(){}}function EN({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function bV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function SV(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function tm(e){return e===void 0||e===1}function yg({scale:e,scaleX:t,scaleY:n}){return!tm(e)||!tm(t)||!tm(n)}function ii(e){return yg(e)||TN(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function TN(e){return jb(e.x)||jb(e.y)}function jb(e){return e&&e!=="0%"}function Ld(e,t,n){const r=e-n,s=t*r;return n+s}function kb(e,t,n,r,s){return s!==void 0&&(e=Ld(e,s,r)),Ld(e,n,r)+t}function xg(e,t=0,n=1,r,s){e.min=kb(e.min,t,n,r,s),e.max=kb(e.max,t,n,r,s)}function PN(e,{x:t,y:n}){xg(e.x,t.translate,t.scale,t.originPoint),xg(e.y,n.translate,n.scale,n.originPoint)}const Cb=.999999999999,_b=1.0000000000001;function jV(e,t,n,r=!1){var l;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let c=0;c<s;c++){i=n[c],o=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(sr(e.x,-i.scroll.offset.x),sr(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,PN(e,o)),r&&ii(i.latestValues)&&Wu(e,i.latestValues,(l=i.layout)==null?void 0:l.layoutBox))}t.x<_b&&t.x>Cb&&(t.x=1),t.y<_b&&t.y>Cb&&(t.y=1)}function sr(e,t){e.min+=t,e.max+=t}function Nb(e,t,n,r,s=.5){const i=De(e.min,e.max,s);xg(e,t,n,i,r)}function Eb(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Wu(e,t,n){const r=n??e;Nb(e.x,Eb(t.x,r.x),t.scaleX,t.scale,t.originX),Nb(e.y,Eb(t.y,r.y),t.scaleY,t.scale,t.originY)}function AN(e,t){return EN(SV(e.getBoundingClientRect(),t))}function kV(e,t,n){const r=AN(e,n),{scroll:s}=t;return s&&(sr(r.x,s.offset.x),sr(r.y,s.offset.y)),r}const CV={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_V=ja.length;function NV(e,t,n){let r="",s=!0;for(let i=0;i<_V;i++){const o=ja[i],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(o.startsWith("scale")?1:0);else{const u=parseFloat(l);c=o.startsWith("scale")?u===1:u===0}if(!c||n){const u=xN(l,Ey[o]);if(!c){s=!1;const d=CV[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function My(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(ka.has(c)){o=!0;continue}else if(U_(c)){s[c]=u;continue}else{const d=xN(u,Ey[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=NV(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}function RN(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function Tb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ua={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(q.test(e))e=parseFloat(e);else return e;const n=Tb(e,t.target.x),r=Tb(e,t.target.y);return`${n}% ${r}%`}},EV={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Bn.parse(e);if(s.length>5)return r;const i=Bn.createTransformer(e),o=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=l,s[1+o]/=c;const u=De(l,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},wg={borderRadius:{...Ua,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ua,borderTopRightRadius:Ua,borderBottomLeftRadius:Ua,borderBottomRightRadius:Ua,boxShadow:EV};function ON(e,{layout:t,layoutId:n}){return ka.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wg[e]||e==="opacity")}function Dy(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const l in r)(ht(r[l])||s&&ht(s[l])||ON(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(i[l]=r[l]);return i}function TV(e){return window.getComputedStyle(e)}class PV extends NN{constructor(){super(...arguments),this.type="html",this.renderInstance=RN}readValueFromInstance(t,n){var r;if(ka.has(n))return(r=this.projection)!=null&&r.isProjecting?og(n):GB(t,n);{const s=TV(t),i=(U_(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return AN(t,n)}build(t,n,r){My(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Dy(t,n,r)}}const AV={offset:"stroke-dashoffset",array:"stroke-dasharray"},RV={offset:"strokeDashoffset",array:"strokeDasharray"};function OV(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?AV:RV;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const MV=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function MN(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...l},c,u,d){if(My(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const m of MV)h[m]!==void 0&&(f[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&OV(h,s,i,o,!1)}const DN=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"]),IN=e=>typeof e=="string"&&e.toLowerCase()==="svg";function DV(e,t,n,r){RN(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(DN.has(s)?s:Ny(s),t.attrs[s])}function LN(e,t,n){const r=Dy(e,t,n);for(const s in e)if(ht(e[s])||ht(t[s])){const i=ja.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class IV extends NN{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ka.has(n)){const r=gN(n);return r&&r.default||0}return n=DN.has(n)?n:Ny(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return LN(t,n,r)}build(t,n,r){MN(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){DV(t,n,r,s)}mount(t){this.isSVGTag=IN(t.tagName),super.mount(t)}}const LV=Oy.length;function FN(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?FN(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<LV;n++){const r=Oy[n],s=e.props[r];(Xl(s)||s===!1)&&(t[r]=s)}return t}function $N(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const FV=[...Ry].reverse(),$V=Ry.length;function BV(e){return t=>Promise.all(t.map(({animation:n,options:r})=>IU(e,n,r)))}function UV(e){let t=BV(e),n=Pb(),r=!0,s=!1;const i=u=>(d,h)=>{var m;const f=ki(e,h,u==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(f){const{transition:y,transitionEnd:g,...b}=f;d={...d,...b,...g}}return d};function o(u){t=u(e)}function l(u){const{props:d}=e,h=FN(e.parent)||{},f=[],m=new Set;let y={},g=1/0;for(let x=0;x<$V;x++){const v=FV[x],w=n[v],S=d[v]!==void 0?d[v]:h[v],j=Xl(S),k=v===u?w.isActive:null;k===!1&&(g=x);let _=S===h[v]&&S!==d[v]&&j;if(_&&(r||s)&&e.manuallyAnimateOnMount&&(_=!1),w.protectedKeys={...y},!w.isActive&&k===null||!S&&!w.prevProp||Rh(S)||typeof S=="boolean")continue;if(v==="exit"&&w.isActive&&k!==!0){w.prevResolvedValues&&(y={...y,...w.prevResolvedValues});continue}const E=VV(w.prevProp,S);let P=E||v===u&&w.isActive&&!_&&j||x>g&&j,T=!1;const F=Array.isArray(S)?S:[S];let D=F.reduce(i(v),{});k===!1&&(D={});const{prevResolvedValues:G={}}=w,M={...G,...D},Y=C=>{P=!0,m.has(C)&&(T=!0,m.delete(C)),w.needsAnimating[C]=!0;const N=e.getValue(C);N&&(N.liveStyle=!1)};for(const C in M){const N=D[C],I=G[C];if(y.hasOwnProperty(C))continue;let V=!1;hg(N)&&hg(I)?V=!$N(N,I):V=N!==I,V?N!=null?Y(C):m.add(C):N!==void 0&&m.has(C)?Y(C):w.protectedKeys[C]=!0}w.prevProp=S,w.prevResolvedValues=D,w.isActive&&(y={...y,...D}),(r||s)&&e.blockInitialAnimation&&(P=!1);const $=_&&E;P&&(!$||T)&&f.push(...F.map(C=>{const N={type:v};if(typeof C=="string"&&(r||s)&&!$&&e.manuallyAnimateOnMount&&e.parent){const{parent:I}=e,V=ki(I,C);if(I.enteringChildren&&V){const{delayChildren:W}=V.transition||{};N.delay=aN(I.enteringChildren,e,W)}}return{animation:C,options:N}}))}if(m.size){const x={};if(typeof d.initial!="boolean"){const v=ki(e,Array.isArray(d.initial)?d.initial[0]:d.initial);v&&v.transition&&(x.transition=v.transition)}m.forEach(v=>{const w=e.getBaseTarget(v),S=e.getValue(v);S&&(S.liveStyle=!0),x[v]=w??null}),f.push({animation:x})}let b=!!f.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,s=!1,b?t(f):Promise.resolve()}function c(u,d){var f;if(n[u].isActive===d)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(m=>{var y;return(y=m.animationState)==null?void 0:y.setActive(u,d)}),n[u].isActive=d;const h=l(u);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Pb(),s=!0}}}function VV(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!$N(t,e):!1}function Zs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pb(){return{animate:Zs(!0),whileInView:Zs(),whileHover:Zs(),whileTap:Zs(),whileDrag:Zs(),whileFocus:Zs(),exit:Zs()}}function bg(e,t){e.min=t.min,e.max=t.max}function kn(e,t){bg(e.x,t.x),bg(e.y,t.y)}function Ab(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const BN=1e-4,WV=1-BN,HV=1+BN,UN=.01,zV=0-UN,qV=0+UN;function Et(e){return e.max-e.min}function KV(e,t,n){return Math.abs(e-t)<=n}function Rb(e,t,n,r=.5){e.origin=r,e.originPoint=De(t.min,t.max,e.origin),e.scale=Et(n)/Et(t),e.translate=De(n.min,n.max,e.origin)-e.originPoint,(e.scale>=WV&&e.scale<=HV||isNaN(e.scale))&&(e.scale=1),(e.translate>=zV&&e.translate<=qV||isNaN(e.translate))&&(e.translate=0)}function yl(e,t,n,r){Rb(e.x,t.x,n.x,r?r.originX:void 0),Rb(e.y,t.y,n.y,r?r.originY:void 0)}function Ob(e,t,n,r=0){const s=r?De(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+Et(t)}function GV(e,t,n,r){Ob(e.x,t.x,n.x,r==null?void 0:r.x),Ob(e.y,t.y,n.y,r==null?void 0:r.y)}function Mb(e,t,n,r=0){const s=r?De(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+Et(t)}function Fd(e,t,n,r){Mb(e.x,t.x,n.x,r==null?void 0:r.x),Mb(e.y,t.y,n.y,r==null?void 0:r.y)}function Db(e,t,n,r,s){return e-=t,e=Ld(e,1/n,r),s!==void 0&&(e=Ld(e,1/s,r)),e}function YV(e,t=0,n=1,r=.5,s,i=e,o=e){if(mr.test(t)&&(t=parseFloat(t),t=De(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=De(i.min,i.max,r);e===i&&(l-=t),e.min=Db(e.min,t,n,l,s),e.max=Db(e.max,t,n,l,s)}function Ib(e,t,[n,r,s],i,o){YV(e,t[n],t[r],t[s],t.scale,i,o)}const JV=["x","scaleX","originX"],QV=["y","scaleY","originY"];function Lb(e,t,n,r){Ib(e.x,t,JV,n?n.x:void 0,r?r.x:void 0),Ib(e.y,t,QV,n?n.y:void 0,r?r.y:void 0)}function Fb(e){return e.translate===0&&e.scale===1}function VN(e){return Fb(e.x)&&Fb(e.y)}function $b(e,t){return e.min===t.min&&e.max===t.max}function XV(e,t){return $b(e.x,t.x)&&$b(e.y,t.y)}function Bb(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function WN(e,t){return Bb(e.x,t.x)&&Bb(e.y,t.y)}function Ub(e){return Et(e.x)/Et(e.y)}function Vb(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Xn(e){return[e("x"),e("y")]}function ZV(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:m,skewY:y}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const HN=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],e6=HN.length,Wb=e=>typeof e=="string"?parseFloat(e):e,Hb=e=>typeof e=="number"||q.test(e);function t6(e,t,n,r,s,i){s?(e.opacity=De(0,n.opacity??1,n6(r)),e.opacityExit=De(t.opacity??1,0,r6(r))):i&&(e.opacity=De(t.opacity??1,n.opacity??1,r));for(let o=0;o<e6;o++){const l=HN[o];let c=zb(t,l),u=zb(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Hb(c)===Hb(u)?(e[l]=Math.max(De(Wb(c),Wb(u),r),0),(mr.test(u)||mr.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=De(t.rotate||0,n.rotate||0,r))}function zb(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const n6=zN(0,.5,D_),r6=zN(.5,.95,pn);function zN(e,t,n){return r=>r<e?0:r>t?1:n(Jl(e,t,r))}function s6(e,t,n){const r=ht(e)?e:aa(e);return r.start(Cy("",r,t,n)),r.animation}function Zl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const i6=(e,t)=>e.depth-t.depth;class o6{constructor(){this.children=[],this.isDirty=!1}add(t){fy(this.children,t),this.isDirty=!0}remove(t){Ad(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(i6),this.isDirty=!1,this.children.forEach(t)}}function a6(e,t){const n=Nt.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ds(r),e(i-t))};return Te.setup(r,!0),()=>Ds(r)}function Hu(e){return ht(e)?e.get():e}class l6{constructor(){this.members=[]}add(t){fy(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(Ad(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Ad(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=t.options;(i===void 0||i!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const zu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},nm=["","X","Y","Z"],c6=1e3;let u6=0;function rm(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function qN(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=hN(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Te,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&qN(r)}function KN({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=u6++,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=()=>
vendor: 1,496 bytes, line 376
376{this.projectionUpdateScheduled=!1,this.nodes.forEach(f6),this.nodes.forEach(x6),this.nodes.forEach(w6),this.nodes.forEach(m6)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new o6)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new my),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Ay(o)&&!hV(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const f=()=>this.root.updateBlockedByResize=!1;Te.read(()=>{h=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,d&&d(),d=a6(f,250),zu.hasAnimatedSinceResize&&(zu.hasAnimatedSinceResize=!1,this.nodes.forEach(Gb)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:m})=>
vendor: 23,746 bytes, line 376
376{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||C6,{onLayoutAnimationStart:g,onLayoutAnimationComplete:b}=u.getProps(),x=!this.targetLayout||!WN(this.targetLayout,m),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...ky(y,"layout"),onPlay:g,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,v)}else h||Gb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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(),Ds(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(b6),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&&qN(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(g6),this.nodes.forEach(qb);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Kb);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(v6),this.nodes.forEach(y6),this.nodes.forEach(d6),this.nodes.forEach(h6)):this.nodes.forEach(Kb),this.clearAllSnapshots();const l=Nt.now();ct.delta=vr(0,1e3/60,l-ct.timestamp),ct.timestamp=l,ct.isProcessing=!0,Gf.update.process(ct),Gf.preRender.process(ct),Gf.render.process(ct),ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ty.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(p6),this.sharedNodes.forEach(S6)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Et(this.snapshot.measuredBox.x)&&!Et(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Ze()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!VN(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||ii(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),_6(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ze();const l=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(N6))){const{scroll:d}=this.root;d&&(sr(l.x,d.offset.x),sr(l.y,d.offset.y))}return l}removeElementScroll(o){var c;const l=Ze();if(kn(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&kn(l,o),sr(l.x,h.offset.x),sr(l.y,h.offset.y))}return l}applyTransform(o,l=!1,c){var d,h;const u=c||Ze();kn(u,o);for(let f=0;f<this.path.length;f++){const m=this.path[f];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(sr(u.x,-m.scroll.offset.x),sr(u.y,-m.scroll.offset.y)),ii(m.latestValues)&&Wu(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return ii(this.latestValues)&&Wu(u,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),u}removeTransform(o){var c;const l=Ze();kn(l,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!ii(d.latestValues))continue;let h;d.instance&&(yg(d.latestValues)&&d.updateSnapshot(),h=Ze(),kn(h,d.measurePageBox())),Lb(l,d.latestValues,(c=d.snapshot)==null?void 0:c.layoutBox,h)}return ii(this.latestValues)&&Lb(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ct.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=ct.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ze(),this.targetWithTransforms=Ze()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),GV(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):kn(this.target,this.layout.layoutBox),PN(this.target,this.targetDelta)):kn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||yg(this.parent.latestValues)||TN(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,l,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),Fd(this.relativeTargetOrigin,l,c,this.options.layoutAnchor||void 0),kn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var y;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ct.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;kn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;jV(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ze());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ab(this.prevProjectionDelta.x,this.projectionDelta.x),Ab(this.prevProjectionDelta.y,this.projectionDelta.y)),yl(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Vb(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vb(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Eo(),this.projectionDelta=Eo(),this.projectionDeltaWithTransform=Eo()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=Eo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=Ze(),m=c?c.source:void 0,y=this.layout?this.layout.source:void 0,g=m!==y,b=this.getStack(),x=!b||b.members.length<=1,v=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(k6));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const j=S/1e3;Yb(h.x,o.x,j),Yb(h.y,o.y,j),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fd(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),j6(this.relativeTarget,this.relativeTargetOrigin,f,j),w&&XV(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ze()),kn(w,this.relativeTarget)),g&&(this.animationValues=d,t6(d,u,this.latestValues,j,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ds(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Te.update(()=>{zu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=aa(0)),this.motionValue.jump(0,!1),this.currentAnimation=s6(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(c6),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&GN(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Ze();const h=Et(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=Et(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}kn(l,c),Wu(l,d),yl(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new l6),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&rm("z",o,u,this.animationValues);for(let d=0;d<nm.length;d++)rm(`rotate${nm[d]}`,o,u,this.animationValues),rm(`skew${nm[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Hu(l==null?void 0:l.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Hu(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!ii(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=ZV(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),o.transform=h;const{x:f,y:m}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const y in wg){if(d[y]===void 0)continue;const{correct:g,applyTo:b,isCSSVariable:x}=wg[y],v=h==="none"?d[y]:g(d[y],u);if(b){const w=b.length;for(let S=0;S<w;S++)o[b[S]]=v}else x?this.options.visualElement.renderState.vars[y]=v:o[y]=v}this.options.layoutId&&(o.pointerEvents=u===this?Hu(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(qb),this.root.sharedNodes.clear()}}}function d6(e){e.updateLayout()}function h6(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if(i==="size")Xn(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],m=Et(f);f.min=r[h].min,f.max=f.min+m});else if(i==="x"||i==="y"){const h=i==="x"?"y":"x";bg(o?t.measuredBox[h]:t.layoutBox[h],r[h])}else GN(i,t.layoutBox,r)&&Xn(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],m=Et(r[h]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=Eo();yl(l,r,t.layoutBox);const c=Eo();o?yl(c,e.applyTransform(s,!0),t.measuredBox):yl(c,r,t.layoutBox);const u=!VN(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:m}=h;if(f&&m){const y=e.options.layoutAnchor||void 0,g=Ze();Fd(g,t.layoutBox,f.layoutBox,y);const b=Ze();Fd(b,r,m.layoutBox,y),WN(g,b)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function f6(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function m6(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function p6(e){e.clearSnapshot()}function qb(e){e.clearMeasurements()}function g6(e){e.isLayoutDirty=!0,e.updateLayout()}function Kb(e){e.isLayoutDirty=!1}function v6(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function y6(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Gb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function x6(e){e.resolveTargetDelta()}function w6(e){e.calcProjection()}function b6(e){e.resetSkewAndRotation()}function S6(e){e.removeLeadSnapshot()}function Yb(e,t,n){e.translate=De(t.translate,0,n),e.scale=De(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Jb(e,t,n,r){e.min=De(t.min,n.min,r),e.max=De(t.max,n.max,r)}function j6(e,t,n,r){Jb(e.x,t.x,n.x,r),Jb(e.y,t.y,n.y,r)}function k6(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const C6={duration:.45,ease:[.4,0,.1,1]},Qb=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xb=Qb("applewebkit/")&&!Qb("chrome/")?Math.round:pn;function Zb(e){e.min=Xb(e.min),e.max=Xb(e.max)}function _6(e){Zb(e.x),Zb(e.y)}function GN(e,t,n){return e==="position"||e==="preserve-aspect"&&!KV(Ub(t),Ub(n),.2)}function N6(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const E6=KN({attachResizeListener:(e,t)=>Zl(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),sm={current:void 0},YN=KN({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!sm.current){const e=new E6({});e.mount(window),e.setOptions({layoutScroll:!0}),sm.current=e}return sm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),JN=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function T6(e=!0){const t=p.useContext(hy);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=p.useId();p.useEffect(()=>{if(e)return s(i)},[e]);const o=p.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const QN=p.createContext({strict:!1}),e1={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 t1=!1;function P6(){if(t1)return;const e={};for(const t in e1)e[t]={isEnabled:n=>e1[t].some(r=>!!n[r])};_N(e),t1=!0}function XN(){return P6(),xV()}function A6(e){const t=XN();for(const n in e)t[n]={...t[n],...e[n]};_N(t)}const R6=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function $d(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||R6.has(e)}let ZN=e=>!$d(e);function O6(e){typeof e=="function"&&(ZN=t=>t.startsWith("on")?!$d(t):e(t))}try{O6(require("@emotion/is-prop-valid").default)}catch{}function M6(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||ht(e[s])||(ZN(s)||n===!0&&$d(s)||!t&&!$d(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Mh=p.createContext({});function D6(e,t){if(Oh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Xl(n)?n:void 0,animate:Xl(r)?r:void 0}}return e.inherit!==!1?t:{}}function I6(e){const{initial:t,animate:n}=D6(e,p.useContext(Mh));return p.useMemo(()=>({initial:t,animate:n}),[n1(t),n1(n)])}function n1(e){return Array.isArray(e)?e.join(" "):e}const Iy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function eE(e,t,n){for(const r in t)!ht(t[r])&&!ON(r,n)&&(e[r]=t[r])}function L6({transformTemplate:e},t){return p.useMemo(()=>{const n=Iy();return My(n,t,e),Object.assign({},n.vars,n.style)},[t])}function F6(e,t){const n=e.style||{},r={};return eE(r,n,e),Object.assign(r,L6(e,t)),r}function $6(e,t){const n={},r=F6(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}
376`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const tE=()=>({...Iy(),attrs:{}});function B6(e,t,n,r){const s=p.useMemo(()=>{const i=tE();return MN(i,t,IN(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};eE(i,e.style,e),s.style={...i,...s.style}}return s}const U6=["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 Ly(e){return typeof e!="string"||e.includes("-")?!1:!!(U6.indexOf(e)>-1||/[A-Z]/u.test(e))}function V6(e,t,n,{latestValues:r},s,i=!1,o){const c=(o??Ly(e)?B6:$6)(t,r,s,e),u=M6(t,typeof e=="string",i),d=e!==p.Fragment?{...u,...c,ref:n}:{},{children:h}=t,f=p.useMemo(()=>ht(h)?h.get():h,[h]);return p.createElement(e,{...d,children:f})}function W6({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:H6(n,r,s,e),renderState:t()}}function H6(e,t,n,r){const s={},i=r(e,{});for(const f in i)s[f]=Hu(i[f]);let{initial:o,animate:l}=e;const c=Oh(e),u=kN(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?l:o;if(h&&typeof h!="boolean"&&!Rh(h)){const f=Array.isArray(h)?h:[h];for(let m=0;m<f.length;m++){const y=_y(e,f[m]);if(y){const{transitionEnd:g,transition:b,...x}=y;for(const v in x){let w=x[v];if(Array.isArray(w)){const S=d?w.length-1:0;w=w[S]}w!==null&&(s[v]=w)}for(const v in g)s[v]=g[v]}}}return s}const nE=e=>(t,n)=>{const r=p.useContext(Mh),s=p.useContext(hy),i=()=>W6(e,t,r,s);return n?i():U5(i)},z6=nE({scrapeMotionValuesFromProps:Dy,createRenderState:Iy}),q6=nE({scrapeMotionValuesFromProps:LN,createRenderState:tE}),K6=Symbol.for("motionComponentSymbol");function G6(e,t,n){const r=p.useRef(n);p.useInsertionEffect(()=>{r.current=n});const s=p.useRef(null);return p.useCallback(i=>{var l;i&&((l=e.onMount)==null||l.call(e,i));const o=r.current;if(typeof o=="function")if(i){const c=o(i);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i);t&&(i?t.mount(i):t.unmount())},[t])}const rE=p.createContext({});function ho(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Y6(e,t,n,r,s,i){var w,S;const{visualElement:o}=p.useContext(Mh),l=p.useContext(QN),c=p.useContext(hy),u=p.useContext(JN),d=u.reducedMotion,h=u.skipAnimations,f=p.useRef(null),m=p.useRef(!1);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:i}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const y=f.current,g=p.useContext(rE);y&&!y.projection&&s&&(y.type==="html"||y.type==="svg")&&J6(f.current,n,s,g);const b=p.useRef(!1);p.useInsertionEffect(()=>{y&&b.current&&y.update(n,c)});const x=n[dN],v=p.useRef(!!x&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,x))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,x)));return W5(()=>{m.current=!0,y&&(b.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),v.current&&y.animationState&&y.animationState.animateChanges())}),p.useEffect(()=>{y&&(!v.current&&y.animationState&&y.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)==null||j.call(window,x)}),v.current=!1),y.enteringChildren=void 0)}),y}function J6(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:sE(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||l&&ho(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function sE(e){if(e)return e.options.allowProjection!==!1?e.projection:sE(e.parent)}function im(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&A6(r);const i=n?n==="svg":Ly(e),o=i?q6:z6;function l(u,d){let h;const f={...p.useContext(JN),...u,layoutId:Q6(u)},{isStatic:m}=f,y=I6(u),g=o(u,m);if(!m&&typeof window<"u"){X6();const b=Z6(f);h=b.MeasureLayout,y.visualElement=Y6(e,g,f,s,b.ProjectionNode,i)}return a.jsxs(Mh.Provider,{value:y,children:[h&&y.visualElement?a.jsx(h,{visualElement:y.visualElement,...f}):null,V6(e,u,G6(g,y.visualElement,d),g,m,t,i)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=p.forwardRef(l);return c[K6]=e,c}function Q6({layoutId:e}){const t=p.useContext(j_).id;return t&&e!==void 0?t+"-"+e:e}function X6(e,t){p.useContext(QN).strict}function Z6(e){const t=XN(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}
vendor: 18,495 bytes, line 376
376function e8(e,t){if(typeof Proxy>"u")return im;const n=new Map,r=(i,o)=>im(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,im(o,void 0,e,t)),n.get(o))})}const t8=(e,t)=>t.isSVG??Ly(e)?new IV(t):new PV(t,{allowProjection:e!==p.Fragment});class n8 extends Vs{constructor(t){super(t),t.animationState||(t.animationState=UV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Rh(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let r8=0;class s8 extends Vs{constructor(){super(...arguments),this.id=r8++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:l}=this.node.getProps();if(typeof o=="string"){const c=ki(this.node,o,l);if(c){const{transition:u,transitionEnd:d,...h}=c;for(const f in h)(i=this.node.getValue(f))==null||i.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const i8={animation:{Feature:n8},exit:{Feature:s8}};function wc(e){return{point:{x:e.pageX,y:e.pageY}}}const o8=e=>t=>Py(t)&&e(t,wc(t));function xl(e,t,n,r){return Zl(e,t,o8(n),r)}const iE=({current:e})=>e?e.ownerDocument.defaultView:null,r1=(e,t)=>Math.abs(e-t);function a8(e,t){const n=r1(e.x,t.x),r=r1(e.y,t.y);return Math.sqrt(n**2+r**2)}const s1=new Set(["auto","scroll"]);class oE{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=hu(this.lastRawMoveEventInfo,this.transformPagePoint));const m=om(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,g=a8(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!g)return;const{point:b}=m,{timestamp:x}=ct;this.history.push({...b,timestamp:x});const{onStart:v,onMove:w}=this.handlers;y||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,y)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=y,this.lastMoveEventInfo=hu(y,this.transformPagePoint),Te.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:g,onSessionEnd:b,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=om(m.type==="pointercancel"?this.lastMoveEventInfo:hu(y,this.transformPagePoint),this.history);this.startEvent&&g&&g(m,v),b&&b(m,v)},!Py(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const c=wc(t),u=hu(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=ct;this.history=[{...d,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,om(u,this.history)),this.removeListeners=vc(xl(this.contextWindow,"pointermove",this.handlePointerMove),xl(this.contextWindow,"pointerup",this.handlePointerUp),xl(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(s1.has(r.overflowX)||s1.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),Te.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ds(this.updatePoint)}}function hu(e,t){return t?{point:t(e.point)}:e}function i1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function om({point:e},t){return{point:e,delta:i1(e,aE(t)),offset:i1(e,l8(t)),velocity:c8(t,.1)}}function l8(e){return e[0]}function aE(e){return e[e.length-1]}function c8(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=aE(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Wt(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>Wt(t)*2&&(r=e[1]);const i=fn(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 u8(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?De(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?De(n,e,r.max):Math.min(e,n)),e}function o1(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function d8(e,{top:t,left:n,bottom:r,right:s}){return{x:o1(e.x,n,s),y:o1(e.y,t,r)}}function a1(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function h8(e,t){return{x:a1(e.x,t.x),y:a1(e.y,t.y)}}function f8(e,t){let n=.5;const r=Et(e),s=Et(t);return s>r?n=Jl(t.min,t.max-r,e.min):r>s&&(n=Jl(e.min,e.max-s,t.min)),vr(0,1,n)}function m8(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Sg=.35;function p8(e=Sg){return e===!1?e=0:e===!0&&(e=Sg),{x:l1(e,"left","right"),y:l1(e,"top","bottom")}}function l1(e,t,n){return{min:c1(e,t),max:c1(e,n)}}function c1(e,t){return typeof e=="number"?e:e[t]||0}const g8=new WeakMap;class v8{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ze(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=h=>{n&&this.snapToCursor(wc(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:m,dragPropagation:y,onDragStart:g}=this.getProps();if(m&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=YU(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xn(x=>{let v=this.getAxisMotionValue(x).get()||0;if(mr.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[x];S&&(v=Et(S)*(parseFloat(v)/100))}}this.originPoint[x]=v}),g&&Te.update(()=>g(h,f),!1,!0),fg(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:y,onDirectionLock:g,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:x}=f;if(y&&this.currentDirection===null){this.currentDirection=x8(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),b&&Te.update(()=>b(h,f),!1,!0)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new oE(t,{onSessionStart:i,onStart:o,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:iE(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&Te.postRender(()=>l(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!fu(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=u8(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&ho(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=d8(r.layoutBox,t):this.constraints=!1,this.elastic=p8(n),s!==this.constraints&&!ho(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Xn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=m8(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ho(t))return!1;const r=t.current;ia(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=kV(r,s.root,this.visualElement.getTransformPagePoint());let o=h8(s.layout.layoutBox,i);if(n){const l=n(bV(o));this.hasMutatedConstraints=!!l,l&&(o=EN(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Xn(d=>{if(!fu(d,n,this.currentDirection))return;let h=c&&c[d]||{};(o===!0||o===d)&&(h={min:0,max:0});const f=s?200:1e6,m=s?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,y)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return fg(this.visualElement,t),r.start(Cy(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xn(n=>{const{drag:r}=this.getProps();if(!fu(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[n],c=i.get()||0;i.set(t[n]-De(o,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ho(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Xn(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();s[o]=f8({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Xn(o=>{if(!fu(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(De(c,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;g8.set(this.visualElement,this);const t=this.visualElement.current,n=xl(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps(),f=u.target,m=f!==t&&tV(f);d&&h&&!m&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();ho(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=y8(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Te.read(s);const l=Zl(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Xn(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),c&&c(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Sg,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function u1(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function y8(e,t,n){const r=xb(e,u1(n)),s=xb(t,u1(n));return()=>{r(),s()}}function fu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function x8(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class w8 extends Vs{constructor(t){super(t),this.removeGroupControls=pn,this.removeListeners=pn,this.controls=new v8(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const am=e=>(t,n)=>{e&&Te.update(()=>e(t,n),!1,!0)};class b8 extends Vs{constructor(){super(...arguments),this.removePointerDownListener=pn}onPointerDown(t){this.session=new oE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:am(t),onStart:am(n),onMove:am(r),onEnd:(i,o)=>{delete this.session,s&&Te.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=xl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let lm=!1;class S8 extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),lm&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),zu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),lm=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||Te.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Ty.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;lm=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function lE(e){const[t,n]=T6(),r=p.useContext(j_);return a.jsx(S8,{...e,layoutGroup:r,switchLayoutGroup:p.useContext(rE),isPresent:t,safeToRemove:n})}const j8={pan:{Feature:b8},drag:{Feature:w8,ProjectionNode:YN,MeasureLayout:lE}};function d1(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&Te.postRender(()=>i(t,wc(t)))}class k8 extends Vs{mount(){const{current:t}=this.node;t&&(this.unmount=QU(t,(n,r)=>(d1(this.node,r,"Start"),s=>d1(this.node,s,"End"))))}unmount(){}}class C8 extends Vs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=vc(Zl(this.node.current,"focus",()=>this.onFocus()),Zl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function h1(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&Te.postRender(()=>i(t,wc(t)))}class _8 extends Vs{mount(){const{current:t}=this.node;if(!t)return;
376const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=rV(t,(s,i)=>(h1(this.node,i,"Start"),(o,{success:l})=>h1(this.node,o,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const jg=new WeakMap,cm=new WeakMap,N8=e=>{const t=jg.get(e.target);t&&t(e)},E8=e=>{e.forEach(N8)};function T8({root:e,...t}){const n=e||document;cm.has(n)||cm.set(n,{});const r=cm.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(E8,{root:e,...t})),r[s]}function P8(e,t,n){const r=T8(t);return jg.set(e,n),r.observe(e),()=>{jg.delete(e),r.unobserve(e)}}const A8={some:0,all:1};class R8 extends Vs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:A8[s]},l=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),m=d?h:f;m&&m(u)};this.stopObserver=P8(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(O8(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function O8({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const M8={inView:{Feature:R8},tap:{Feature:_8},focus:{Feature:C8},hover:{Feature:k8}},D8={layout:{ProjectionNode:YN,MeasureLayout:lE}},I8={...i8,...M8,...j8,...D8},Mn=e8(I8,t8),kg=hh("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"}}),J=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?E2:"button";return a.jsx(o,{className:ee(kg({variant:t,size:n,className:e})),ref:i,...s})});J.displayName="Button";const ut=p.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ee("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ut.displayName="Card";const or=p.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ee("flex flex-col space-y-1.5 p-6",e),...t}));or.displayName="CardHeader";const ar=p.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:ee("text-2xl font-semibold leading-none tracking-tight",e),...t}));ar.displayName="CardTitle";const L8=p.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:ee("text-sm text-muted-foreground",e),...t}));L8.displayName="CardDescription";const dt=p.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ee("p-6 pt-0",e),...t}));dt.displayName="CardContent";const F8=p.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:ee("flex items-center p-6 pt-0",e),...t}));F8.displayName="CardFooter";const $8=()=>a.jsx("div",{className:"bg-pharmacy-dark text-primary-foreground text-sm py-2.5 px-4",children:a.jsxs("div",{className:"container flex flex-wrap justify-center md:justify-between items-center gap-4 text-xs md:text-sm",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Bv,{className:"h-3.5 w-3.5"}),"UK Registered Pharmacy"]}),a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(zk,{className:"h-3.5 w-3.5"}),"Free Delivery on orders over £40"]})]})}),z=p.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:ee("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));z.displayName="Input";var B8=p.createContext(void 0);function Dh(e){const t=p.useContext(B8);return e||t||"ltr"}var um=0;function Ih(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??f1()),document.body.insertAdjacentElement("beforeend",e[1]??f1()),um++,
vendor: 4,987 bytes, line 376
376()=>{um===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),um--}},[])}function f1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var dm="focusScope.autoFocusOnMount",hm="focusScope.autoFocusOnUnmount",m1={bubbles:!1,cancelable:!0},U8="FocusScope",bc=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[l,c]=p.useState(null),u=zt(s),d=zt(i),h=p.useRef(null),f=fe(t,g=>c(g)),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let g=function(w){if(m.paused||!l)return;const S=w.target;l.contains(S)?h.current=S:ts(h.current,{select:!0})},b=function(w){if(m.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||ts(h.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&ts(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const v=new MutationObserver(x);return l&&v.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),v.disconnect()}}},[r,l,m.paused]),p.useEffect(()=>{if(l){g1.add(m);const g=document.activeElement;if(!l.contains(g)){const x=new CustomEvent(dm,m1);l.addEventListener(dm,u),l.dispatchEvent(x),x.defaultPrevented||(V8(K8(cE(l)),{select:!0}),document.activeElement===g&&ts(l))}return()=>{l.removeEventListener(dm,u),setTimeout(()=>{const x=new CustomEvent(hm,m1);l.addEventListener(hm,d),l.dispatchEvent(x),x.defaultPrevented||ts(g??document.body,{select:!0}),l.removeEventListener(hm,d),g1.remove(m)},0)}}},[l,u,d,m]);const y=p.useCallback(g=>{if(!n&&!r||m.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(b&&x){const v=g.currentTarget,[w,S]=W8(v);w&&S?!g.shiftKey&&x===S?(g.preventDefault(),n&&ts(w,{select:!0})):g.shiftKey&&x===w&&(g.preventDefault(),n&&ts(S,{select:!0})):x===v&&g.preventDefault()}},[n,r,m.paused]);return a.jsx(se.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});bc.displayName=U8;function V8(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ts(r,{select:t}),document.activeElement!==n)return}function W8(e){const t=cE(e),n=p1(t,e),r=p1(t.reverse(),e);return[n,r]}function cE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function p1(e,t){for(const n of e)if(!H8(n,{upTo:t}))return n}function H8(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function z8(e){return e instanceof HTMLInputElement&&"select"in e}function ts(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&z8(e)&&t&&e.select()}}var g1=q8();function q8(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=v1(e,t),e.unshift(t)},remove(t){var n;e=v1(e,t),(n=e[0])==null||n.resume()}}}function v1(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function K8(e){return e.filter(t=>t.tagName!=="A")}var fm="rovingFocusGroup.onEntryFocus",G8={bubbles:!1,cancelable:!0},Sc="RovingFocusGroup",[Cg,uE,Y8]=ch(Sc),[J8,Lh]=sn(Sc,[Y8]),[Q8,X8]=J8(Sc),dE=p.forwardRef((e,t)=>a.jsx(Cg.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Cg.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Z8,{...e,ref:t})})}));dE.displayName=Sc;var Z8=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=p.useRef(null),m=fe(t,f),y=Dh(i),[g,b]=pr({prop:o,defaultProp:l??null,onChange:c,caller:Sc}),[x,v]=p.useState(!1),w=zt(u),S=uE(n),j=p.useRef(!1),[k,_]=p.useState(0);return p.useEffect(()=>{const E=f.current;if(E)return E.addEventListener(fm,w),()=>E.removeEventListener(fm,w)},[w]),a.jsx(Q8,{scope:n,orientation:r,dir:y,loop:s,currentTabStopId:g,onItemFocus:p.useCallback(E=>b(E),[b]),onItemShiftTab:p.useCallback(()=>v(!0),[]),onFocusableItemAdd:p.useCallback(()=>_(E=>E+1),[]),onFocusableItemRemove:p.useCallback(()=>_(E=>E-1),[]),children:a.jsx(se.div,{tabIndex:x||k===0?-1:0,"data-orientation":r,...h,ref:m,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,()=>{j.current=!0}),onFocus:B(e.onFocus,E=>{const P=!j.current;if(E.target===E.currentTarget&&P&&!x){const T=new CustomEvent(fm,G8);if(E.currentTarget.dispatchEvent(T),!T.defaultPrevented){const F=S().filter($=>$.focusable),D=F.find($=>$.active),G=F.find($=>
vendor: 8,944 bytes, lines 376-391
376$.id===g),Y=[D,G,...F].filter(Boolean).map($=>$.ref.current);mE(Y,d)}}j.current=!1}),onBlur:B(e.onBlur,()=>v(!1))})})}),hE="RovingFocusGroupItem",fE=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,children:o,...l}=e,c=$n(),u=i||c,d=X8(hE,n),h=d.currentTabStopId===u,f=uE(n),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:g}=d;return p.useEffect(()=>{if(r)return m(),()=>y()},[r,m,y]),a.jsx(Cg.ItemSlot,{scope:n,id:u,focusable:r,active:s,children:a.jsx(se.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:B(e.onMouseDown,b=>{r?d.onItemFocus(u):b.preventDefault()}),onFocus:B(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:B(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=nW(b,d.orientation,d.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=f().filter(S=>S.focusable).map(S=>S.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const S=w.indexOf(b.currentTarget);w=d.loop?rW(w,S+1):w.slice(S+1)}setTimeout(()=>mE(w))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:g!=null}):o})})});fE.displayName=hE;var eW={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tW(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function nW(e,t,n){const r=tW(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return eW[r]}function mE(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function rW(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var pE=dE,gE=fE,sW=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},no=new WeakMap,mu=new WeakMap,pu={},mm=0,vE=function(e){return e&&(e.host||vE(e.parentNode))},iW=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=vE(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},oW=function(e,t,n,r){var s=iW(t,Array.isArray(e)?e:[e]);pu[n]||(pu[n]=new WeakMap);var i=pu[n],o=[],l=new Set,c=new Set(s),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(l.has(f))d(f);else try{var m=f.getAttribute(r),y=m!==null&&m!=="false",g=(no.get(f)||0)+1,b=(i.get(f)||0)+1;no.set(f,g),i.set(f,b),o.push(f),g===1&&y&&mu.set(f,!0),b===1&&f.setAttribute(n,"true"),y||f.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",f,x)}})};return d(t),l.clear(),mm++,function(){o.forEach(function(h){var f=no.get(h)-1,m=i.get(h)-1;no.set(h,f),i.set(h,m),f||(mu.has(h)||h.removeAttribute(r),mu.delete(h)),m||h.removeAttribute(n)}),mm--,mm||(no=new WeakMap,no=new WeakMap,mu=new WeakMap,pu={})}},Fh=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=sW(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),oW(r,s,n,"aria-hidden")):function(){return null}},lr=function(){return lr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},lr.apply(this,arguments)};function yE(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function aW(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var qu="right-scroll-bar-position",Ku="width-before-scroll-bar",lW="with-scroll-bars-hidden",cW="--removed-body-scroll-bar-size";function pm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function uW(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var dW=typeof window<"u"?p.useLayoutEffect:p.useEffect,y1=new WeakMap;function hW(e,t){var n=uW(null,function(r){return e.forEach(function(s){return pm(s,r)})});return dW(function(){var r=y1.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;s.forEach(function(l){i.has(l)||pm(l,null)}),i.forEach(function(l){s.has(l)||pm(l,o)})}y1.set(n,e)},[e]),n}function fW(e){return e}function mW(e,t){t===void 0&&(t=fW);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(i),o=n}var c=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function pW(e){e===void 0&&(e={});var t=mW(null);return t.options=lr({async:!0,ssr:!1},e),t}var xE=function(e){var t=e.sideCar,n=yE(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,lr({},n))};xE.isSideCarExport=!0;function gW(e,t){return e.useMedium(t),xE}var wE=pW(),gm=function(){},$h=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:gm,onWheelCapture:gm,onTouchMoveCapture:gm}),s=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,m=e.noRelative,y=e.noIsolation,g=e.inert,b=e.allowPinchZoom,x=e.as,v=x===void 0?"div":x,w=e.gapMode,S=yE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=f,k=hW([n,t]),_=lr(lr({},S),s);return p.createElement(p.Fragment,null,d&&p.createElement(j,{sideCar:wE,removeScrollBar:u,shards:h,noRelative:m,noIsolation:y,inert:g,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:w}),o?p.cloneElement(p.Children.only(l),lr(lr({},_),{ref:k})):p.createElement(v,lr({},_,{className:c,ref:k}),l))});$h.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$h.classNames={fullWidth:Ku,zeroRight:qu};var vW=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function yW(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vW();return t&&e.setAttribute("nonce",t),e}function xW(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wW(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bW=function(){var e=0,t=null;return{add:function(n){e==0&&(t=yW())&&(xW(t,n),wW(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},SW=function(){var e=bW();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bE=function(){var e=SW(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},jW={left:0,top:0,right:0,gap:0},vm=function(e){return parseInt(e||"",10)||0},kW=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[vm(n),vm(r),vm(s)]},CW=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return jW;var t=kW(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},_W=bE(),Bo="data-scroll-locked",NW=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
377  .`.concat(lW,` {
378   overflow: hidden `).concat(r,`;
379   padding-right: `).concat(l,"px ").concat(r,`;
380  }
381  body[`).concat(Bo,`] {
382    overflow: hidden `).concat(r,`;
383    overscroll-behavior: contain;
384    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
385    padding-left: `.concat(s,`px;
386    padding-top: `).concat(i,`px;
387    padding-right: `).concat(o,`px;
388    margin-left:0;
389    margin-top:0;
390    margin-right: `).concat(l,"px ").concat(r,`;
391    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
391")].filter(Boolean).join(""),`
392  }
393  
394  .`).concat(qu,` {
395    right: `).concat(l,"px ").concat(r,`;
396  }
397  
398  .`).concat(Ku,` {
399    margin-right: `).concat(l,"px ").concat(r,`;
400  }
401  
402  .`).concat(qu," .").concat(qu,` {
403    right: 0 `).concat(r,`;
404  }
405  
406  .`).concat(Ku," .").concat(Ku,` {
407    margin-right: 0 `).concat(r,`;
408  }
409  
410  body[`).concat(Bo,`] {
411    `).concat(cW,": ").concat(l,`px;
412  }
413`)},x1=function(){var e=parseInt(document.body.getAttribute(Bo)||"0",10);return isFinite(e)?e:0},EW=function(){p.useEffect(function(){return document.body.setAttribute(Bo,(x1()+1).toString()),function(){var e=x1()-1;e<=0?document.body.removeAttribute(Bo):document.body.setAttribute(Bo,e.toString())}},[])},TW=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;EW();var i=p.useMemo(function(){return CW(s)},[s]);return p.createElement(_W,{styles:NW(i,!t,s,n?"":"!important")})},_g=!1;if(typeof window<"u")try{var gu=Object.defineProperty({},"passive",{get:function(){return _g=!0,!0}});window.addEventListener("test",gu,gu),window.removeEventListener("test",gu,gu)}catch{_g=!1}var ro=_g?{passive:!1}:!1,PW=function(e){return e.tagName==="TEXTAREA"},SE=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!PW(e)&&n[t]==="visible")},AW=function(e){return SE(e,"overflowY")},RW=function(e){return SE(e,"overflowX")},w1=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=jE(e,r);if(s){var i=kE(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},OW=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},MW=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},jE=function(e,t){return e==="v"?AW(t):RW(t)},kE=function(e,t){return e==="v"?OW(t):MW(t)},DW=function(e,t){return e==="h"&&t==="rtl"?-1:1},IW=function(e,t,n,r,s){var i=DW(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,f=0;do{if(!l)break;var m=kE(e,l),y=m[0],g=m[1],b=m[2],x=g-b-i*y;(y||x)&&jE(e,l)&&(h+=x,f+=y);var v=l.parentNode;l=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},vu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},b1=function(e){return[e.deltaX,e.deltaY]},S1=function(e){return e&&"current"in e?e.current:e},LW=function(e,t){return e[0]===t[0]&&e[1]===t[1]},FW=function(e){return`
414  .block-interactivity-`.concat(e,` {pointer-events: none;}
415  .allow-interactivity-`).concat(e,` {pointer-events: all;}
416`)},$W=0,so=[];function BW(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),s=p.useState($W++)[0],i=p.useState(bE)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=aW([e.lockRef.current],(e.shards||[]).map(S1),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=p.useCallback(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var x=vu(g),v=n.current,w="deltaX"in g?g.deltaX:v[0]-x[0],S="deltaY"in g?g.deltaY:v[1]-x[1],j,k=g.target,_=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in g&&_==="h"&&k.type==="range")return!1;var E=w1(_,k);if(!E)return!0;if(E?j=_:(j=_==="v"?"h":"v",E=w1(_,k)),!E)return!1;if(!r.current&&"changedTouches"in g&&(w||S)&&(r.current=j),!j)return!0;var P=r.current||j;return IW(P,b,g,P==="h"?w:S,!0)},[]),c=p.useCallback(function(g){var b=g;if(!(!so.length||so[so.length-1]!==i)){var x="deltaY"in b?b1(b):vu(b),v=t.current.filter(function(j){return j.name===b.type&&(j.target===b.target||b.target===j.shadowParent)&&LW(j.delta,x)})[0];if(v&&v.should){b.cancelable&&b.preventDefault();return}
vendor: 15,531 bytes, line 416
416if(!v){var w=(o.current.shards||[]).map(S1).filter(Boolean).filter(function(j){return j.contains(b.target)}),S=w.length>0?l(b,w[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=p.useCallback(function(g,b,x,v){var w={name:g,delta:b,target:x,should:v,shadowParent:UW(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=p.useCallback(function(g){n.current=vu(g),r.current=void 0},[]),h=p.useCallback(function(g){u(g.type,b1(g),g.target,l(g,e.lockRef.current))},[]),f=p.useCallback(function(g){u(g.type,vu(g),g.target,l(g,e.lockRef.current))},[]);p.useEffect(function(){return so.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,ro),document.addEventListener("touchmove",c,ro),document.addEventListener("touchstart",d,ro),function(){so=so.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,ro),document.removeEventListener("touchmove",c,ro),document.removeEventListener("touchstart",d,ro)}},[]);var m=e.removeScrollBar,y=e.inert;return p.createElement(p.Fragment,null,y?p.createElement(i,{styles:FW(s)}):null,m?p.createElement(TW,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function UW(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const VW=gW(wE,BW);var jc=p.forwardRef(function(e,t){return p.createElement($h,lr({},e,{ref:t,sideCar:VW}))});jc.classNames=$h.classNames;var Ng=["Enter"," "],WW=["ArrowDown","PageUp","Home"],CE=["ArrowUp","PageDown","End"],HW=[...WW,...CE],zW={ltr:[...Ng,"ArrowRight"],rtl:[...Ng,"ArrowLeft"]},qW={ltr:["ArrowLeft"],rtl:["ArrowRight"]},kc="Menu",[ec,KW,GW]=ch(kc),[Vi,_E]=sn(kc,[GW,Bs,Lh]),Bh=Bs(),NE=Lh(),[YW,Wi]=Vi(kc),[JW,Cc]=Vi(kc),EE=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:i,modal:o=!0}=e,l=Bh(t),[c,u]=p.useState(null),d=p.useRef(!1),h=zt(i),f=Dh(s);return p.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),a.jsx(ey,{...l,children:a.jsx(YW,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:a.jsx(JW,{scope:t,onClose:p.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:f,modal:o,children:r})})})};EE.displayName=kc;var QW="MenuAnchor",Fy=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Bh(n);return a.jsx(pc,{...s,...r,ref:t})});Fy.displayName=QW;var $y="MenuPortal",[XW,TE]=Vi($y,{forceMount:void 0}),PE=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,i=Wi($y,t);return a.jsx(XW,{scope:t,forceMount:n,children:a.jsx(qt,{present:n||i.open,children:a.jsx(fa,{asChild:!0,container:s,children:r})})})};PE.displayName=$y;var gn="MenuContent",[ZW,By]=Vi(gn),AE=p.forwardRef((e,t)=>{const n=TE(gn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=Wi(gn,e.__scopeMenu),o=Cc(gn,e.__scopeMenu);return a.jsx(ec.Provider,{scope:e.__scopeMenu,children:a.jsx(qt,{present:r||i.open,children:a.jsx(ec.Slot,{scope:e.__scopeMenu,children:o.modal?a.jsx(eH,{...s,ref:t}):a.jsx(tH,{...s,ref:t})})})})}),eH=p.forwardRef((e,t)=>{const n=Wi(gn,e.__scopeMenu),r=p.useRef(null),s=fe(t,r);return p.useEffect(()=>{const i=r.current;if(i)return Fh(i)},[]),a.jsx(Uy,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),tH=p.forwardRef((e,t)=>{const n=Wi(gn,e.__scopeMenu);return a.jsx(Uy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),nH=As("MenuContent.ScrollLock"),Uy=p.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:m,disableOutsideScroll:y,...g}=e,b=Wi(gn,n),x=Cc(gn,n),v=Bh(n),w=NE(n),S=KW(n),[j,k]=p.useState(null),_=p.useRef(null),E=fe(t,_,b.onContentChange),P=p.useRef(0),T=p.useRef(""),F=p.useRef(0),D=p.useRef(null),G=p.useRef("right"),M=p.useRef(0),Y=y?jc:p.Fragment,$=y?{as:nH,allowPinchZoom:!0}:void 0,O=N=>{var U,we;const I=T.current+N,V=S().filter(be=>!be.disabled),W=document.activeElement,le=(U=V.find(be=>be.ref.current===W))==null?void 0:U.textValue,ae=V.map(be=>be.textValue),_e=mH(ae,I,le),Ne=(we=V.find(be=>be.textValue===_e))==null?void 0:we.ref.current;(function be(pe){T.current=pe,window.clearTimeout(P.current),pe!==""&&(P.current=window.setTimeout(()=>be(""),1e3))})(I),Ne&&setTimeout(()=>Ne.focus())};p.useEffect(()=>()=>window.clearTimeout(P.current),[]),Ih();const C=p.useCallback(N=>{var V,W;return G.current===((V=D.current)==null?void 0:V.side)&&gH(N,(W=D.current)==null?void 0:W.area)},[]);return a.jsx(ZW,{scope:n,searchRef:T,onItemEnter:p.useCallback(N=>{C(N)&&N.preventDefault()},[C]),onItemLeave:p.useCallback(N=>{var I;C(N)||((I=_.current)==null||I.focus(),k(null))},[C]),onTriggerLeave:p.useCallback(N=>{C(N)&&N.preventDefault()},[C]),pointerGraceTimerRef:F,onPointerGraceIntentChange:p.useCallback(N=>{D.current=N},[]),children:a.jsx(Y,{...$,children:a.jsx(bc,{asChild:!0,trapped:s,onMountAutoFocus:B(i,N=>{var I;N.preventDefault(),(I=_.current)==null||I.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:a.jsx(Bi,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:m,children:a.jsx(pE,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:j,onCurrentTabStopIdChange:k,onEntryFocus:B(c,N=>{x.isUsingKeyboardRef.current||N.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(yh,{role:"menu","aria-orientation":"vertical","data-state":KE(b.open),"data-radix-menu-content":"",dir:x.dir,...v,...g,ref:E,style:{outline:"none",...g.style},onKeyDown:B(g.onKeyDown,N=>{const V=N.target.closest("[data-radix-menu-content]")===N.currentTarget,W=N.ctrlKey||N.altKey||N.metaKey,le=N.key.length===1;V&&(N.key==="Tab"&&N.preventDefault(),!W&&le&&O(N.key));const ae=_.current;if(N.target!==ae||!HW.includes(N.key))return;N.preventDefault();const Ne=S().filter(U=>!U.disabled).map(U=>U.ref.current);CE.includes(N.key)&&Ne.reverse(),hH(Ne)}),onBlur:B(e.onBlur,N=>{N.currentTarget.contains(N.target)||(window.clearTimeout(P.current),T.current="")}),onPointerMove:B(e.onPointerMove,tc(N=>{const I=N.target,V=M.current!==N.clientX;if(N.currentTarget.contains(I)&&V){const W=N.clientX>M.current?"right":"left";G.current=W,M.current=N.clientX}}))})})})})})})});AE.displayName=gn;var rH="MenuGroup",Vy=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(se.div,{role:"group",...r,ref:t})});Vy.displayName=rH;var sH="MenuLabel",RE=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(se.div,{...r,ref:t})});RE.displayName=sH;var Bd="MenuItem",j1="menu.itemSelect",Uh=p.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,i=p.useRef(null),o=Cc(Bd,e.__scopeMenu),l=By(Bd,e.__scopeMenu),c=fe(t,i),u=p.useRef(!1),d=()=>{const h=i.current;if(!n&&h){const f=new CustomEvent(j1,{bubbles:!0,cancelable:!0});h.addEventListener(j1,m=>r==null?void 0:r(m),{once:!0}),Ov(h,f),f.defaultPrevented?u.current=!1:o.onClose()}};return a.jsx(OE,{...s,ref:c,disabled:n,onClick:B(e.onClick,d),onPointerDown:h=>{var f;(f=e.onPointerDown)==null||f.call(e,h),u.current=!0},onPointerUp:B(e.onPointerUp,h=>{var f;u.current||(f=h.currentTarget)==null||f.click()}),onKeyDown:B(e.onKeyDown,h=>{const f=l.searchRef.current!=="";n||f&&h.key===" "||Ng.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Uh.displayName=Bd;var OE=p.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...i}=e,o=By(Bd,n),l=NE(n),c=p.useRef(null),u=fe(t,c),[d,h]=p.useState(!1),[f,m]=p.useState("");return p.useEffect(()=>{const y=c.current;y&&m((y.textContent??"").trim())},[i.children]),a.jsx(ec.ItemSlot,{scope:n,disabled:r,textValue:s??f,children:a.jsx(gE,{asChild:!0,...l,focusable:!r,children:a.jsx(se.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:B(e.onPointerMove,tc(y=>{r?o.onItemLeave(y):(o.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,tc(y=>o.onItemLeave(y))),onFocus:B(e.onFocus,()=>h(!0)),onBlur:B(e.onBlur,()=>h(!1))})})})}),iH="MenuCheckboxItem",ME=p.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return a.jsx($E,{scope:e.__scopeMenu,checked:n,children:a.jsx(Uh,{role:"menuitemcheckbox","aria-checked":Ud(n)?"mixed":n,...s,ref:t,"data-state":Hy(n),onSelect:B(s.onSelect,()=>r==null?void 0:r(Ud(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ME.displayName=iH;var DE="MenuRadioGroup",[oH,aH]=Vi(DE,{value:void 0,onValueChange:()=>{}}),IE=p.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,i=zt(r);return a.jsx(oH,{scope:e.__scopeMenu,value:n,onValueChange:i,children:a.jsx(Vy,{...s,ref:t})})});IE.displayName=DE;var LE="MenuRadioItem",FE=p.forwardRef((e,t)=>{const{value:n,...r}=e,s=aH(LE,e.__scopeMenu),i=n===s.value;return a.jsx($E,{scope:e.__scopeMenu,checked:i,children:a.jsx(Uh,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":Hy(i),onSelect:B(r.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,n)},{checkForDefaultPrevented:!1})})})});FE.displayName=LE;var Wy="MenuItemIndicator",[$E,lH]=Vi(Wy,{checked:!1}),BE=p.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,i=lH(Wy,n);return a.jsx(qt,{present:r||Ud(i.checked)||i.checked===!0,children:a.jsx(se.span,{...s,ref:t,"data-state":Hy(i.checked)})})});BE.displayName=Wy;var cH="MenuSeparator",UE=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(se.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});UE.displayName=cH;var uH="MenuArrow",VE=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Bh(n);return a.jsx(xh,{...s,...r,ref:t})});VE.displayName=uH;var dH="MenuSub",[GG,WE]=Vi(dH),tl="MenuSubTrigger",HE=p.forwardRef((e,t)=>{const n=Wi(tl,e.__scopeMenu),r=Cc(tl,e.__scopeMenu),s=WE(tl,e.__scopeMenu),i=By(tl,e.__scopeMenu),o=p.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=p.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return p.useEffect(()=>d,[d]),p.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),c(null)}},[l,c]),a.jsx(Fy,{asChild:!0,...u,children:a.jsx(OE,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":KE(n.open),...e,ref:lh(t,s.onTriggerChange),onClick:h=>{var f;(f=e.onClick)==null||f.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,tc(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:B(e.onPointerLeave,tc(h=>{var m,y;d();const f=(m=n.content)==null?void 0:m.getBoundingClientRect();if(f){const g=(y=n.content)==null?void 0:y.dataset.side,b=g==="right",x=b?-5:5,v=f[b?"left":"right"],w=f[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+x,y:h.clientY},{x:v,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x:v,y:f.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,h=>{var m;const f=i.searchRef.current!=="";e.disabled||f&&h.key===" "||zW[r.dir].includes(h.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),h.preventDefault())})})})});HE.displayName=tl;var zE="MenuSubContent",qE=p.forwardRef((e,t)=>{const n=TE(gn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=Wi(gn,e.__scopeMenu),o=Cc(gn,e.__scopeMenu),l=WE(zE,e.__scopeMenu),c=p.useRef(null),u=fe(t,c);return a.jsx(ec.Provider,{scope:e.__scopeMenu,children:a.jsx(qt,{present:r||i.open,children:a.jsx(ec.Slot,{scope:e.__scopeMenu,children:a.jsx(Uy,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var h;o.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:B(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:B(e.onKeyDown,d=>{var m;const h=d.currentTarget.contains(d.target),f=qW[o.dir].includes(d.key);h&&f&&(i.onOpenChange(!1),(m=l.trigger)==null||m.focus(),d.preventDefault())})})})})})});qE.displayName=zE;function KE(e){return e?"open":"closed"}function Ud(e){return e==="indeterminate"}function Hy(e){return Ud(e)?"indeterminate":e?"checked":"unchecked"}function hH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function fH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function mH(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=fH(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function pH(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],u=l.x,d=l.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function gH(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return pH(n,t)}function tc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var vH=EE,yH=Fy,xH=PE,wH=AE,bH=Vy,SH=RE,jH=Uh,kH=ME,CH=IE,_H=FE,NH=BE,EH=UE,TH=VE,PH=HE,AH=qE,Vh="DropdownMenu",[RH,YG]=sn(Vh,[_E]),Ot=_E(),[OH,GE]=RH(Vh),YE=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=Ot(t),u=p.useRef(null),[d,h]=pr({prop:s,defaultProp:i??!1,onChange:o,caller:Vh});return a.jsx(OH,{scope:t,triggerId:$n(),triggerRef:u,contentId:$n(),open:d,onOpenChange:h,onOpenToggle:p.useCallback(()=>h(f=>!f),[h]),modal:l,children:a.jsx(vH,{...c,open:d,onOpenChange:h,dir:r,modal:l,children:n})})};YE.displayName=Vh;var JE="DropdownMenuTrigger",QE=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,i=GE(JE,n),o=Ot(n);return a.jsx(yH,{asChild:!0,...o,children:a.jsx(se.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:lh(t,i.triggerRef),onPointerDown:B(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:B(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});QE.displayName=JE;var MH="DropdownMenuPortal",XE=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ot(t);return a.jsx(xH,{...r,...n})};XE.displayName=MH;var ZE="DropdownMenuContent",eT=p.forwardRef((e,t)=>
416{const{__scopeDropdownMenu:n,...r}=e,s=GE(ZE,n),i=Ot(n),o=p.useRef(!1);return a.jsx(wH,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...r,ref:t,onCloseAutoFocus:B(e.onCloseAutoFocus,l=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:B(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});eT.displayName=ZE;var DH="DropdownMenuGroup",IH=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(bH,{...s,...r,ref:t})});IH.displayName=DH;var LH="DropdownMenuLabel",tT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(SH,{...s,...r,ref:t})});tT.displayName=LH;var FH="DropdownMenuItem",nT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(jH,{...s,...r,ref:t})});nT.displayName=FH;var $H="DropdownMenuCheckboxItem",rT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(kH,{...s,...r,ref:t})});rT.displayName=$H;var BH="DropdownMenuRadioGroup",UH=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(CH,{...s,...r,ref:t})});UH.displayName=BH;var VH="DropdownMenuRadioItem",sT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(_H,{...s,...r,ref:t})});sT.displayName=VH;var WH="DropdownMenuItemIndicator",iT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(NH,{...s,...r,ref:t})});iT.displayName=WH;var HH="DropdownMenuSeparator",oT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(EH,{...s,...r,ref:t})});oT.displayName=HH;var zH="DropdownMenuArrow",qH=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(TH,{...s,...r,ref:t})});qH.displayName=zH;var KH="DropdownMenuSubTrigger",aT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(PH,{...s,...r,ref:t})});aT.displayName=KH;var GH="DropdownMenuSubContent",lT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ot(n);return a.jsx(AH,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});lT.displayName=GH;var YH=YE,JH=QE,QH=XE,cT=eT,uT=tT,dT=nT,hT=rT,fT=sT,mT=iT,pT=oT,gT=aT,vT=lT;const XH=YH,ZH=JH,ez=p.forwardRef(({className:e,inset:t,children:n,...r},s)=>a.jsxs(gT,{ref:s,className:ee("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,a.jsx(Lk,{className:"ml-auto h-4 w-4"})]}));ez.displayName=gT.displayName;const tz=p.forwardRef(({className:e,...t},n)=>a.jsx(vT,{ref:n,className:ee("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));tz.displayName=vT.displayName;const yT=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(QH,{children:a.jsx(cT,{ref:r,sideOffset:t,className:ee("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
416de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));yT.displayName=cT.displayName;const Eg=p.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(dT,{ref:r,className:ee("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));Eg.displayName=dT.displayName;const nz=p.forwardRef(({className:e,children:t,checked:n,...r},s)=>a.jsxs(hT,{ref:s,className:ee("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(mT,{children:a.jsx(fh,{className:"h-4 w-4"})})}),t]}));nz.displayName=hT.displayName;const rz=p.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(fT,{ref:r,className:ee("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(mT,{children:a.jsx(CM,{className:"h-2 w-2 fill-current"})})}),t]}));rz.displayName=fT.displayName;const sz=p.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(uT,{ref:r,className:ee("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));sz.displayName=uT.displayName;const iz=p.forwardRef(({className:e,...t},n)=>a.jsx(pT,{ref:n,className:ee("-mx-1 my-1 h-px bg-muted",e),...t}));iz.displayName=pT.displayName;const xT="/assets/pharmacy-logo-Bl4iZ89h.png";function zy(e){const[t,n]=p.useState(null),[r,s]=p.useState(!0);return p.useEffect(()=>{Q.from("site_content").select("value").eq("key",e).maybeSingle().then(({data:i})=>{n((i==null?void 0:i.value)??null),s(!1)})},[e]),{value:t,loading:r}}const k1=[{href:"/services/weight-loss-injections",label:"Weight Loss Injections"},{href:"/services/private-pgds",label:"Private PGDs"},{href:"/services/pharmacy-first",label:"Pharmacy First"},{href:"/services/travel-clinic",label:"Travel Clinic"},{href:"/services/uric-acid-testing",label:"Uric Acid Testing"},{href:"/services/cholesterol-testing",label:"Cholesterol Testing"},{href:"/services/blood-glucose-testing",label:"Blood Glucose Testing"},{href:"/services/b12-injections",label:"B12 Injections"},{href:"/services/earwax-removal",label:"Earwax Removal"},{href:"/services/blood-pressure-checks",label:"Blood Pressure Checks"},{href:"/services/flu-vaccine",label:"Flu Vaccine"},{href:"/services/covid-19-vaccine",label:"Covid-19 Vaccine"}],oz=()=>{const[e,t]=p.useState(!1),[n,r]=p.useState(!1),s=qn(),{user:i,isAdmin:o}=dy(),{value:l}=zy("site_info"),c=(l==null?void 0:l.phone)??"01535 649308",u=(l==null?void 0:l.email)??"[email protected]",d=`tel:${c.replace(/\s+/g,"")}`,h=s.pathname.startsWith("/services");return a.jsxs("header",{className:"sticky top-0 z-50",children:[a.jsx("div",{className:"bg-background border-b",children:a.jsxs("div",{className:"container flex items-center justify-between h-24 md:h-32 gap-4",children:[a.jsx(X,{to:"/",className:"flex items-center shrink-0","aria-label":"Oxenhope Pharmacy",children:a.jsx("img",{src:xT,alt:"Oxenhope Pharmacy",className:"h-20 md:h-28 w-auto"})}),a.jsx("div",{className:"hidden md:flex flex-1 max-w-md items-center",children:a.jsxs("div",{className:"relative w-full",children:[a.jsx(z,{type:"text",placeholder:"Search Product or Condition",className:"pr-20 h-10 rounded-md border-border"}),a.jsx(J,{size:"sm",className:"absolute right-0 top-0 h-10 rounded-l-none px-5",children:"Search"})]})}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[o&&a.jsx(X,{to:"/admin",className:"hidden md:inline-flex",children:a.jsx(J,{variant:"outline",className:"border-primary text-primary hover:bg-primary hover:text-primary-foreground",children:"Admin"})}),i&&a.jsx(X,{to:"/account",children:a.jsxs(J,{variant:"outline",className:"hidden md:inline-flex border-primary text-primary hover:bg-primary hover:text-primary-foreground",children:[a.jsx(qk,{className:"h-4 w-4 mr-1.5"}),"Account"]})}),a.jsx(X,{to:"/contact",children:a.jsx(J,{className:"hidden md:inline-flex",children:"Contact"})}),a.jsx("button",{className:"lg:hidden p-2",onClick:()=>t(!e),"aria-label":"Toggle menu",children:e?a.jsx(fc,{className:"h-6 w-6"}):a.jsx(RM,{className:"h-6 w-6"})})]})]})}),a.jsx("div",{className:"bg-pharmacy-dark text-primary-foreground hidden lg:block",children:a.jsxs("div",{className:"container flex items-center justify-between h-12",children:[a.jsxs("nav",{className:"flex items-center gap-0",children:[a.jsx(X,{to:"/about",className:`px-4 py-3 text-sm font-medium transition-colors hover:bg-primary/80 ${s.pathname==="/about"?"bg-primary":""}`,children:"About Us"}),a.jsx(X,{to:"/prescriptions",className:`px-4 py-3 text-sm font-medium transition-colors hover:bg-primary/80 ${s.pathname==="/prescriptions"?"bg-primary":""}`,children:"Prescriptions"}
416),a.jsxs(XH,{children:[a.jsx(ZH,{asChild:!0,children:a.jsxs("button",{className:`px-4 py-3 text-sm font-medium transition-colors hover:bg-primary/80 inline-flex items-center gap-1 ${h?"bg-primary":""}`,children:["Services",a.jsx(na,{className:"h-3.5 w-3.5"})]})}),a.jsxs(yT,{align:"start",className:"w-56",children:[a.jsx(Eg,{asChild:!0,children:a.jsx(X,{to:"/services",className:"w-full font-medium",children:"All Services"})}),k1.map(f=>a.jsx(Eg,{asChild:!0,children:a.jsx(X,{to:f.href,className:"w-full",children:f.label})},f.href))]})]}),a.jsx(X,{to:"/book-appointment",className:`px-4 py-3 text-sm font-medium transition-colors hover:bg-primary/80 ${s.pathname==="/book-appointment"?"bg-primary":""}`,children:"Book a Clinic"}),a.jsx(X,{to:"/blog",className:`px-4 py-3 text-sm font-medium transition-colors hover:bg-primary/80 ${s.pathname.startsWith("/blog")?"bg-primary":""}`,children:"Health News"})]}),a.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[a.jsxs("a",{href:`mailto:${u}`,className:"flex items-center gap-1.5 hover:opacity-80 transition-opacity",children:[a.jsx(Pi,{className:"h-3.5 w-3.5"}),u]}),a.jsxs("a",{href:d,className:"flex items-center gap-1.5 hover:opacity-80 transition-opacity",children:[a.jsx(Ai,{className:"h-3.5 w-3.5"}),c]})]})]})}),e&&a.jsx("div",{className:"lg:hidden border-t bg-background",children:a.jsxs("nav",{className:"container py-4 flex flex-col gap-1",children:[a.jsx("div",{className:"px-2 pb-3 mb-2 border-b",children:a.jsxs("div",{className:"relative",children:[a.jsx(z,{placeholder:"Search Product or Condition",className:"pr-10"}),a.jsx(Vk,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})}),a.jsx(X,{to:"/about",onClick:()=>t(!1),className:`px-4 py-3 rounded-md text-sm font-medium transition-colors hover:bg-secondary ${s.pathname==="/about"?"text-primary font-semibold bg-primary/10":"text-foreground"}`,children:"About Us"}),a.jsx(X,{to:"/prescriptions",onClick:()=>t(!1),className:`px-4 py-3 rounded-md text-sm font-medium transition-colors hover:bg-secondary ${s.pathname==="/prescriptions"?"text-primary font-semibold bg-primary/10":"text-foreground"}`,children:"Prescriptions"}),a.jsxs("button",{onClick:()=>r(!n),className:`px-4 py-3 rounded-md text-sm font-medium transition-colors hover:bg-secondary flex items-center justify-between ${h?"text-primary font-semibold bg-primary/10":"text-foreground"}`,children:["Services",a.jsx(na,{className:`h-4 w-4 transition-transform ${n?"rotate-180":""}`})]}),n&&a.jsxs("div",{className:"pl-4 flex flex-col gap-1",children:[a.jsx(X,{to:"/services",onClick:()=>t(!1),className:"px-4 py-2 rounded-md text-sm font-medium text-muted-foreground hover:bg-secondary",children:"All Services"}),k1.map(f=>a.jsx(X,{to:f.href,onClick:()=>t(!1),className:`px-4 py-2 rounded-md text-sm transition-colors hover:bg-secondary ${s.pathname===f.href?"text-primary font-semibold":"text-muted-foreground"}`,children:f.label},f.href))]}),a.jsx(X,{to:"/book-appointment",onClick:()=>t(!1),className:`px-4 py-3 rounded-md text-sm font-medium transition-colors hover:bg-secondary ${s.pathname==="/book-appointment"?"text-primary font-semibold bg-primary/10":"text-foreground"}`,children:"Book a Clinic"}),a.jsx(X,{to:"/blog",onClick:()=>t(!1),className:`px-4 py-3 rounded-md text-sm font-medium transition-colors hover:bg-secondary ${s.pathname.startsWith("/blog")?"text-primary font-semibold bg-primary/10":"text-foreground"}`,children:"Health News"}),a.jsx(X,{to:"/contact",onClick:()=>t(!1),className:"px-4 py-3 rounded-md text-sm font-medium text-foreground hover:bg-secondary",children:"Contact"}),a.jsxs("div",{className:"border-t mt-2 pt-3 px-4 space-y-2",children:[o&&a.jsx(X,{to:"/admin",onClick:()=>t(!1),className:"block text-sm font-medium text-primary",children:"Admin Dashboard"}),a.jsxs("a",{href:d,className:"flex items-center gap-2 text-sm font-medium text-primary",children:[a.jsx(Ai,{className:"h-4 w-4"}),c]}),a.jsxs("a",{href:`mailto:${u}`,className:"flex items-center gap-2 text-sm font-medium text-primary",children:[a.jsx(Pi,{className:"h-4 w-4"}),u]})]})]})})]})},az=()=>{const[e,t]=p.useState(""),[n,r]=p.useState(!1),s=async i=>{if(i.preventDefault(),!e)return;r(!0);const{error:o}=await Q.from("newsletter_subscribers").insert({email:e.trim().toLowerCase(),source:"footer"});if(r(!1),o&&!o.message.toLowerCase().includes("duplicate")){re.error("Something went wrong. Please try again.");return}re.success("Thanks for subscribing! You'll hear from us soon."),t("")};return a.jsxs("div",{children:[a.jsx("h4",{className:"font-heading font-semibold mb-2",children:"Health Tips & News"}),a.jsx("p",{className:"text-sm opacity-80 mb-3",children:"Get seasonal health advice and pharmacy updates straight to your inbox."}),a.jsxs("form",{onSubmit:s,className:"flex gap-2",children:[a.jsx(z,{type:"email",placeholder:"Your email",value:e,onCh
416ange:i=>t(i.target.value),required:!0,className:"bg-primary-foreground/10 border-primary-foreground/20 text-primary-foreground placeholder:text-primary-foreground/50 h-9 text-sm"}),a.jsx(J,{type:"submit",size:"sm",variant:"secondary",className:"shrink-0",disabled:n,children:a.jsx(Wk,{className:"h-4 w-4"})})]})]})},lz=()=>{const{value:e}=zy("site_info"),t=(e==null?void 0:e.phone)??"01535 649308",n=(e==null?void 0:e.email)??"[email protected]",r=(e==null?void 0:e.address)??"Oxenhope Pharmacy, 36 Station Road, Oxenhope, Keighley BD22 9JJ";return a.jsxs("footer",{className:"bg-pharmacy-dark text-primary-foreground",children:[a.jsx("div",{className:"container py-12 md:py-16",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-heading text-xl font-bold mb-4",children:"Oxenhope Pharmacy"}),a.jsx("p",{className:"text-sm opacity-80 mb-4 leading-relaxed",children:"Your trusted community pharmacy serving Oxenhope and the surrounding villages of West Yorkshire since 2013."}),a.jsx("p",{className:"text-xs opacity-60",children:"GPhC Premises Registration: 1116807"})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-heading font-semibold mb-4",children:"Quick Links"}),a.jsx("nav",{className:"flex flex-col gap-2",children:[{to:"/about",label:"About Us"},{to:"/services",label:"Our Services"},{to:"/prescriptions",label:"Prescriptions"},{to:"/book-appointment",label:"Book a Clinic"},{to:"/travel-vaccines",label:"Travel Vaccines"},{to:"/blog",label:"Health News"},{to:"/contact",label:"Contact Us"}].map(s=>a.jsx(X,{to:s.to,className:"text-sm opacity-80 hover:opacity-100 transition-opacity",children:s.label},s.to))})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-heading font-semibold mb-4",children:"Contact"}),a.jsxs("div",{className:"space-y-3 text-sm opacity-80",children:[a.jsxs("a",{href:`tel:${t.replace(/\s+/g,"")}`,className:"flex items-center gap-2 hover:opacity-100",children:[a.jsx(Ai,{className:"h-4 w-4 shrink-0"}),t]}),a.jsxs("a",{href:`mailto:${n}`,className:"flex items-center gap-2 hover:opacity-100",children:[a.jsx(Pi,{className:"h-4 w-4 shrink-0"}),n]}),a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Bv,{className:"h-4 w-4 shrink-0 mt-0.5"}),a.jsx("span",{children:r})]})]})]}),a.jsx("div",{children:a.jsx(az,{})})]})}),a.jsx("div",{className:"border-t border-primary-foreground/10",children:a.jsxs("div",{className:"container py-4 flex flex-col md:flex-row justify-between items-center gap-2 text-xs opacity-60",children:[a.jsxs("p",{children:["© ",new Date().getFullYear()," Oxenhope Pharmacy. All rights reserved."]}),a.jsxs("div",{className:"flex flex-wrap gap-4",children:[a.jsx(X,{to:"/gphc-registration",className:"hover:opacity-100",children:"GPhC Registration"}),a.jsx(X,{to:"/eps-nomination",className:"hover:opacity-100",children:"EPS Nomination"}),a.jsx(X,{to:"/complaints",className:"hover:opacity-100",children:"Complaints"}),a.jsx(X,{to:"/login",className:"hover:opacity-100",children:"Admin Login"})]})]})})]})},C1={"Opening hours":"We're open Monday–Friday 9:00–18:00 and Saturday 9:00–13:00. Closed on Sundays.","Prescription delivery":"We offer free local prescription delivery to Oxenhope and surrounding villages. Just call us or fill in the form on our Prescriptions page.","Travel vaccines":"We offer a comprehensive travel vaccine service. Book a consultation and we'll advise on what you need for your destination.","Book appointment":"You can book appointments for health checks, flu jabs, and private consultations through our Book Appointment page."},cz=()=>{const[e,t]=p.useState(!1),[n,r]=p.useState([{text:"Hello! How can we help you today? Choose a topic below or type your question.",isUser:!1}]),[s,i]=p.useState(""),o=c=>{const u=C1[c];r(d=>[...d,{text:c,isUser:!0},{text:u,isUser:!1}])},l=c=>{c.preventDefault(),s.trim()&&(r(u=>[...u,{text:s,isUser:!0},{text:"Thanks for your message! For detailed enquiries, please call us on 01535 643 036 or use our contact form. We'll get back to you as soon as possible.",isUser:!1}]),i(""))};return a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:()=>
416t(!e),className:"fixed bottom-6 right-6 z-50 w-14 h-14 rounded-full bg-primary text-primary-foreground shadow-lg hover:shadow-xl transition-all flex items-center justify-center","aria-label":"Chat with us",children:e?a.jsx(fc,{className:"h-6 w-6"}):a.jsx(OM,{className:"h-6 w-6"})}),e&&a.jsxs("div",{className:"fixed bottom-24 right-6 z-50 w-80 max-h-[28rem] bg-background border rounded-2xl shadow-2xl flex flex-col overflow-hidden",children:[a.jsxs("div",{className:"bg-primary text-primary-foreground px-4 py-3",children:[a.jsx("p",{className:"font-heading font-semibold text-sm",children:"Oxenhope Pharmacy"}),a.jsx("p",{className:"text-xs opacity-80",children:"We typically reply within a few hours"})]}),a.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-2 min-h-[200px]",children:n.map((c,u)=>a.jsx("div",{className:`flex ${c.isUser?"justify-end":"justify-start"}`,children:a.jsx("div",{className:`max-w-[85%] px-3 py-2 rounded-xl text-sm ${c.isUser?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground"}`,children:c.text})},u))}),a.jsx("div",{className:"px-3 pb-2 flex flex-wrap gap-1.5",children:Object.keys(C1).map(c=>a.jsx("button",{onClick:()=>o(c),className:"text-xs px-2.5 py-1 rounded-full border border-primary/30 text-primary hover:bg-primary/10 transition-colors",children:c},c))}),a.jsxs("form",{onSubmit:l,className:"border-t p-2 flex gap-2",children:[a.jsx(z,{value:s,onChange:c=>i(c.target.value),placeholder:"Type a message…",className:"h-9 text-sm",maxLength:500}),a.jsx(J,{type:"submit",size:"sm",className:"shrink-0 h-9 w-9 p-0",children:a.jsx(Wk,{className:"h-4 w-4"})})]})]})]})},wT="https://oxenhopepharmacy.co.uk",ym="Oxenhope Pharmacy",uz=`${wT}/og-image.png`,bT=({title:e,description:t,image:n,type:r="website",noindex:s,jsonLd:i})=>{const{pathname:o}=qn(),l=`${wT}${o}`,c=n||uz,u=e.includes(ym)?e:`${e} | ${ym}`,d=u.length>60?u.slice(0,57)+"...":u,h=t.length>160?t.slice(0,157)+"...":t,f=i?Array.isArray(i)?i:[i]:[];return a.jsxs(V4,{children:[a.jsx("title",{children:d}),a.jsx("meta",{name:"description",content:h}),a.jsx("link",{rel:"canonical",href:l}),s&&a.jsx("meta",{name:"robots",content:"noindex,nofollow"}),a.jsx("meta",{property:"og:type",content:r}),a.jsx("meta",{property:"og:site_name",content:ym}),a.jsx("meta",{property:"og:title",content:d}),a.jsx("meta",{property:"og:description",content:h}),a.jsx("meta",{property:"og:url",content:l}),a.jsx("meta",{property:"og:image",content:c}),a.jsx("meta",{property:"og:locale",content:"en_GB"}),a.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),a.jsx("meta",{name:"twitter:title",content:d}),a.jsx("meta",{name:"twitter:description",content:h}),a.jsx("meta",{name:"twitter:image",content:c}),f.map((m,y)=>a.jsx("script",{type:"application/ld+json",children:JSON.stringify(m)},y))]})},ve=({children:e,seo:t})=>a.jsxs("div",{className:"min-h-screen flex flex-col",children:[t&&a.jsx(bT,{...t}),a.jsx($8,{}),a.jsx(oz,{}),a.jsx("main",{className:"flex-1",children:e}),a.jsx(lz,{}),a.jsx(cz,{})]}),dz="/assets/hero-treatments-D5x-dB-2.png",hz="/assets/hero-delivery-cUixeYWw.png",ST="/assets/travel-blog-DPXNXcvu.png",jT="/assets/prescriptions-hero-G49Nv_hI.jpg",Wh="/assets/services-banner-XuVznmZ1.png",Gu="/assets/oxenhope-pharmacy-exterior-SVMKWXXP.png",fz={hidden:{opacity:0,y:20},visible:e=>({opacity:1,y:0,transition:{delay:e*.12,duration:.5}})},Va=[{title:"Access a Range of Private Treatments",description:"Access prescription-only treatments without going to see your GP. We offer in-clinic and online consultations, meaning you have the best of both worlds.",cta:{label:"Find a Treatment",link:"/services"},image:dz},{title:"FREE Prescription Delivery*",description:"Prescription Delivery Service. We offer a FREE prescription delivery service for those who need it and live locally to the Pharmacy.",cta:{label:"Contact Us",link:"/contact"},ctaSecondary:{label:"Sign up now",link:"/prescriptions"},image:hz}],mz=[{title:"Travel Vaccines",desc:"Travelling abroad this season? Visit us today to get your travel vaccinations. These will protect you from acquiring diseases found outside the country.",link:"/services/travel-clinic",img:ST},{title:"Prescriptions",desc:"Do you depend on regular prescriptions? Sign Up with Our Pharmacy to access our prescription collection service. We value our customers and that's why you are our top priority.",link:"/prescriptions",img:jT},{title:"Pharmacy First Service",desc:"You no longer need to wait to see your GP for 7 common conditions: Earache, Impetigo, Infected insect bites, Shingles, Sinusitis, Sore throat and Uncomplicated UTIs.",link:"/services/pharmacy-first",img:Wh}],pz=[{title:"Weight Loss Injections",link:"/services/weight-loss-injections",desc:"Convenient and effective injectable weight loss drugs designed to help you."},{title:"Private PGDs",link:"/services/private-pgds",desc:"A range of private healthcare solutions designed to enhance your wellbeing."},{title:"Pharmacy First Services",link:"/services/pharmacy-first",desc:"Your trusted neighbourhood pharmacy for c
416ommon conditions."},{title:"Travel Clinic",link:"/services/travel-clinic",desc:"Preparing for your upcoming journey with comprehensive travel health."},{title:"Uric Acid Testing",link:"/services/uric-acid-testing",desc:"Comprehensive uric acid testing for gout management."}],_1=[{q:"What vaccinations are important for seniors?",a:"People over age 65 are at higher risk for flu and should check with their doctor about the right flu vaccination. There are some restrictions for people with certain medical issues, but overall it's recommended that most elderly people receive the flu jab."},{q:"What if I forget to take my medication as prescribed?",a:"Try to adhere as closely as you can to the instructions. Ask your pharmacist about special boxes and other gadgets to assist you remember when to take your medication if you think you might have difficulties with this."},{q:"Why is a pharmacist important to my overall health?",a:"Pharmacists are well-versed in pharmacology, which is the branch of medicine that focuses on the uses and effects of drugs. Pharmacists understand the therapeutic roles of drugs and drug side effects and interactions with other drugs. Your pharmacist can help monitor these factors."}],gz=()=>{const[e,t]=p.useState(0),[n,r]=p.useState(null),{value:s}=zy("hero");p.useEffect(()=>{const l=setInterval(()=>{t(c=>(c+1)%Va.length)},6e3);return()=>clearInterval(l)},[]);const i=Va[e],o=e===0&&s?{title:s.title||i.title,description:s.description||i.description,cta:{label:s.cta_label||i.cta.label,link:s.cta_link||i.cta.link},ctaSecondary:i.ctaSecondary,image:s.image_url||i.image}:i;return a.jsxs(ve,{seo:{title:"Oxenhope Pharmacy | NHS & Private Pharmacy in Keighley",description:"Trusted community pharmacy in Oxenhope, Keighley. NHS prescriptions, Pharmacy First, travel vaccines, weight loss clinics & free local delivery.",jsonLd:{"@context":"https://schema.org","@type":"FAQPage",mainEntity:_1.map(l=>({"@type":"Question",name:l.q,acceptedAnswer:{"@type":"Answer",text:l.a}}))}},children:[a.jsx("section",{className:"relative bg-background",children:a.jsxs("div",{className:"flex flex-col md:flex-row min-h-[500px] md:min-h-[550px]",children:[a.jsx("div",{className:"flex-1 flex items-center px-6 md:px-16 py-12 md:py-0",children:a.jsxs("div",{className:"max-w-lg",children:[a.jsx("p",{className:"font-heading text-2xl md:text-3xl font-extrabold text-primary mb-2 tracking-wide text-center md:text-left",children:"Oxenhope Pharmacy"}),a.jsx("h1",{className:"font-heading text-3xl md:text-4xl lg:text-5xl font-bold text-foreground leading-tight mb-4",children:o.title}),a.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:o.description}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(J,{size:"lg",asChild:!0,children:a.jsxs(X,{to:o.cta.link,children:[o.cta.label," ",a.jsx(qe,{className:"ml-1 h-4 w-4"})]})}),o.ctaSecondary&&a.jsx(J,{size:"lg",variant:"outline",asChild:!0,children:a.jsxs(X,{to:o.ctaSecondary.link,children:[o.ctaSecondary.label," ",a.jsx(qe,{className:"ml-1 h-4 w-4"})]})})]})]})}),a.jsx("div",{className:"flex-1 relative min-h-[300px]",children:a.jsx("img",{src:o.image,alt:o.title,className:"absolute inset-0 w-full h-full object-cover",loading:"eager"})}),a.jsx("button",{onClick:()=>t(l=>(l-1+Va.length)%Va.length),className:"absolute left-2 top-1/2 -translate-y-1/2 bg-background/80 hover:bg-background p-2 rounded-full shadow-md z-10","aria-label":"Previous slide",children:a.jsx(Ik,{className:"h-5 w-5 text-foreground"})}),a.jsx("button",{onClick:()=>t(l=>(l+1)%Va.length),className:"absolute right-2 top-1/2 -translate-y-1/2 bg-background/80 hover:bg-background p-2 rounded-full shadow-md z-10","aria-label":"Next slide",children:a.jsx(qe,{className:"h-5 w-5 text-foreground"})})]})}),a.jsx("section",{className:"bg-secondary border-y py-5",children:a.jsx("div",{className:"container flex flex-wrap justify-center gap-8 md:gap-16",children:[{text:"Trusted by the",sub:"NHS since 2013"},{text:"Industry leading",sub:"clinical accuracy"},{text:"Regulated by the General",sub:"Pharmaceutical Council"},{text:"Award winning",sub:"customer care"}].map(l=>a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(mh,{className:"h-6 w-6 text-primary shrink-0"}),a.jsxs("div",{className:"text-sm",children:[a.jsx("span",{className:"font-semibold text-foreground block",children:l.text}),a.jsx("span",{className:"font-semibold text-foreground",children:l.sub})]})]},l.sub))})}),a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container",children:[a.jsx("div",{className:"grid md:grid-cols-3 gap-8",children:mz.map((l,c)=>
416a.jsx(Mn.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:c,variants:fz,children:a.jsxs(ut,{className:"h-full overflow-hidden border hover:shadow-lg transition-shadow",children:[a.jsx("div",{className:"relative aspect-[16/10] overflow-hidden",children:a.jsx("img",{src:l.img,alt:l.title,className:"w-full h-full object-cover",loading:"lazy"})}),a.jsxs(dt,{className:"p-6",children:[a.jsx("h3",{className:"font-heading text-xl font-semibold mb-2 text-foreground",children:l.title}),a.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed mb-4",children:l.desc}),a.jsx(J,{variant:"outline",size:"sm",asChild:!0,children:a.jsxs(X,{to:l.link,children:["Read More ",a.jsx(qe,{className:"ml-1 h-3.5 w-3.5"})]})})]})]})},l.title))}),a.jsx("div",{className:"text-center mt-8",children:a.jsxs(X,{to:"/services",className:"text-primary font-medium hover:underline inline-flex items-center gap-1",children:["Explore all Services ",a.jsx(qe,{className:"h-4 w-4"})]})})]})}),a.jsx("section",{className:"py-16 md:py-20 bg-secondary/50",children:a.jsx("div",{className:"container",children:a.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-primary font-semibold uppercase tracking-wider mb-2",children:"About"}),a.jsx("h2",{className:"font-heading text-3xl md:text-4xl font-bold text-foreground mb-6",children:"About Us"}),a.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:"At our pharmacy, we are committed to serving our community with integrity and professionalism. We are always happy to answer your questions and provide guidance and support whenever you need it."}),a.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:"Thank you for choosing our pharmacy as your trusted healthcare partner. We look forward to working with you to help you achieve your health goals."}),a.jsx(J,{asChild:!0,children:a.jsxs(X,{to:"/about",children:["Read More ",a.jsx(qe,{className:"ml-1 h-4 w-4"})]})})]}),a.jsx("div",{children:a.jsx("img",{src:Gu,alt:"Oxenhope Pharmacy",className:"rounded-lg w-full shadow-md",loading:"lazy"})})]})})}),a.jsx("section",{className:"py-16 md:py-20",children:a.jsx("div",{className:"container",children:a.jsxs("div",{className:"grid md:grid-cols-2 gap-12",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-primary font-semibold uppercase tracking-wider mb-2",children:"Services"}),a.jsx("h2",{className:"font-heading text-3xl md:text-4xl font-bold text-foreground mb-8",children:"Our Services"}),a.jsx("div",{className:"space-y-6",children:pz.map(l=>a.jsx("div",{className:"border-b pb-4",children:a.jsxs(X,{to:l.link,className:"group",children:[a.jsx("h3",{className:"font-heading text-lg font-semibold text-primary group-hover:underline mb-1",children:l.title}),a.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed mb-2",children:l.desc}),a.jsxs("span",{className:"text-primary text-sm font-medium inline-flex items-center gap-1",children:["Read More ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})]})},l.title))}),a.jsx("div",{className:"mt-6",children:a.jsx(J,{variant:"outline",asChild:!0,children:a.jsx(X,{to:"/services",children:"View All Services"})})})]}),a.jsx("div",{className:"flex items-center justify-center",children:a.jsx("img",{src:Wh,alt:"Our pharmacy services",className:"rounded-lg w-full max-w-md 
416shadow-md",loading:"lazy"})})]})})}),a.jsx("section",{className:"py-16 md:py-20 bg-secondary/50",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("p",{className:"text-sm text-primary font-semibold uppercase tracking-wider mb-2",children:"FAQs"}),a.jsx("h2",{className:"font-heading text-3xl md:text-4xl font-bold text-foreground mb-8",children:"Frequently Asked Questions"}),a.jsx("div",{className:"space-y-3",children:_1.map((l,c)=>a.jsxs("div",{className:"border rounded-lg overflow-hidden bg-background",children:[a.jsxs("button",{onClick:()=>r(n===c?null:c),className:"w-full px-6 py-4 text-left flex items-center justify-between text-foreground font-medium text-sm",children:[l.q,n===c?a.jsx(Lv,{className:"h-4 w-4 shrink-0 text-primary"}):a.jsx(na,{className:"h-4 w-4 shrink-0 text-primary"})]}),n===c&&a.jsx("div",{className:"px-6 pb-4 text-muted-foreground text-sm leading-relaxed",children:l.a})]},c))})]})}),a.jsx("section",{className:"py-10 bg-primary",children:a.jsxs("div",{className:"container flex flex-col md:flex-row md:items-center md:justify-center gap-4",children:[a.jsx(J,{variant:"secondary",size:"lg",asChild:!0,children:a.jsx(X,{to:"/signup",children:"Sign Up"})}),a.jsx(J,{size:"lg",variant:"outline",asChild:!0,className:"border-primary-foreground/40 text-primary-foreground hover:bg-primary-foreground/10 bg-transparent",children:a.jsx(X,{to:"/book-appointment",children:"Book a Clinic"})}),a.jsx(J,{size:"lg",variant:"outline",asChild:!0,className:"border-primary-foreground/40 text-primary-foreground hover:bg-primary-foreground/10 bg-transparent",children:a.jsx(X,{to:"/contact",children:"Contact Us"})})]})})]})},N1="/assets/about-hero-C4aJ1zIg.jpg",Wa={hidden:{opacity:0,y:20},visible:e=>({opacity:1,y:0,transition:{delay:e*.12,duration:.5}})},vz=[{title:"Community First",desc:"We know our customers by name. Your health is personal to us."},{title:"Expert Care",desc:"Fully qualified pharmacists providing NHS and private healthcare."},{title:"Trusted & Regulated",desc:"GPhC registered, operating to the highest professional standards."},{title:"Local & Sustainable",desc:"Supporting local suppliers and reducing our environmental footprint."}],yz=()=>a.jsxs(ve,{seo:{title:"About Oxenhope Pharmacy in Keighley",description:"Independent community pharmacy in Oxenhope, Keighley serving West Yorkshire with NHS prescriptions, clinics & friendly expert advice."},children:[a.jsxs("section",{className:"relative py-24 md:py-32",children:[a.jsxs("div",{className:"absolute inset-0",children:[a.jsx("img",{src:N1,alt:"About Oxenhope Pharmacy",className:"w-full h-full object-cover"}
416),a.jsx("div",{className:"absolute inset-0 bg-foreground/55"})]}),a.jsxs("div",{className:"container relative z-10 text-primary-foreground",children:[a.jsx("h1",{className:"font-heading text-4xl md:text-5xl font-bold mb-3",children:"About us"}),a.jsx("p",{className:"text-lg opacity-90 max-w-lg",children:"An independent pharmacy rooted in the heart of Keighley, West Yorkshire."})]})]}),a.jsx("section",{className:"py-16 md:py-20",children:a.jsx("div",{className:"container",children:a.jsxs("div",{className:"grid md:grid-cols-5 gap-10 items-start",children:[a.jsxs(Mn.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"md:col-span-3 order-2 md:order-1",children:[a.jsx(Mn.h2,{variants:Wa,custom:0,className:"font-heading text-3xl font-bold mb-5",children:"Our story"}),a.jsx(Mn.p,{variants:Wa,custom:1,className:"text-muted-foreground mb-4 leading-relaxed",children:"Oxenhope Pharmacy opened its doors in 2013 with a simple mission: to provide exceptional healthcare with a personal touch. We are an independent pharmacy located in the beautiful village of Oxenhope, near Keighley, at the edge of Brontë Country, and we quickly became an integral part of the community."}),a.jsx(Mn.p,{variants:Wa,custom:2,className:"text-muted-foreground mb-4 leading-relaxed",children:"What sets us apart from the bigger chains is our commitment to knowing every customer personally. When you walk through our door, you're not a number — you're a neighbour. We remember your name, your medications, and we genuinely care about your wellbeing."}),a.jsx(Mn.p,{variants:Wa,custom:3,className:"text-muted-foreground leading-relaxed",children:"From dispensing NHS prescriptions to offering specialist travel vaccine clinics, we've grown our services over the years while never losing sight of what matters most: you."})]}),a.jsx(Mn.div,{initial:{opacity:0}
416,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"md:col-span-2 order-1 md:order-2",children:a.jsx("img",{src:Gu,alt:"Oxenhope Pharmacy exterior",className:"rounded-xl w-full"})})]})})}),a.jsx("section",{className:"py-14 bg-secondary/40",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h2",{className:"font-heading text-2xl font-bold mb-8",children:"What we stand for"}),a.jsx("div",{className:"grid sm:grid-cols-2 gap-x-10 gap-y-6",children:vz.map((e,t)=>a.jsxs(Mn.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:t,variants:Wa,children:[a.jsx("h3",{className:"font-heading font-semibold mb-1",children:e.title}),a.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:e.desc})]},e.title))})]})}),a.jsx("section",{className:"py-14 bg-secondary/40",children:a.jsxs("div",{className:"container",children:[a.jsx("h2",{className:"font-heading text-2xl font-bold mb-8",children:"Around the pharmacy"}),a.jsxs("div",{className:"grid grid-cols-6 gap-3",children:[a.jsx("div",{className:"col-span-4 aspect-[16/9] rounded-lg overflow-hidden",children:a.jsx("img",{src:Gu,alt:"Pharmacy exterior",className:"w-full h-full object-cover",loading:"lazy"})}),a.jsx("div",{className:"col-span-2 aspect-[9/10] rounded-lg overflow-hidden",children:a.jsx("img",{src:Wh,alt:"Healthcare services",className:"w-full h-full object-cover",loading:"lazy"})}),a.jsx("div",{className:"col-span-2 aspect-[9/10] rounded-lg overflow-hidden",children:a.jsx("img",{src:N1,alt:"About our pharmacy",className:"w-full h-full object-cover",loading:"lazy"})}),a.jsx("div",{className:"col-span-4 aspect-[16/9] rounded-lg overflow-hidden",children:a.jsx("img",{src:Gu,alt:"Oxenhope Pharmacy",className:"w-full h-full object-cover",loading:"lazy"})})]})]})})]}),xz={hidden:{opacity:0,y:20},visible:e=>({opacity:1,y:0,transition:{delay:e*.08,duration:.5}})},wz=[{title:"Weight Loss Injections",desc:"Oxenhope Pharmacy offers convenient and effective injectable weight loss drugs designed to help you take control of your health and reach your weight loss goals.",slug:"weight-loss-injections"},{title:"Private PGDs",desc:"At Oxenhope Pharmacy, we offer a range of private healthcare solutions designed to enhance your lifestyle, tailored to meet your individual needs.",slug:"private-pgds"},{title:"Pharmacy First Services",desc:"Quick and easy access to professional healthcare solutions without the need for a GP appointment, right here in Keighley.",slug:"pharmacy-first"},{title:"Travel Clinic",desc:"Whether it's a gap year adventure, a spiritual pilgrimage, or a business trip, our Travel Clinic is dedicated to safeguarding your health throughout your travels.",slug:"travel-clinic"},{title:"Uric Acid Testing",desc:"Comprehensive uric acid testing to help you manage your health and prevent potential complications such as gout and kidney stones. £10.",slug:"uric-acid-testing"},{title:"Cholesterol Testing",desc:"Your guide to better heart health. Oxenhope Pharmacy is your trusted destination for comprehensive cholesterol checks in Keighley.",slug:"cholesterol-testing"},{title:"Blood Glucose Testing",desc:"Comprehensive blood sugar testing services designed to provide accurate and timely diagnosis, helping you manage your health effectively.",slug:"blood-glucose-testing"},{title:"B12 Injections",desc:"B12 injections to support a range of health conditions, boosting energy levels and supporting a healthy nervous system.",slug:"b12-injections"},{title:"Earwax Removal",desc:"Professional earwax removal using modern micro-suction technology. Quick, painless and can immediately improve your hearing.",slug:"earwax-removal"},{title:"Blood Pressure Checks",desc:"High blood pressure is a silent threat affecting over 5.5 million undiagnosed individuals in England. Early detection is crucial.",slug:"blood-pressure-checks"},{title:"Flu Vaccine",desc:"NHS and private flu vaccines available. Protect yourself and your family against this year's strain of seasonal flu.",slug:"flu-vaccine"},{title:"Covid-19 Vaccine",desc:"Convenient access to COVID-19 vaccination, helping protect you and those around you from the ongoing threat of the virus.",slug:"covid-19-vaccine"}],bz=()=>a.jsxs(ve,{seo:{title:"Pharmacy Services in Keighley",description:"Browse our full range of NHS and private pharmacy services in Oxenhope, Keighley — from Pharmacy First to weight loss and travel clinics."},children:[a.jsxs("section",{className:"relative py-24 md:py-32",children:[a.jsxs("div",{className:"absolute inset-0",children:[a.jsx("img",{src:Wh,alt:"Health services",className:"w-full h-full object-cover"}
416),a.jsx("div",{className:"absolute inset-0 bg-foreground/60"})]}),a.jsxs("div",{className:"container relative z-10 text-primary-foreground",children:[a.jsx("h1",{className:"font-heading text-4xl md:text-5xl font-bold mb-3",children:"Our services"}),a.jsx("p",{className:"text-lg opacity-90 max-w-lg",children:"Comprehensive healthcare for you and your family, right here in Keighley."})]})]}),a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-4xl",children:[a.jsx("div",{className:"divide-y",children:wz.map((e,t)=>a.jsx(Mn.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:t,variants:xz,children:a.jsx(X,{to:`/services/${e.slug}`,className:"py-6 first:pt-0 last:pb-0 flex flex-col sm:flex-row sm:items-start gap-2 sm:gap-6 group block",children:a.jsxs("div",{className:"flex-1",children:[a.jsxs("h3",{className:"font-heading font-semibold text-lg mb-1 group-hover:text-primary transition-colors flex items-center gap-1.5",children:[e.title,a.jsx(qe,{className:"h-3.5 w-3.5 opacity-0 -translate-x-1 group-hover:opacity-100 group-hover:translate-x-0 transition-all"})]}),a.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:e.desc})]})})},e.title))}),a.jsxs("div",{className:"mt-12 pt-8 border-t",children:[a.jsx("p",{className:"text-muted-foreground mb-3",children:"Need a service not listed? We may still be able to help."}),a.jsxs(X,{to:"/contact",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Get in touch ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})]})]})})]}),Pt=p.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:ee("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
416ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Pt.displayName="Textarea";const Sz={hidden:{opacity:0,y:20},visible:e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5}})},jz=[{icon:_M,title:"Nominate us",desc:"Tell your GP surgery to send your prescriptions electronically to Oxenhope Pharmacy."},{icon:Ai,title:"We prepare",desc:"We'll receive your prescription and have your medication ready for collection or delivery."},{icon:zk,title:"Collect or deliver",desc:"Pick up in-store or enjoy free local delivery to Oxenhope and surrounding villages."},{icon:mh,title:"Ongoing support",desc:"We'll manage your repeats, remind you when orders are due, and check in on you."}],kz=[{q:"How do I nominate Oxenhope Pharmacy?",a:"Simply ask your GP surgery to set Oxenhope Pharmacy as your nominated pharmacy for electronic prescriptions. You can also ask us and we'll sort it for you!"},{q:"Is the delivery service really free?",a:"Yes! We offer completely free prescription delivery across Oxenhope, Haworth, Lees, and surrounding areas."},{q:"How long does delivery take?",a:"We aim to deliver same-day or next-day for most prescriptions received before 2pm."},{q:"Can you manage my repeat prescriptions?",a:"Absolutely. We offer a managed repeat service where we'll order your medication from the GP on your behalf and have it ready when you need it."}],Cz=()=>{const[e,t]=p.useState(null),[n,r]=p.useState({name:"",address:"",phone:"",notes:""}),s=i=>{i.preventDefault(),re.success("Thank you! We'll be in touch about setting up your delivery."),r({name:"",address:"",phone:"",notes:""})};return a.jsxs(ve,{seo:{title:"NHS Prescriptions & Free Local Delivery",description:"Order NHS repeat prescriptions from Oxenhope Pharmacy with free local delivery across Keighley, Haworth and surrounding villages."},children:[a.jsxs("section",{className:"relative py-24 md:py-32",children:[a.jsxs("div",{className:"absolute inset-0",children:[a.jsx("img",{src:jT,alt:"Prescription delivery",className:"w-full h-full object-cover"}
416),a.jsx("div",{className:"absolute inset-0 bg-foreground/55"})]}),a.jsxs("div",{className:"container relative z-10 text-primary-foreground",children:[a.jsx("h1",{className:"font-heading text-4xl md:text-5xl font-bold mb-3",children:"Prescriptions"}),a.jsx("p",{className:"text-lg opacity-90 max-w-lg mb-4",children:"Easy prescription management with free local delivery."}),a.jsx(J,{asChild:!0,variant:"secondary",children:a.jsx(X,{to:"/prescription-order",children:"Order a Prescription Online"})})]})]}),a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h2",{className:"font-heading text-2xl md:text-3xl font-bold mb-10",children:"How it works"}),a.jsx("div",{className:"space-y-8",children:jz.map((i,o)=>a.jsxs(Mn.div,{initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:o,variants:Sz,className:"flex gap-5",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-sage-light flex items-center justify-center shrink-0 mt-0.5",children:a.jsx(i.icon,{className:"h-5 w-5 text-primary"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-heading font-semibold mb-1",children:i.title}),a.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:i.desc})]})]},i.title))})]})}),a.jsx("section",{className:"py-14 bg-secondary/40",children:a.jsxs("div",{className:"container max-w-xl",children:[a.jsx("h2",{className:"font-heading text-2xl font-bold mb-2",children:"Sign up for free delivery"}),a.jsx("p",{className:"text-muted-foreground mb-6 text-sm",children:"Fill in your details and we'll get your prescription delivery set up."}),a.jsxs("form",{onSubmit:s,className:"space-y-3",children:[a.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[a.jsx(z,{placeholder:"Full name",value:n.name,onChange:i=>r({...n,name:i.target.value}),required:!0,maxLength:100}),a.jsx(z,{placeholder:"Phone number",type:"tel",value:n.phone,onChange:i=>r({...n,phone:i.target.value}),required:!0,maxLength:20})]}),a.jsx(z,{placeholder:"Delivery address",value:n.address,onChange:i=>r({...n,address:i.target.value}),required:!0,maxLength:200}),a.jsx(Pt,{placeholder:"Any notes (e.g. GP surgery, medications)",value:n.notes,onChange:i=>r({...n,notes:i.target.value}),maxLength:500,rows:3}),a.jsx(J,{type:"submit",children:"Sign up"})]})]})}),a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-2xl",children:[a.jsx("h2",{className:"font-heading text-2xl font-bold mb-8",children:"Common questions"}),a.jsx("div",{className:"divide-y",children:kz.map((i,o)=>a.jsxs("div",{className:"py-4 cursor-pointer",onClick:()=>t(e===o?null:o),children:[a.jsxs("div",{className:"flex justify-between items-start gap-4",children:[a.jsx("h3",{className:"font-medium text-sm",children:i.q}),e===o?a.jsx(Lv,{className:"h-4 w-4 text-muted-foreground shrink-0 mt-0.5"}):a.jsx(na,{className:"h-4 w-4 text-muted-foreground shrink-0 mt-0.5"})]}),e===o&&a.jsx("p",{className:"text-muted-foreground text-sm mt-2 leading-relaxed",children:i.a})]},o))})]})})]})};function xe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function tn(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Ct(e,t){const n=xe(e);return isNaN(t)?tn(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Hn(e,t){const n=xe(e);if(isNaN(t))return tn(e,NaN);if(!t)return n;const r=n.getDate(),s=tn(e,n.getTime());s.setMonth(n.getMonth()+t+1,0);const i=s.getDate();return r>=i?s:(n.setFullYear(s.getFullYear(),s.getMonth(),r),n)}const qy=6048e5,_z=864e5,kT=6e4,CT=36e5;let Nz={};function _c(){return Nz}function yr(e,t){var l,c,u,d;const n=_c(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=xe(e),i=s.getDay(),o=(i<r?7:0)+i-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function Oi(e){return yr(e,{weekStartsOn:1}
416)}function _T(e){const t=xe(e),n=t.getFullYear(),r=tn(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=Oi(r),i=tn(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=Oi(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function la(e){const t=xe(e);return t.setHours(0,0,0,0),t}function Vd(e){const t=xe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ur(e,t){const n=la(e),r=la(t),s=+n-Vd(n),i=+r-Vd(r);return Math.round((s-i)/_z)}function Ez(e){const t=_T(e),n=tn(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Oi(n)}function Tg(e,t){const n=t*7;return Ct(e,n)}function Tz(e,t){return Hn(e,t*12)}function Pz(e){let t;return e.forEach(function(n){const r=xe(n);(t===void 0||t<r||isNaN(Number(r)))&&(t=r)}),t||new Date(NaN)}function Az(e){let t;return e.forEach(n=>{const r=xe(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function $t(e,t){const n=la(e),r=la(t);return+n==+r}function Ky(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Rz(e){if(!Ky(e)&&typeof e!="number")return!1;const t=xe(e);return!isNaN(Number(t))}function nc(e,t){const n=xe(e),r=xe(t),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function Oz(e,t,n){const r=yr(e,n),s=yr(t,n),i=+r-Vd(r),o=+s-Vd(s);return Math.round((i-o)/qy)}function Gy(e){const t=xe(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Ht(e){const t=xe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function NT(e){const t=xe(e),n=tn(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Yy(e,t){var l,c,u,d;const n=_c(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=xe(e),i=s.getDay(),o=(i<r?-7:0)+6-(i-r);return s.setDate(s.getDate()+o),s.setHours(23,59,59,999),s}function ET(e){return Yy(e,{weekStartsOn:1})}const Mz={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Dz=(e,t,n)=>{let r;const s=Mz[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function xm(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Iz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Lz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Fz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$z={date:xm({formats:Iz,defaultWidth:"full"}),time:xm({formats:Lz,defaultWidth:"full"}),dateTime:xm({formats:Fz,defaultWidth:"full"})},Bz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Uz=(e,t,n,r)=>Bz[e];function Ha(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):o;s=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[l]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const Vz={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Wz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hz={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},zz={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
416ay","Saturday"]},qz={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Kz={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Gz=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Yz={ordinalNumber:Gz,era:Ha({values:Vz,defaultWidth:"wide"}),quarter:Ha({values:Wz,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ha({values:Hz,defaultWidth:"wide"}),day:Ha({values:zz,defaultWidth:"wide"}),dayPeriod:Ha({values:qz,defaultWidth:"wide",formattingValues:Kz,defaultFormattingWidth:"wide"})};function za(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const o=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Qz(l,h=>h.test(o)):Jz(l,h=>h.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function Jz(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Qz(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Xz(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const l=t.slice(s.length);return{value:o,rest:l}}}const Zz=/^(\d+)(th|st|nd|rd)?/i,e9=/\d+/i,t9={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},n9={any:[/^b/i,/^(a|c)/i]},r9={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},s9={any:[/1/i,/2/i,/3/i,/4/i]},i9={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},o9={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},a9={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},l9={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},c9={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},u9={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},d9={ordinalNumber:Xz({matchPattern:Zz,parsePattern:e9,valueCallback:e=>parseInt(e,10)}),era:za({matchPatterns:t9,defaultMatchWidth:"wide",parsePatterns:n9,defaultParseWidth:"any"}),quarter:za({matchPatterns:r9,defaultMatchWidth:"wide",parsePatterns:s9,defaultParseWidth:"any",valueCallback:e=>e+1}),month:za({matchPatterns:i9,defaultMatchWidth:"wide",parsePatterns:o9,defaultParseWidth:"any"}),day:za({matchPatterns:a9,defaultMatchWidth:"wide",parsePatterns:l9,defaultParseWidth:"any"}),dayPeriod:za({matchPatterns:c9,defaultMatchWidth:"any",parsePatterns:u9,defaultParseWidth:"any"})},TT={code:"en-US",formatDistance:Dz,formatLong:$z,formatRelative:Uz,localize:Yz,match:d9,options:{weekStartsOn:0,firstWeekContainsDate:1}};function h9(e){const t=xe(e);return ur(t,NT(t))+1}function PT(e){const t=xe(e),n=+Oi(t)-+Ez(t);return Math.round(n/qy)+1}function AT(e,t){var d,h,f,m;
vendor: 6,465 bytes, line 416
416const n=xe(e),r=n.getFullYear(),s=_c(),i=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((m=(f=s.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,o=tn(e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const l=yr(o,t),c=tn(e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=yr(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function f9(e,t){var l,c,u,d;const n=_c(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=AT(e,t),i=tn(e,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),yr(i,t)}function RT(e,t){const n=xe(e),r=+yr(n,t)-+f9(n,t);return Math.round(r/qy)+1}function ke(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Qr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ke(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ke(n+1,2)},d(e,t){return ke(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ke(e.getHours()%12||12,t.length)},H(e,t){return ke(e.getHours(),t.length)},m(e,t){return ke(e.getMinutes(),t.length)},s(e,t){return ke(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return ke(s,t.length)}},io={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},E1={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Qr.y(e,t)},Y:function(e,t,n,r){const s=AT(e,r),i=s>0?s:1-s;if(t==="YY"){const o=i%100;return ke(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):ke(i,t.length)},R:function(e,t){const n=_T(e);return ke(n,t.length)},u:function(e,t){const n=e.getFullYear();return ke(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ke(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ke(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Qr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ke(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=RT(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):ke(s,t.length)},I:function(e,t,n){const r=PT(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ke(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Qr.d(e,t)},D:function(e,t,n){const r=h9(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ke(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ke(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ke(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return ke(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=io.noon:r===0?s=io.midnight:s=r/12>
vendor: 4,693 bytes, line 416
416=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=io.evening:r>=12?s=io.afternoon:r>=4?s=io.morning:s=io.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Qr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Qr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ke(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ke(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Qr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Qr.s(e,t)},S:function(e,t){return Qr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return P1(r);case"XXXX":case"XX":return oi(r);case"XXXXX":case"XXX":default:return oi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return P1(r);case"xxxx":case"xx":return oi(r);case"xxxxx":case"xxx":default:return oi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+T1(r,":");case"OOOO":default:return"GMT"+oi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+T1(r,":");case"zzzz":default:return"GMT"+oi(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return ke(r,t.length)},T:function(e,t,n){const r=e.getTime();return ke(r,t.length)}};function T1(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+t+ke(i,2)}function P1(e,t){return e%60===0?(e>0?"-":"+")+ke(Math.abs(e)/60,2):oi(e,t)}function oi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=ke(Math.trunc(r/60),2),i=ke(r%60,2);return n+s+t+i}const A1=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},OT=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},m9=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return A1(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",A1(r,t)).replace("{{time}}",OT(s,t))},p9={p:OT,P:m9},g9=/^D+$/,v9=/^Y+$/,y9=["D","DD","YY","YYYY"];function x9(e){return g9.test(e)}function w9(e){return v9.test(e)}function b9(e,t,n){const r=S9(e,t,n);if(console.warn(r),y9.includes(e))throw new RangeError(r)}function S9(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const j9=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,k9=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,C9=/^'([^]*?)'?$/,_9=/''/g,N9=/[a-zA-Z]/;function rt(e,t,n){var d,h,f,m,y,g,b,x;const r=_c(),s=(n==null?void 0:n.locale)??r.locale??TT,i=(n==null?void 0:n.firstWeekContainsDate)??((h=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((g=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((x=(b=r.locale)==null?void 0:b.options)==null?void 0:x.weekStartsOn)??0,l=xe(e);if(!Rz(l))throw new RangeError("Invalid time value");let c=t.match(k9).map(v=>{const w=v[0];if(w==="p"||w==="P"){const S=p9[w];return S(v,s.formatLong)}return v}).join("").match(j9).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const w=v[0];if(w==="'")return{isToken:!1,value:E9(v)};if(E1[w])return{isToken:!0,value:v};
vendor: 5,331 bytes, line 416
416if(w.match(N9))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:v}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return c.map(v=>{if(!v.isToken)return v.value;const w=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&w9(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&x9(w))&&b9(w,t,String(e));const S=E1[w[0]];return S(l,w,s.localize,u)}).join("")}function E9(e){const t=e.match(C9);return t?t[1].replace(_9,"'"):e}function T9(e){const t=xe(e),n=t.getFullYear(),r=t.getMonth(),s=tn(e,0);return s.setFullYear(n,r+1,0),s.setHours(0,0,0,0),s.getDate()}function P9(e){return Math.trunc(+xe(e)/1e3)}function A9(e){const t=xe(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function R9(e,t){return Oz(A9(e),Ht(e),t)+1}function Pg(e,t){const n=xe(e),r=xe(t);return n.getTime()>r.getTime()}function MT(e,t){const n=xe(e),r=xe(t);return+n<+r}function Jy(e,t){const n=xe(e),r=xe(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function O9(e,t){const n=xe(e),r=xe(t);return n.getFullYear()===r.getFullYear()}function wm(e,t){return Ct(e,-t)}function yu(e,t){const r=L9(e);let s;if(r.date){const c=F9(r.date,2);s=$9(c.restDateString,c.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const i=s.getTime();let o=0,l;if(r.time&&(o=B9(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(l=U9(r.timezone),isNaN(l))return new Date(NaN)}else{const c=new Date(i+o),u=new Date(0);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return new Date(i+o+l)}const xu={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},M9=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,D9=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,I9=/^([+-])(\d{2})(?::?(\d{2}))?$/;function L9(e){const t={},n=e.split(xu.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],xu.timeZoneDelimiter.test(t.date)&&(t.date=e.split(xu.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const s=xu.timezone.exec(r);s?(t.time=r.replace(s[1],""),t.timezone=s[1]):t.time=r}return t}function F9(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const s=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?s:i*100,restDateString:e.slice((r[1]||r[2]).length)}}function $9(e,t){if(t===null)return new Date(NaN);const n=e.match(M9);if(!n)return new Date(NaN);const r=!!n[4],s=qa(n[1]),i=qa(n[2])-1,o=qa(n[3]),l=qa(n[4]),c=qa(n[5])-1;if(r)return q9(t,l,c)?V9(t,l,c):new Date(NaN);{const u=new Date(0);return!H9(t,i,o)||!z9(t,s)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(s,o)),u)}}function qa(e){return e?parseInt(e):1}function B9(e){const t=e.match(D9);if(!t)return NaN;const n=bm(t[1]),r=bm(t[2]),s=bm(t[3]);return K9(n,r,s)?n*CT+r*kT+s*1e3:NaN}function bm(e){return e&&parseFloat(e.replace(",","."))||0}function U9(e){if(e==="Z")return 0;const t=e.match(I9);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return G9(r,s)?n*(r*CT+s*kT):NaN}function V9(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const s=r.getUTCDay()||7,i=(t-1)*7+n+1-s;return r.setUTCDate(r.getUTCDate()+i),r}const W9=[31,null,31,30,31,30,31,31,30,31,30,31];function DT(e){return e%400===0||e%4===0&&e%100!==0}function H9(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(W9[t]||(DT(e)?29:28))}function z9(e,t){return t>=1&&t<=(DT(e)?366:365)}function q9(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function K9(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function G9(e,t){return t>=0&&t<=59}function Sm(e,t){const n=xe(e),r=n.getFullYear(),s=n.getDate(),i=tn(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const o=T9(i);return n.setMonth(t,Math.min(s,o)),n}function R1(e,t){const n=xe(e);return isNaN(+n)?tn(e,NaN):(n.setFullYear(t),n)}var oe=function(){return oe=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},oe.apply(this,arguments)};function Y9(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function IT(e,t,n){for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Nc(e){return e.mode==="multiple"}function Ec(e){return e.mode==="range"}function Hh(e){return e.mode==="single"}var J9={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rd
416p-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function Q9(e,t){return rt(e,"LLLL y",t)}function X9(e,t){return rt(e,"d",t)}function Z9(e,t){return rt(e,"LLLL",t)}function eq(e){return"".concat(e)}function tq(e,t){return rt(e,"cccccc",t)}function nq(e,t){return rt(e,"yyyy",t)}var rq=Object.freeze({__proto__:null,formatCaption:Q9,formatDay:X9,formatMonthCaption:Z9,formatWeekNumber:eq,formatWeekdayName:tq,formatYearCaption:nq}),sq=function(e,t,n){return rt(e,"do MMMM (EEEE)",n)},iq=function(){return"Month: "},oq=function(){return"Go to next month"},aq=function(){return"Go to previous month"},lq=function(e,t){return rt(e,"cccc",t)},cq=function(e){return"Week n. ".concat(e)},uq=function(){return"Year: "},dq=Object.freeze({__proto__:null,labelDay:sq,labelMonthDropdown:iq,labelNext:oq,labelPrevious:aq,labelWeekNumber:cq,labelWeekday:lq,labelYearDropdown:uq});function hq(){var e="buttons",t=J9,n=TT,r={},s={},i=1,o={},l=new Date;return{captionLayout:e,classNames:t,formatters:rq,labels:dq,locale:n,modifiersClassNames:r,modifiers:s,numberOfMonths:i,styles:o,today:l,mode:"default"}}function fq(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,s=e.toMonth,i=e.fromDate,o=e.toDate;return r?i=Ht(r):t&&(i=new Date(t,0,1)),s?o=Gy(s):n&&(o=new Date(n,11,31)),{fromDate:i?la(i):void 0,toDate:o?la(o):void 0}}var LT=p.createContext(void 0);function mq(e){var t,n=e.initialProps,r=hq(),s=fq(n),i=s.fromDate,o=s.toDate,l=(t=n.captionLayout)!==null&&t!==void 0?t:r.captionLayout;l!=="buttons"&&(!i||!o)&&(l="buttons");var c;(Hh(n)||Nc(n)||Ec(n))&&(c=n.onSelect);var u=oe(oe(oe({},r),n),{captionLayout:l,classNames:oe(oe({},r.classNames),n.classNames),components:oe({},n.components),formatters:oe(oe({},r.formatters),n.formatters),fromDate:i,labels:oe(oe({},r.labels),n.labels),mode:n.mode||r.mode,modifiers:oe(oe({},r.modifiers),n.modifiers),modifiersClassNames:oe(oe({},r.modifiersClassNames),n.modifiersClassNames),onSelect:c,styles:oe(oe({},r.styles),n.styles),toDate:o});return a.jsx(LT.Provider,{value:u,children:e.children})}function Re(){var e=p.useContext(LT);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function FT(e){var t=Re(),n=t.locale,r=t.classNames,s=t.styles,i=t.formatters.formatCaption;return a.jsx("div",{className:r.caption_label,style:s.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:n})})}function pq(e){return a.jsx("svg",oe({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:a.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function $T(e){var t,n,r=e.onChange,s=e.value,i=e.children,o=e.caption,l=e.className,c=e.style,u=Re(),d=(n=(t=u.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&n!==void 0?n:pq;return a.jsxs("div",{className:l,style:c,children:[a.jsx("span",{className:u.classNames.vhidden,children:e["aria-label"]}),a.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:u.classNames.dropdown,style:u.styles.dropdown,value:s,onChange:r,children:i}),a.jsxs("div",{className:u.classNames.caption_label,style:u.styles.caption_label,"aria-hidden":"true",children:[o,a.jsx(d,{className:u.classNames.dropdown_icon,style:u.styles.dropdown_icon})]})]})}
416function gq(e){var t,n=Re(),r=n.fromDate,s=n.toDate,i=n.styles,o=n.locale,l=n.formatters.formatMonthCaption,c=n.classNames,u=n.components,d=n.labels.labelMonthDropdown;if(!r)return a.jsx(a.Fragment,{});if(!s)return a.jsx(a.Fragment,{});var h=[];if(O9(r,s))for(var f=Ht(r),m=r.getMonth();m<=s.getMonth();m++)h.push(Sm(f,m));else for(var f=Ht(new Date),m=0;m<=11;m++)h.push(Sm(f,m));var y=function(b){var x=Number(b.target.value),v=Sm(Ht(e.displayMonth),x);e.onChange(v)},g=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:$T;return a.jsx(g,{name:"months","aria-label":d(),className:c.dropdown_month,style:i.dropdown_month,onChange:y,value:e.displayMonth.getMonth(),caption:l(e.displayMonth,{locale:o}),children:h.map(function(b){return a.jsx("option",{value:b.getMonth(),children:l(b,{locale:o})},b.getMonth())})})}function vq(e){var t,n=e.displayMonth,r=Re(),s=r.fromDate,i=r.toDate,o=r.locale,l=r.styles,c=r.classNames,u=r.components,d=r.formatters.formatYearCaption,h=r.labels.labelYearDropdown,f=[];if(!s)return a.jsx(a.Fragment,{});if(!i)return a.jsx(a.Fragment,{});for(var m=s.getFullYear(),y=i.getFullYear(),g=m;g<=y;g++)f.push(R1(NT(new Date),g));var b=function(v){var w=R1(Ht(n),Number(v.target.value));e.onChange(w)},x=(t=u==null?void 0:u.Dropdown)!==null&&t!==void 0?t:$T;return a.jsx(x,{name:"years","aria-label":h(),className:c.dropdown_year,style:l.dropdown_year,onChange:b,value:n.getFullYear(),caption:d(n,{locale:o}),children:f.map(function(v){return a.jsx("option",{value:v.getFullYear(),children:d(v,{locale:o})},v.getFullYear())})})}function yq(e,t){var n=p.useState(e),r=n[0],s=n[1],i=t===void 0?r:t;return[i,s]}function xq(e){var t=e.month,n=e.defaultMonth,r=e.today,s=t||n||r||new Date,i=e.toDate,o=e.fromDate,l=e.numberOfMonths,c=l===void 0?1:l;if(i&&nc(i,s)<0){var u=-1*(c-1);s=Hn(i,u)}return o&&nc(s,o)<0&&(s=o),Ht(s)}function wq(){var e=Re(),t=xq(e),n=yq(t,e.month),r=n[0],s=n[1],i=function(o){var l;if(!e.disableNavigation){var c=Ht(o);s(c),(l=e.onMonthChange)===null||l===void 0||l.call(e,c)}};return[r,i]}function bq(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,s=Ht(e),i=Ht(Hn(s,r)),o=nc(i,s),l=[],c=0;c<o;c++){var u=Hn(s,c);l.push(u)}return n&&(l=l.reverse()),l}function Sq(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,s=t.numberOfMonths,i=s===void 0?1:s,o=r?i:1,l=Ht(e);if(!n)return Hn(l,o);var c=nc(n,e);if(!(c<i))return Hn(l,o)}}function jq(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,s=t.numberOfMonths,i=s===void 0?1:s,o=r?i:1,l=Ht(e);if(!n)return Hn(l,-o);var c=nc(l,n);if(!(c<=0))return Hn(l,-o)}}var BT=p.createContext(void 0);
416function kq(e){var t=Re(),n=wq(),r=n[0],s=n[1],i=bq(r,t),o=Sq(r,t),l=jq(r,t),c=function(h){return i.some(function(f){return Jy(h,f)})},u=function(h,f){c(h)||(f&&MT(h,f)?s(Hn(h,1+t.numberOfMonths*-1)):s(h))},d={currentMonth:r,displayMonths:i,goToMonth:s,goToDate:u,previousMonth:l,nextMonth:o,isDateDisplayed:c};return a.jsx(BT.Provider,{value:d,children:e.children})}function Tc(){var e=p.useContext(BT);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function O1(e){var t,n=Re(),r=n.classNames,s=n.styles,i=n.components,o=Tc().goToMonth,l=function(d){o(Hn(d,e.displayIndex?-e.displayIndex:0))},c=(t=i==null?void 0:i.CaptionLabel)!==null&&t!==void 0?t:FT,u=a.jsx(c,{id:e.id,displayMonth:e.displayMonth});return a.jsxs("div",{className:r.caption_dropdowns,style:s.caption_dropdowns,children:[a.jsx("div",{className:r.vhidden,children:u}),a.jsx(gq,{onChange:l,displayMonth:e.displayMonth}),a.jsx(vq,{onChange:l,displayMonth:e.displayMonth})]})}function Cq(e){return a.jsx("svg",oe({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:a.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function _q(e){return a.jsx("svg",oe({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:a.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Wd=p.forwardRef(function(e,t){var n=Re(),r=n.classNames,s=n.styles,i=[r.button_reset,r.button];e.className&&i.push(e.className);var o=i.join(" "),l=oe(oe({},s.button_reset),s.button);return e.style&&Object.assign(l,e.style),a.jsx("button",oe({},e,{ref:t,type:"button",className:o,style:l}))});function Nq(e){var t,n,r=Re(),s=r.dir,i=r.locale,o=r.classNames,l=r.styles,c=r.labels,u=c.labelPrevious,d=c.labelNext,h=r.components;if(!e.nextMonth&&!e.previousMonth)return a.jsx(a.Fragment,{});var f=u(e.previousMonth,{locale:i}),m=[o.nav_button,o.nav_button_previous].join(" "),y=d(e.nextMonth,{locale:i}),g=[o.nav_button,o.nav_button_next].join(" "),b=(t=h==null?void 0:h.IconRight)!==null&&t!==void 0?t:_q,x=(n=h==null?void 0:h.IconLeft)!==null&&n!==void 0?n:Cq;return a.jsxs("div",{className:o.nav,style:l.nav,children:[!e.hidePrevious&&a.jsx(Wd,{name:"previous-month","aria-label":f,className:m,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:s==="rtl"?a.jsx(b,{className:o.nav_icon,style:l.nav_icon}):a.jsx(x,{className:o.nav_icon,style:l.nav_icon})}),!e.hideNext&&a.jsx(Wd,{name:"next-month","aria-label":y,className:g,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:s==="rtl"?a.jsx(x,{className:o.nav_icon,style:l.nav_icon}):a.jsx(b,{className:o.nav_icon,style:l.nav_icon})})]})}function M1(e){var t=Re().numberOfMonths,n=Tc(),r=n.previousMonth,s=n.nextMonth,i=n.goToMonth,o=n.displayMonths,l=o.findIndex(function(y){return Jy(e.displayMonth,y)}),c=l===0,u=l===o.length-1,d=t>1&&(c||!u),h=t>1&&(u||!c),f=function(){r&&i(r)},m=function(){s&&i(s)};return a.jsx(Nq,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:h,nextMonth:s,previousMonth:r,onPreviousClick:f,onNextClick:m})}
416function Eq(e){var t,n=Re(),r=n.classNames,s=n.disableNavigation,i=n.styles,o=n.captionLayout,l=n.components,c=(t=l==null?void 0:l.CaptionLabel)!==null&&t!==void 0?t:FT,u;return s?u=a.jsx(c,{id:e.id,displayMonth:e.displayMonth}):o==="dropdown"?u=a.jsx(O1,{displayMonth:e.displayMonth,id:e.id}):o==="dropdown-buttons"?u=a.jsxs(a.Fragment,{children:[a.jsx(O1,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),a.jsx(M1,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=a.jsxs(a.Fragment,{children:[a.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),a.jsx(M1,{displayMonth:e.displayMonth,id:e.id})]}),a.jsx("div",{className:r.caption,style:i.caption,children:u})}function Tq(e){var t=Re(),n=t.footer,r=t.styles,s=t.classNames.tfoot;return n?a.jsx("tfoot",{className:s,style:r.tfoot,children:a.jsx("tr",{children:a.jsx("td",{colSpan:8,children:n})})}):a.jsx(a.Fragment,{})}function Pq(e,t,n){for(var r=n?Oi(new Date):yr(new Date,{locale:e,weekStartsOn:t}),s=[],i=0;i<7;i++){var o=Ct(r,i);s.push(o)}return s}function Aq(){var e=Re(),t=e.classNames,n=e.styles,r=e.showWeekNumber,s=e.locale,i=e.weekStartsOn,o=e.ISOWeek,l=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,u=Pq(s,i,o);return a.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&a.jsx("td",{style:n.head_cell,className:t.head_cell}),u.map(function(d,h){return a.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":c(d,{locale:s}),children:l(d,{locale:s})},h)})]})}function Rq(){var e,t=Re(),n=t.classNames,r=t.styles,s=t.components,i=(e=s==null?void 0:s.HeadRow)!==null&&e!==void 0?e:Aq;return a.jsx("thead",{style:r.head,className:n.head,children:a.jsx(i,{})})}function Oq(e){var t=Re(),n=t.locale,r=t.formatters.formatDay;return a.jsx(a.Fragment,{children:r(e.date,{locale:n})})}var Qy=p.createContext(void 0);function Mq(e){if(!Nc(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return a.jsx(Qy.Provider,{value:t,children:e.children})}return a.jsx(Dq,{initialProps:e.initialProps,children:e.children})}function Dq(e){var t=e.initialProps,n=e.children,r=t.selected,s=t.min,i=t.max,o=function(u,d,h){var f,m;(f=t.onDayClick)===null||f===void 0||f.call(t,u,d,h);var y=!!(d.selected&&s&&(r==null?void 0:r.length)===s);if(!y){var g=!!(!d.selected&&i&&(r==null?void 0:r.length)===i);if(!g){var b=r?IT([],r):[];if(d.selected){var x=b.findIndex(function(v){return $t(u,v)});b.splice(x,1)}else b.push(u);(m=t.onSelect)===null||m===void 0||m.call(t,b,u,d,h)}}},l={disabled:[]};r&&l.disabled.push(function(u){var d=i&&r.length>i-1,h=r.some(function(f){return $t(f,u)});return!!(d&&!h)});var c={selected:r,onDayClick:o,modifiers:l};return a.jsx(Qy.Provider,{value:c,children:n})}function Xy(){var e=p.useContext(Qy);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Iq(e,t){var n=t||{},r=n.from,s=n.to;return r&&s?$t(s,e)&&$t(r,e)?void 0:$t(s,e)?{from:s,to:void 0}:$t(r,e)?void 0:Pg(r,e)?{from:e,to:s}:{from:r,to:e}:s?Pg(e,s)?{from:s,to:e}:{from:e,to:s}:r?MT(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var Zy=p.createContext(void 0);function Lq(e){if(!Ec(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return a.jsx(Zy.Provider,{value:t,children:e.children})}return a.jsx(Fq,{initialProps:e.initialProps,children:e.children})}function Fq(e){var t=e.initialProps,n=e.children,r=t.selected,s=r||{},i=s.from,o=s.to,l=t.min,c=t.max,u=function(m,y,g){var b,x;(b=t.onDayClick)===null||b===void 0||b.call(t,m,y,g);var v=Iq(m,r);(x=t.onSelect)===null||x===void 0||x.call(t,v,m,y,g)},d={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(d.range_start=[i],o?(d.range_end=[o],$t(i,o)||(d.range_middle=[{after:i,before:o}])):d.range_end=[i]):o&&(d.range_start=[o],d.range_end=[o]),l&&(i&&!o&&d.disabled.push({after:wm(i,l-1),before:Ct(i,l-1)}),i&&o&&d.disabled.push({after:i,before:Ct(i,l-1)}),!i&&o&&d.disabled.push({after:wm(o,l-1),before:Ct(o,l-1)})),c){if(i&&!o&&(d.disabled.push({before:Ct(i,-c+1)}),d.disabled.push({after:Ct(i,c-1)})),i&&o){var h=ur(o,i)+1,f=c-h;d.disabled.push({before:wm(i,f)}),d.disabled.push({after:Ct(o,f)})}!i&&o&&(d.disabled.push({before:Ct(o,-c+1)}),d.disabled.push({after:Ct(o,c-1)}))}return a.jsx(Zy.Provider,{value:{selected:r,onDayClick:u,modifiers:d},children:n})}function ex(){var e=p.useContext(Zy);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Yu(e){return Array.isArray(e)?IT([],e):e!==void 0?[e]:[]}function $q(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],s=n[1];t[r]=Yu(s)}),t}var zn;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(zn||(zn={}));var Bq=zn.Selected,jr=zn.Disabled,Uq=zn.Hidden,Vq=zn.Today,jm=zn.RangeEnd,km=zn.RangeMiddle,Cm=zn.RangeStart,Wq=zn.Outside;function Hq(e,t,n){var r,s=(r={},r[Bq]=Yu(e.selected),r[jr]=Yu(e.disabled),r[Uq]=Yu(e.hidden),r[Vq]=[e.today],r[jm]=[],r[km]=[],r[Cm]=[],r[Wq]=[],r);return e.fromDate&&s[jr].push({before:e.fromDate}),e.toDate&&s[jr].push({after:e.toDate}
416),Nc(e)?s[jr]=s[jr].concat(t.modifiers[jr]):Ec(e)&&(s[jr]=s[jr].concat(n.modifiers[jr]),s[Cm]=n.modifiers[Cm],s[km]=n.modifiers[km],s[jm]=n.modifiers[jm]),s}var UT=p.createContext(void 0);function zq(e){var t=Re(),n=Xy(),r=ex(),s=Hq(t,n,r),i=$q(t.modifiers),o=oe(oe({},s),i);return a.jsx(UT.Provider,{value:o,children:e.children})}function VT(){var e=p.useContext(UT);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function qq(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Kq(e){return!!(e&&typeof e=="object"&&"from"in e)}function Gq(e){return!!(e&&typeof e=="object"&&"after"in e)}function Yq(e){return!!(e&&typeof e=="object"&&"before"in e)}function Jq(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Qq(e,t){var n,r=t.from,s=t.to;if(r&&s){var i=ur(s,r)<0;i&&(n=[s,r],r=n[0],s=n[1]);var o=ur(e,r)>=0&&ur(s,e)>=0;return o}return s?$t(s,e):r?$t(r,e):!1}function Xq(e){return Ky(e)}function Zq(e){return Array.isArray(e)&&e.every(Ky)}function eK(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(Xq(n))return $t(e,n);if(Zq(n))return n.includes(e);if(Kq(n))return Qq(e,n);if(Jq(n))return n.dayOfWeek.includes(e.getDay());if(qq(n)){var r=ur(n.before,e),s=ur(n.after,e),i=r>0,o=s<0,l=Pg(n.before,n.after);return l?o&&i:i||o}return Gq(n)?ur(e,n.after)>0:Yq(n)?ur(n.before,e)>0:typeof n=="function"?n(e):!1})}function tx(e,t,n){var r=Object.keys(t).reduce(function(i,o){var l=t[o];return eK(e,l)&&i.push(o),i},[]),s={};return r.forEach(function(i){return s[i]=!0}),n&&!Jy(e,n)&&(s.outside=!0),s}function tK(e,t){for(var n=Ht(e[0]),r=Gy(e[e.length-1]),s,i,o=n;o<=r;){var l=tx(o,t),c=!l.disabled&&!l.hidden;if(!c){o=Ct(o,1);continue}if(l.selected)return o;l.today&&!i&&(i=o),s||(s=o),o=Ct(o,1)}return i||s}var nK=365;function WT(e,t){var n=t.moveBy,r=t.direction,s=t.context,i=t.modifiers,o=t.retry,l=o===void 0?{count:0,lastFocused:e}:o,c=s.weekStartsOn,u=s.fromDate,d=s.toDate,h=s.locale,f={day:Ct,week:Tg,month:Hn,year:Tz,startOfWeek:function(b){return s.ISOWeek?Oi(b):yr(b,{locale:h,weekStartsOn:c})},endOfWeek:function(b){return s.ISOWeek?ET(b):Yy(b,{locale:h,weekStartsOn:c})}},m=f[n](e,r==="after"?1:-1);r==="before"&&u?m=Pz([u,m]):r==="after"&&d&&(m=Az([d,m]));var y=!0;if(i){var g=tx(m,i);y=!g.disabled&&!g.hidden}return y?m:l.count>nK?l.lastFocused:WT(m,{moveBy:n,direction:r,context:s,modifiers:i,retry:oe(oe({},l),{count:l.count+1})})}var HT=p.createContext(void 0);function rK(e){var t=Tc(),n=VT(),r=p.useState(),s=r[0],i=r[1],o=p.useState(),l=o[0],c=o[1],u=tK(t.displayMonths,n),d=s??(l&&t.isDateDisplayed(l))?l:u,h=function(){c(s),i(void 0)},f=function(b){i(b)},m=Re(),y=function(b,x){if(s){var v=WT(s,{moveBy:b,direction:x,context:m,modifiers:n});$t(s,v)||(t.goToDate(v,s),f(v))}},g={focusedDay:s,focusTarget:d,blur:h,focus:f,focusDayAfter:function(){return y("day","after")},focusDayBefore:function(){return y("day","before")},focusWeekAfter:function(){return y("week","after")},focusWeekBefore:function(){return y("week","before")},focusMonthBefore:function(){return y("month","before")},focusMonthAfter:function(){return y("month","after")},focusYearBefore:function(){return y("year","before")},focusYearAfter:function(){return y("year","after")},focusStartOfWeek:function(){return y("startOfWeek","before")},focusEndOfWeek:function(){return y("endOfWeek","after")}};return a.jsx(HT.Provider,{value:g,children:e.children})}function nx(){var e=p.useContext(HT);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function sK(e,t){var n=VT(),r=tx(e,n,t);return r}var rx=p.createContext(void 0);function iK(e){if(!Hh(e.initialProps)){var t={selected:void 0};return a.jsx(rx.Provider,{value:t,children:e.children})}return a.jsx(oK,{initialProps:e.initialProps,children:e.children})}function oK(e){var t=e.initialProps,n=e.children,r=function(i,o,l){var c,u,d;if((c=t.onDayClick)===null||c===void 0||c.call(t,i,o,l),o.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,i,o,l);return}(d=t.onSelect)===null||d===void 0||d.call(t,i,i,o,l)}
416,s={selected:t.selected,onDayClick:r};return a.jsx(rx.Provider,{value:s,children:n})}function zT(){var e=p.useContext(rx);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function aK(e,t){var n=Re(),r=zT(),s=Xy(),i=ex(),o=nx(),l=o.focusDayAfter,c=o.focusDayBefore,u=o.focusWeekAfter,d=o.focusWeekBefore,h=o.blur,f=o.focus,m=o.focusMonthBefore,y=o.focusMonthAfter,g=o.focusYearBefore,b=o.focusYearAfter,x=o.focusStartOfWeek,v=o.focusEndOfWeek,w=function(O){var C,N,I,V;Hh(n)?(C=r.onDayClick)===null||C===void 0||C.call(r,e,t,O):Nc(n)?(N=s.onDayClick)===null||N===void 0||N.call(s,e,t,O):Ec(n)?(I=i.onDayClick)===null||I===void 0||I.call(i,e,t,O):(V=n.onDayClick)===null||V===void 0||V.call(n,e,t,O)},S=function(O){var C;f(e),(C=n.onDayFocus)===null||C===void 0||C.call(n,e,t,O)},j=function(O){var C;h(),(C=n.onDayBlur)===null||C===void 0||C.call(n,e,t,O)},k=function(O){var C;(C=n.onDayMouseEnter)===null||C===void 0||C.call(n,e,t,O)},_=function(O){var C;(C=n.onDayMouseLeave)===null||C===void 0||C.call(n,e,t,O)},E=function(O){var C;(C=n.onDayPointerEnter)===null||C===void 0||C.call(n,e,t,O)},P=function(O){var C;(C=n.onDayPointerLeave)===null||C===void 0||C.call(n,e,t,O)},T=function(O){var C;(C=n.onDayTouchCancel)===null||C===void 0||C.call(n,e,t,O)},F=function(O){var C;(C=n.onDayTouchEnd)===null||C===void 0||C.call(n,e,t,O)},D=function(O){var C;(C=n.onDayTouchMove)===null||C===void 0||C.call(n,e,t,O)},G=function(O){var C;(C=n.onDayTouchStart)===null||C===void 0||C.call(n,e,t,O)},M=function(O){var C;(C=n.onDayKeyUp)===null||C===void 0||C.call(n,e,t,O)},Y=function(O){var C;switch(O.key){case"ArrowLeft":O.preventDefault(),O.stopPropagation(),n.dir==="rtl"?l():c();break;case"ArrowRight":O.preventDefault(),O.stopPropagation(),n.dir==="rtl"?c():l();break;case"ArrowDown":O.preventDefault(),O.stopPropagation(),u();break;case"ArrowUp":O.preventDefault(),O.stopPropagation(),d();break;case"PageUp":O.preventDefault(),O.stopPropagation(),O.shiftKey?g():m();break;case"PageDown":O.preventDefault(),O.stopPropagation(),O.shiftKey?b():y();break;case"Home":O.preventDefault(),O.stopPropagation(),x();break;case"End":O.preventDefault(),O.stopPropagation(),v();break}(C=n.onDayKeyDown)===null||C===void 0||C.call(n,e,t,O)},$={onClick:w,onFocus:S,onBlur:j,onKeyDown:Y,onKeyUp:M,onMouseEnter:k,onMouseLeave:_,onPointerEnter:E,onPointerLeave:P,onTouchCancel:T,onTouchEnd:F,onTouchMove:D,onTouchStart:G};return $}function lK(){var e=Re(),t=zT(),n=Xy(),r=ex(),s=Hh(e)?t.selected:Nc(e)?n.selected:Ec(e)?r.selected:void 0;return s}function cK(e){return Object.values(zn).includes(e)}function uK(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var s=e.modifiersClassNames[r];if(s)n.push(s);else if(cK(r)){var i=e.classNames["day_".concat(r)];i&&n.push(i)}}),n}function dK(e,t){var n=oe({},e.styles.day);return Object.keys(t).forEach(function(r){var s;n=oe(oe({},n),(s=e.modifiersStyles)===null||s===void 0?void 0:s[r])}),n}function hK(e,t,n){var r,s,i,o=Re(),l=nx(),c=sK(e,t),u=aK(e,c),d=lK(),h=!!(o.onDayCl
416ick||o.mode!=="default");p.useEffect(function(){var k;c.outside||l.focusedDay&&h&&$t(l.focusedDay,e)&&((k=n.current)===null||k===void 0||k.focus())},[l.focusedDay,e,n,h,c.outside]);var f=uK(o,c).join(" "),m=dK(o,c),y=!!(c.outside&&!o.showOutsideDays||c.hidden),g=(i=(s=o.components)===null||s===void 0?void 0:s.DayContent)!==null&&i!==void 0?i:Oq,b=a.jsx(g,{date:e,displayMonth:t,activeModifiers:c}),x={style:m,className:f,children:b,role:"gridcell"},v=l.focusTarget&&$t(l.focusTarget,e)&&!c.outside,w=l.focusedDay&&$t(l.focusedDay,e),S=oe(oe(oe({},x),(r={disabled:c.disabled,role:"gridcell"},r["aria-selected"]=c.selected,r.tabIndex=w||v?0:-1,r)),u),j={isButton:h,isHidden:y,activeModifiers:c,selectedDays:d,buttonProps:S,divProps:x};return j}function fK(e){var t=p.useRef(null),n=hK(e.date,e.displayMonth,t);return n.isHidden?a.jsx("div",{role:"gridcell"}):n.isButton?a.jsx(Wd,oe({name:"day",ref:t},n.buttonProps)):a.jsx("div",oe({},n.divProps))}function mK(e){var t=e.number,n=e.dates,r=Re(),s=r.onWeekNumberClick,i=r.styles,o=r.classNames,l=r.locale,c=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,d=u(Number(t),{locale:l});if(!s)return a.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:d});var h=c(Number(t),{locale:l}),f=function(m){s(t,n,m)};return a.jsx(Wd,{name:"week-number","aria-label":h,className:o.weeknumber,style:i.weeknumber,onClick:f,children:d})}function pK(e){var t,n,r=Re(),s=r.styles,i=r.classNames,o=r.showWeekNumber,l=r.components,c=(t=l==null?void 0:l.Day)!==null&&t!==void 0?t:fK,u=(n=l==null?void 0:l.WeekNumber)!==null&&n!==void 0?n:mK,d;return o&&(d=a.jsx("td",{className:i.cell,style:s.cell,children:a.jsx(u,{number:e.weekNumber,dates:e.dates})})),a.jsxs("tr",{className:i.row,style:s.row,children:[d,e.dates.map(function(h){return a.jsx("td",{className:i.cell,style:s.cell,role:"presentation",children:a.jsx(c,{displayMonth:e.displayMonth,date:h})},P9(h))})]})}function D1(e,t,n){for(var r=n!=null&&n.ISOWeek?ET(t):Yy(t,n),s=n!=null&&n.ISOWeek?Oi(e):yr(e,n),i=ur(r,s),o=[],l=0;l<=i;l++)o.push(Ct(s,l));var c=o.reduce(function(u,d){var h=n!=null&&n.ISOWeek?PT(d):RT(d,n),f=u.find(function(m){return m.weekNumber===h});return f?(f.dates.push(d),u):(u.push({weekNumber:h,dates:[d]}),u)},[]);return c}function gK(e,t){var n=D1(Ht(e),Gy(e),t);if(t!=null&&t.useFixedWeeks){var r=R9(e,t);if(r<6){var s=n[n.length-1],i=s.dates[s.dates.length-1],o=Tg(i,6-r),l=D1(Tg(i,1),o,t);n.push.apply(n,l)}}return n}function vK(e){var t,n,r,s=Re(),i=s.locale,o=s.classNames,l=s.styles,c=s.hideHead,u=s.fixedWeeks,d=s.components,h=s.weekStartsOn,f=s.firstWeekContainsDate,m=s.ISOWeek,y=gK(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:m,locale:i,weekStartsOn:h,firstWeekContainsDate:f}),g=(t=d==null?void 0:d.Head)!==null&&t!==void 0?t:Rq,b=(n=d==null?void 0:d.Row)!==null&&n!==void 0?n:pK,x=(r=d==null?void 0:d.Footer)!==null&&r!==void 0?r:Tq;return a.jsxs("table",{id:e.id,className:o.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&a.jsx(g,{}),a.jsx("tbody",{className:o.tbody,style:l.tbody,children:y.map(function(v){return a.jsx(b,{displayMonth:e.displayMonth,dates:v.dates,weekNumber:v.weekNumber},v.weekNumber)})}),a.jsx(x,{displayMonth:e.displayMonth})]})}function yK(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var xK=yK()?p.useLayoutEffect:p.useEffect,_m=!1,wK=0;function I1(){return"react-day-picker-".concat(++wK)}function bK(e){var t,n=e??(_m?I1():null),r=p.useState(n),s=r[0],i=r[1];return xK(function(){s===null&&i(I1())},[]),p.useEffect(function(){_m===!1&&(_m=!0)},[]),(t=e??s)!==null&&t!==void 0?t:void 0}function SK(e){var t,n,r=Re(),s=r.dir,i=r.classNames,o=r.styles,l=r.components,c=Tc().displayMonths,u=bK(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),d=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,h=[i.month],f=o.month,m=e.displayIndex===0,y=e.displayIndex===c.length-1,g=!m&&!y;s==="rtl"&&(t=[m,y],y=t[0],m=t[1]),m&&(h.push(i.caption_start),f=oe(oe({},f),o.caption_start)),y&&(h.push(i.caption_end),f=oe(oe({},f),o.caption_end)),g&&(h.push(i.caption_between),f=oe(oe({},f),o.caption_between));var b=(n=l==null?void 0:l.Caption)!==null&&n!==void 0?n:Eq;return a.jsxs("div",{className:h.join(" "),style:f,children:[a.jsx(b,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),a.jsx(vK,{id:d,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function jK(e){var t=Re(),n=t.classNames,r=t.styles;return a.jsx("div",{className:n.months,style:r.months,children:e.children})}function kK(e){var t,n,r=e.initialProps,s=Re(),i=nx(),o=Tc(),l=p.useState(!1),c=l[0],u=l[1];p.useEffect(function(){s.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),u(!0)))},[s.initialFocus,c,i.focus,i.focusTarget,i]);var d=[s.classNames.root,s.className];s.numberOfMonths>1&&d.push(s.classNames.multiple_months),s.showWeekNumber&&d.push(s.classNames.with_weeknumber);var h=oe(oe({},s.styles.root),s.style),f=Object.keys(r).filter(function(y){return y.startsWith("data-")}).reduce(function(y,g){var b;return oe(oe({},y),(b={},b[g]=r[g],b))},{}),m=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:jK;return a.jsx("div",oe({className:d.join(" "),style:h,dir:s.dir,id:s.id,nonce:r.nonce,title:r.title,lang:r.lang},f,{children:a.jsx(m,{children:o.displayMonths.map(function(y,g){return a.jsx(SK,{displayIndex:g,displayMonth:y},g)})})}))}function CK(e){var t=e.children,n=Y9(e,["children"]);return a.jsx(mq,{initialProps:n,children:a.jsx(kq,{children:a.jsx(iK,{initialProps:n,children:a.jsx(Mq,{initialProps:n,children:a.jsx(Lq,{initialProps:n,children:a.jsx(zq,{children:a.jsx(rK,{children:t})})})})})})})}function _K(e){return a.jsx(CK,oe({},e,{children:a.jsx(kK,{initialProps:e})}))}function sx({className:e,classNames:t,showOutsideDays:n=!0,...r}){return a.jsx(_K,{showOutsideDays:n,className:ee("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:sp
416ace-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:ee(kg({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:ee(kg({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:({...s})=>a.jsx(jM,{className:"h-4 w-4"}),IconRight:({...s})=>a.jsx(Lk,{className:"h-4 w-4"})},...r})}sx.displayName="Calendar";var zh="Popover",[qT,JG]=sn(zh,[Bs]),Pc=Bs(),[NK,Ws]=qT(zh),KT=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!1}=e,l=Pc(t),c=p.useRef(null),[u,d]=p.useState(!1),[h,f]=pr({prop:r,defaultProp:s??!1,onChange:i,caller:zh});return a.jsx(ey,{...l,children:a.jsx(NK,{scope:t,contentId:$n(),triggerRef:c,open:h,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:p.useCallback(()=>d(!0),[]),onCustomAnchorRemove:p.useCallback(()=>d(!1),[]),modal:o,children:n})})};KT.displayName=zh;var GT="PopoverAnchor",EK=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Ws(GT,n),i=Pc(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=s;return p.useEffect(()=>(o(),()=>l()),[o,l]),a.jsx(pc,{...i,...r,ref:t})});EK.displayName=GT;var YT="PopoverTrigger",JT=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Ws(YT,n),i=Pc(n),o=fe(t,s.triggerRef),l=a.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":tP(s.open),...r,ref:o,onClick:B(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?l:a.jsx(pc,{asChild:!0,...i,children:l})});JT.displayName=YT;var ix="PopoverPortal",[TK,PK]=qT(ix,{forceMount:void 0}),QT=e=>{const{__scopePopover:t,forceMount:n,children:r,container:s}=e,i=Ws(ix,t);return a.jsx(TK,{scope:t,forceMount:n,children:a.jsx(qt,{present:n||i.open,children:a.jsx(fa,{asChild:!0,container:s,children:r})})})};QT.displayName=ix;var ca="PopoverContent",XT=p.forwardRef((e,t)=>{const n=PK(ca,e.__scopePopover),{forceMount:r=n.forceMount,...s}=e,i=Ws(ca,e.__scopePopover);return a.jsx(qt,{present:r||i.open,children:i.modal?a.jsx(RK,{...s,ref:t}):a.jsx(OK,{...s,ref:t})})});XT.displayName=ca;var AK=As("PopoverContent.RemoveScroll"),RK=p.forwardRef((e,t)=>{const n=Ws(ca,e.__scopePopover),r=p.useRef(null),s=fe(t,r),i=p.useRef(!1);return p.useEffect(()=>{const o=r.current;if(o)return Fh(o)},[]),a.jsx(jc,{as:AK,allowPinchZoom:!0,children:a.jsx(ZT,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),i.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:B(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),OK=p.forwardRef((e,t)=>{const n=Ws(ca,e.__scopePopover),r=p.useRef(!1),s=p.useRef(!1);return a.jsx(ZT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),ZT=p.forwardRef((e,t)=>
416{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...h}=e,f=Ws(ca,n),m=Pc(n);return Ih(),a.jsx(bc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:a.jsx(Bi,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:a.jsx(yh,{"data-state":tP(f.open),role:"dialog",id:f.contentId,...m,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),eP="PopoverClose",MK=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Ws(eP,n);return a.jsx(se.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>s.onOpenChange(!1))})});MK.displayName=eP;var DK="PopoverArrow",IK=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Pc(n);return a.jsx(xh,{...s,...r,ref:t})});IK.displayName=DK;function tP(e){return e?"open":"closed"}var LK=KT,FK=JT,$K=QT,nP=XT;const rP=LK,sP=FK,ox=p.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>a.jsx($K,{children:a.jsx(nP,{ref:s,align:t,sideOffset:n,className:ee("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));ox.displayName=nP.displayName;const BK=()=>{const[e,t]=p.useState(!1),[n,r]=p.useState(),[s,i]=p.useState({name:"",nhsNumber:"",gpSurgery:"",medication:"",dosage:"",notes:""}),o=l=>{l.preventDefault(),re.success("Prescription request submitted successfully!"),t(!0)};return e?a.jsx(ve,{seo:{title:"Order a Repeat Prescription Online",description:"Submit your NHS repeat prescription request to Oxenhope Pharmacy in Keighley quickly and securely online."},children:a.jsx("section",{className:"py-24 md:py-32",children:a.jsxs("div",{className:"container max-w-lg text-center",children:[a.jsx(mh,{className:"h-16 w-16 text-primary mx-auto mb-4"}),a.jsx("h1",{className:"font-heading text-3xl font-bold mb-3",children:"Request Received"}),a.jsx("p",{className:"text-muted-foreground mb-6",children:"Thank you! We've received your prescription request and will prepare your medication. We'll contact you if we need any additional information."}),a.jsx(J,{onClick:()=>{t(!1),i({name:"",nhsNumber:"",gpSurgery:"",medication:"",dosage:"",notes:""}),r(void 0)},children:"Submit Another"})]})})}):a.jsx(ve,{children:a.jsx("section",{className:"py-16 md:py-20 bg-secondary/30",children:a.jsxs("div",{className:"container max-w-2xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-2",children:"Order a Prescription"}),a.jsx("p",{className:"text-muted-foreground mb-8",children:"Fill in the details below and we'll prepare your prescription for collection or free local delivery."}),a.jsxs("form",{onSubmit:o,className:"space-y-4 bg-background p-6 md:p-8 rounded-xl border",children:[a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Full Name *"}),a.jsx(z,{value:s.name,onChange:l=>i({...s,name:l.target.value}),required:!0,maxLength:100})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Date of Birth *"}),a.jsxs(rP,{children:[a.jsx(sP,{asChild:!0,children:a.jsxs(J,{variant:"outline",className:ee("w-full justify-start text-left font-normal",!n&&"text-muted-foreground"),children:[a.jsx(ma,{className:"mr-2 h-4 w-4"}),n?rt(n,"dd/MM/yyyy"):"Select date"]})}),a.jsx(ox,{className:"w-auto p-0",align:"start",children:a.jsx(sx,{mode:"single",selected:n,onSelect:r,disabled:l=>l>new Date||l<new Date("1900-01-01"),initialFocus:!0,className:ee("p-3 pointer-events-auto")})})]})]})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"NHS Number"}),a.jsx(z,{value:s.nhsNumber,onChange:l=>i({...s,nhsNumber:l.target.value}),placeholder:"Optional",maxLength:20})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"GP Surgery *"}),a.jsx(z,{value:s.gpSurgery,onChange:l=>i({...s,gpSurgery:l.target.value}),required:!0,maxLength:100})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Medication Name(s) *"}),a.jsx(z,{value:s.medication,onChange:l=>i({...s,medication:l.target.value}),placeholder:"e.g. Amoxicillin, Omeprazole",required:!0,maxLength:300})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Dosage / Strength"}),a.jsx(z,{value:s.dosage,onChange:l=>i({...s,dosage:l.target.value}),placeholder:"e.g. 500mg, 20mg",maxLength:100})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Additional Notes"}),a.jsx(Pt,{value:s.notes,onChange:l=>i({...s,notes:l.target.value}),placeholder:"Delivery preference, allergies, or other info",rows:3,maxLength:500})]}),a.jsx(J,{type:"submit",className:"w-full",children:"Submit Prescription Request"})]})]})})})};function L1(e,[t,n]){return Math.min(n,Math.max(t,e))}function ax(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var UK=[" ","Enter","ArrowUp","ArrowDown"],VK=[" ","Enter"],Mi="Select",[qh,Kh,WK]=ch(Mi),[Ca,QG]=sn(Mi,[WK,Bs]),Gh=Bs(),[HK,Hs]=Ca(Mi),[zK,qK]=Ca(Mi),iP=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:f,required:m,form:y}=e,g=Gh(t),[b,x]=p.useState(null),[v,w]=p.useState(null),[S,j]=p.useState(!1),k=Dh(u),[_,E]=pr({prop:r,defaultProp:s??!1,onChange:i,caller:Mi}),[P,T]=pr({prop:o,defaultProp:l,onChange:c,caller:Mi}),F=p.useRef(null),D=b?y||!!b.closest("form"):!0,[G,M]=p.useState(new Set),Y=Array.from(G).map($=>$.props.value).join(";");return a.jsx(ey,{...g,children:a.jsxs(HK,{required:m,scope:t,trigger:b,onTriggerChange:x,valueNode:v,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:$n(),value:P,onValueChange:T,open:_,onOpenChange:E,dir:k,triggerPointerDownPosRef:F,disabled:f,children:[a.jsx(qh.Provider,{scope:t,children:a.jsx(zK,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback($=>{M(O=>new Set(O).add($))},[]),onNativeOptionRemove:p.useCallback($=>{M(O=>{const C=new Set(O);return C.delete($),C})},[]),children:n})}),D?a.jsxs(TP,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:h,value:P,onChange:$=>T($.target.value),disabled:f,form:y,children:[P===void 0?a.jsx("option",{value:""}):null,Array.from(G)]},Y):null]})})};iP.displayName=Mi;var oP="SelectTrigger",aP=p.forwardRef((e,t)=>
vendor: 16,806 bytes, line 416
416{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=Gh(n),o=Hs(oP,n),l=o.disabled||r,c=fe(t,o.onTriggerChange),u=Kh(n),d=p.useRef("touch"),[h,f,m]=AP(g=>{const b=u().filter(w=>!w.disabled),x=b.find(w=>w.value===o.value),v=RP(b,g,x);v!==void 0&&o.onValueChange(v.value)}),y=g=>{l||(o.onOpenChange(!0),m()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return a.jsx(pc,{asChild:!0,...i,children:a.jsx(se.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":PP(o.value)?"":void 0,...s,ref:c,onClick:B(s.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&y(g)}),onPointerDown:B(s.onPointerDown,g=>{d.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:B(s.onKeyDown,g=>{const b=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(b&&g.key===" ")&&UK.includes(g.key)&&(y(),g.preventDefault())})})})});aP.displayName=oP;var lP="SelectValue",cP=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...l}=e,c=Hs(lP,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,h=fe(t,c.onValueNodeChange);return pt(()=>{u(d)},[u,d]),a.jsx(se.span,{...l,ref:h,style:{pointerEvents:"none"},children:PP(c.value)?a.jsx(a.Fragment,{children:o}):i})});cP.displayName=lP;var KK="SelectIcon",uP=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return a.jsx(se.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});uP.displayName=KK;var GK="SelectPortal",dP=e=>a.jsx(fa,{asChild:!0,...e});dP.displayName=GK;var Di="SelectContent",hP=p.forwardRef((e,t)=>{const n=Hs(Di,e.__scopeSelect),[r,s]=p.useState();if(pt(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?$i.createPortal(a.jsx(fP,{scope:e.__scopeSelect,children:a.jsx(qh.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),i):null}return a.jsx(mP,{...e,ref:t})});hP.displayName=Di;var Nn=10,[fP,zs]=Ca(Di),YK="SelectContentImpl",JK=As("SelectContent.RemoveScroll"),mP=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:m,sticky:y,hideWhenDetached:g,avoidCollisions:b,...x}=e,v=Hs(Di,n),[w,S]=p.useState(null),[j,k]=p.useState(null),_=fe(t,U=>S(U)),[E,P]=p.useState(null),[T,F]=p.useState(null),D=Kh(n),[G,M]=p.useState(!1),Y=p.useRef(!1);p.useEffect(()=>{if(w)return Fh(w)},[w]),Ih();const $=p.useCallback(U=>{const[we,...be]=D().map(Se=>Se.ref.current),[pe]=be.slice(-1),ge=document.activeElement;for(const Se of U)if(Se===ge||(Se==null||Se.scrollIntoView({block:"nearest"}),Se===we&&j&&(j.scrollTop=0),Se===pe&&j&&(j.scrollTop=j.scrollHeight),Se==null||Se.focus(),document.activeElement!==ge))return},[D,j]),O=p.useCallback(()=>$([E,w]),[$,E,w]);p.useEffect(()=>{G&&O()},[G,O]);const{onOpenChange:C,triggerPointerDownPosRef:N}=v;p.useEffect(()=>{if(w){let U={x:0,y:0};const we=pe=>{var ge,Se;U={x:Math.abs(Math.round(pe.pageX)-(((ge=N.current)==null?void 0:ge.x)??0)),y:Math.abs(Math.round(pe.pageY)-(((Se=N.current)==null?void 0:Se.y)??0))}},be=pe=>{U.x<=10&&U.y<=10?pe.preventDefault():w.contains(pe.target)||C(!1),document.removeEventListener("pointermove",we),N.current=null};return N.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",be,{capture:!0})}}},[w,C,N]),p.useEffect(()=>{const U=()=>C(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[C]);const[I,V]=AP(U=>{const we=D().filter(ge=>!ge.disabled),be=we.find(ge=>ge.ref.current===document.activeElement),pe=RP(we,U,be);pe&&setTimeout(()=>pe.ref.current.focus())}),W=p.useCallback((U,we,be)=>{const pe=!Y.current&&!be;(v.value!==void 0&&v.value===we||pe)&&(P(U),pe&&(Y.current=!0))},[v.value]),le=p.useCallback(()=>w==null?void 0:w.focus(),[w]),ae=p.useCallback((U,we,be)=>{const pe=!Y.current&&!be;(v.value!==void 0&&v.value===we||pe)&&F(U)},[v.value]),_e=r==="popper"?Ag:pP,Ne=_e===Ag?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:m,sticky:y,hideWhenDetached:g,avoidCollisions:b}:{};return a.jsx(fP,{scope:n,content:w,viewport:j,onViewportChange:k,itemRefCallback:W,selectedItem:E,onItemLeave:le,itemTextRefCallback:ae,focusSelectedItem:O,selectedItemText:T,position:r,isPositioned:G,searchRef:I,children:a.jsx(jc,{as:JK,allowPinchZoom:!0,children:a.jsx(bc,{asChild:!0,trapped:v.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:B(s,U=>{var we;(we=v.trigger)==null||we.focus({preventScroll:!0}),U.preventDefault()}),children:a.jsx(Bi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:a.jsx(_e,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:U=>U.preventDefault(),...x,...Ne,onPlaced:()=>M(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:B(x.onKeyDown,U=>{const we=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!we&&U.key.length===1&&V(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let pe=D().filter(ge=>!ge.disabled).map(ge=>ge.ref.current);if(["ArrowUp","End"].includes(U.key)&&(pe=pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const ge=U.target,Se=pe.indexOf(ge);pe=pe.slice(Se+1)}setTimeout(()=>$(pe)),U.preventDefault()}})})})})})})});mP.displayName=YK;var QK="SelectItemAlignedPosition",pP=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=Hs(Di,n),o=zs(Di,n),[l,c]=p.useState(null),[u,d]=p.useState(null),h=fe(t,_=>d(_)),f=Kh(n),m=p.useRef(!1),y=p.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:x,focusSelectedItem:v}=o,w=p.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&g&&b&&x){const _=i.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),P=i.valueNode.getBoundingClientRect(),T=x.getBoundingClientRect();if(i.dir!=="rtl"){const ge=T.left-E.left,Se=P.left-ge,gt=_.left-Se,on=_.width+gt,qs=Math.max(on,E.width),Hr=window.innerWidth-Nn,Ks=L1(Se,[Nn,Math.max(Nn,Hr-qs)]);l.style.minWidth=on+"px",l.style.left=Ks+"px"}else{const ge=E.right-T.right,Se=window.innerWidth-P.right-ge,gt=window.innerWidth-_.right-Se,on=_.width+gt,qs=Math.max(on,E.width),Hr=window.innerWidth-Nn,Ks=L1(Se,[Nn,Math.max(Nn,Hr-qs)]);l.style.minWidth=on+"px",l.style.right=Ks+"px"}const F=f(),D=window.innerHeight-Nn*2,G=g.scrollHeight,M=window.getComputedStyle(u),Y=parseInt(M.borderTopWidth,10),$=parseInt(M.paddingTop,10),O=parseInt(M.borderBottomWidth,10),C=parseInt(M.paddingBottom,10),N=Y+$+G+C+O,I=Math.min(b.offsetHeight*5,N),V=window.getComputedStyle(g),W=parseInt(V.paddingTop,10),le=parseInt(V.paddingBottom,10),ae=_.top+_.height/2-Nn,_e=D-ae,Ne=b.offsetHeight/2,U=b.offsetTop+Ne,we=Y+$+U,be=N-we;if(we<=ae){const ge=F.length>0&&b===F[F.length-1].ref.current;l.style.bottom="0px";const Se=u.clientHeight-g.offsetTop-g.offsetHeight,gt=Math.max(_e,Ne+(ge?le:0)+Se+O),on=we+gt;l.style.height=on+"px"}else{const ge=F.length>0&&b===F[0].ref.current;l.style.top="0px";const gt=Math.max(ae,Y+g.offsetTop+(ge?W:0)+Ne)+be;l.style.height=gt+"px",g.scrollTop=we-ae+g.offsetTop}l.style.margin=`${Nn}px 0`,l.style.minHeight=I+"px",l.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[f,i.trigger,i.valueNode,l,u,g,b,x,i.dir,r]);pt(()=>w(),[w]);const[S,j]=p.useState();pt(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const k=p.useCallback(_=>{_&&y.current===!0&&(w(),v==null||v(),y.current=!1)},[w,v]);return a.jsx(ZK,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:k,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:a.jsx(se.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});pP.displayName=QK;var XK="SelectPopperPosition",Ag=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Nn,...i}=e,o=Gh(n);return a.jsx(yh,{...o,...i,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ag.displayName=XK;var[ZK,lx]=Ca(Di,{}),Rg="SelectViewport",gP=p.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=zs(Rg,n),o=lx(Rg,n),l=fe(t,i.onViewportChange),c=p.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),a.jsx(qh.Slot,{scope:n,children:a.jsx(se.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:B(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&h){const m=Math.abs(c.current-d.scrollTop);if(m>0){const y=window.innerHeight-Nn*2,g=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),x=Math.max(g,b);if(x<y){const v=x+m,w=Math.min(y,v),S=v-w;h.style.height=w+"px",h.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});gP.displayName=Rg;var vP="SelectGroup",[e7,t7]=Ca(vP),n7=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=$n();return a.jsx(e7,{scope:n,id:s,children:a.jsx(se.div,{role:"group","aria-labelledby":s,...r,ref:t})})});n7.displayName=vP;var yP="SelectLabel",xP=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=t7(yP,n);return a.jsx(se.div,{id:s.id,...r,ref:t})});xP.displayName=yP;var Hd="SelectItem",[r7,wP]=Ca(Hd),bP=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,l=Hs(Hd,n),c=zs(Hd,n),u=l.value===r,[d,h]=p.useState(i??""),[f,m]=p.useState(!1),y=fe(t,v=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,v,r,s)}),g=$n(),b=p.useRef("touch"),x=()=>{s||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(r7,{scope:n,value:r,disabled:s,textId:g,isSelected:u,onItemTextChange:p.useCallback(v=>{h(w=>w||((v==null?void 0:v.textContent)??"").trim())},[]),children:a.jsx(qh.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:a.jsx(se.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:y,onFocus:B(o.onFocus,()=>m(!0)),onBlur:B(o.onBlur,()=>m(!1)),onClick:B(o.onClick,()=>{b.current!=="mouse"&&x()}),onPointerUp:B(o.onPointerUp,()=>{b.current==="mouse"&&x()}),onPointerDown:B(o.onPointerDown,v=>{b.current=v.pointerType}),onPointerMove:B(o.onPointerMove,v=>{var w;b.current=v.pointerType,s?(w=c.onItemLeave)==null||w.call(c):b.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(o.onPointerLeave,v=>{var w;v.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:B(o.onKeyDown,v=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&v.key===" "||(VK.includes(v.key)&&x(),v.key===" "&&v.preventDefault())})})})})});bP.displayName=Hd;var nl="SelectItemText",SP=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=Hs(nl,n),l=zs(nl,n),c=wP(nl,n),u=qK(nl,n),[d,h]=p.useState(null),f=fe(t,x=>h(x),c.onItemTextChange,x=>{var v;return(v=l.itemTextRefCallback)==null?void 0:v.call(l,x,c.value,c.disabled)}),m=d==null?void 0:d.textContent,y=p.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=u;return pt(()=>(g(y),()=>b(y)),[g,b,y]),a.jsxs(a.Fragment,{children:[a.jsx(se.span,{id:c.textId,...i,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?$i.createPortal(i.children,o.valueNode):null]})});SP.displayName=nl;var jP="SelectItemIndicator",kP=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return wP(jP,n).isSelected?a.jsx(se.span,{"aria-hidden":!0,...r,ref:t}):null});kP.displayName=jP;var Og="SelectScrollUpButton",CP=p.forwardRef((e,t)=>{const n=zs(Og,e.__scopeSelect),r=lx(Og,e.__scopeSelect),[s,i]=p.useState(!1),o=fe(t,r.onScrollButtonChange);return pt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(NP,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});CP.displayName=Og;var Mg="SelectScrollDownButton",_P=p.forwardRef((e,t)=>{const n=zs(Mg,e.__scopeSelect),r=lx(Mg,e.__scopeSelect),[s,i]=p.useState(!1),o=fe(t,r.onScrollButtonChange);return pt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;i(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(NP,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});_P.displayName=Mg;var NP=p.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=zs("SelectScrollButton",n),o=p.useRef(null),l=Kh(n),c=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),pt(()=>{var d;const u=l().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),a.jsx(se.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:B(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:B(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:B(s.onPointerLeave,()=>{c()})})}),s7="SelectSeparator",EP=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(se.div,{"aria-hidden":!0,...r,ref:t})});EP.displayName=s7;var Dg="SelectArrow",i7=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Gh(n),i=Hs(Dg,n),o=zs(Dg,n);return i.open&&o.position==="popper"?a.jsx(xh,{...s,...r,ref:t}):null});i7.displayName=Dg;var o7="SelectBubbleInput",TP=p.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=p.useRef(null),i=fe(r,s),o=ax(t);return p.useEffect(()=>{const l=s.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&d){const h=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(h)}},[o,t]),a.jsx(se.select,{...n,style:{...fk,...n.style},ref:i,defaultValue:t})});TP.displayName=o7;function PP(e){return e===""||e===void 0}function AP(e){const t=zt(e),n=p.useRef(""),r=p.useRef(0),s=p.useCallback(o=>{const l=n.current+o;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function RP(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=a7(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function a7(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var l7=iP,OP=aP,c7=cP,u7=uP,d7=dP,MP=hP,h7=gP,DP=xP,IP=bP,f7=SP,m7=kP,LP=CP,FP=_P,$P=EP;const _s=l7,Ns=c7,Or=p.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(OP,{ref:r,className:ee("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
416ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,a.jsx(u7,{asChild:!0,children:a.jsx(na,{className:"h-4 w-4 opacity-50"})})]}));Or.displayName=OP.displayName;const BP=p.forwardRef(({className:e,...t},n)=>a.jsx(LP,{ref:n,className:ee("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Lv,{className:"h-4 w-4"})}));BP.displayName=LP.displayName;const UP=p.forwardRef(({className:e,...t},n)=>a.jsx(FP,{ref:n,className:ee("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(na,{className:"h-4 w-4"})}));UP.displayName=FP.displayName;const Mr=p.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>a.jsx(d7,{children:a.jsxs(MP,{ref:s,className:ee("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[a.jsx(BP,{}),a.jsx(h7,{className:ee("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(UP,{})]})}));Mr.displayName=MP.displayName;const p7=p.forwardRef(({className:e,...t},n)=>a.jsx(DP,{ref:n,className:ee("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));p7.displayName=DP.displayName;const et=p.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(IP,{ref:r,className:ee("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(m7,{children:a.jsx(fh,{className:"h-4 w-4"})})}),a.jsx(f7,{children:t})]}));et.displayName=IP.displayName;const g7=p.forwardRef(({className:e,...t},n)=>a.jsx($P,{ref:n,className:ee("-mx-1 my-1 h-px bg-muted",e),...t}));g7.displayName=$P.displayName;const v7=()=>{const[e,t]=p.useState(!1),[n,r]=p.useState(),[s,i]=p.useState(""),[o,l]=p.useState(""),[c,u]=p.useState({name:"",email:"",phone:"",notes:""}),[d,h]=p.useState([]),[f,m]=p.useState([]),[y,g]=p.useState(!1);p.useEffect(()=>{Q.from("services").select("title").eq("is_published",!0).eq("is_bookable",!0).order("display_order").then(({data:v})=>h((v??[]).map(w=>w.title))),Q.from("time_slots").select("weekday,slot_time").eq("is_active",!0).then(({data:v})=>m(v??[]))},[]);const b=n?f.filter(v=>v.weekday===n.getDay()).map(v=>v.slot_time).sort():[],x=async v=>{if(v.preventDefault(),!n||!s||!o)return re.error("Please select a service, date and time.");g(!0);const w=crypto.randomUUID(),S=rt(n,"EEEE d MMMM yyyy"),{error:j}=await Q.from("bookings").insert({id:w,service:o,appointment_date:rt(n,"yyyy-MM-dd"),appointment_time:s,customer_name:c.name,customer_email:c.email||null,customer_phone:c.phone,notes:c.notes||null});if(j)return g(!1),re.error(j.message);const k={name:c.name,email:c.email,phone:c.phone,service:o,date:S,time:s,notes:c.notes};Q.functions.invoke("send-transactional-email",{body:{templateName:"booking-notification",recipientEmail:"[email protected]",idempotencyKey:`booking-notify-${w}`,templateData:k}}),c.email&&Q.functions.invoke("send-transactional-email",{body:{templateName:"booking-confirmation",recipientEmail:c.email,idempotencyKey:`booking-confirm-${w}`,templateData:k}}),g(!1),re.success("Appointment request submitted!"),t(!0)};return e?a.jsx(ve,{seo:{title:"Book a Pharmacy Appointment Online",description:"Book a clinic appointment with Oxenhope Pharmacy in Keighley — vaccinations, consultations, weight loss and more."},children:a.jsx("section",{className:"py-24 md:py-32",children:a.jsxs("div",{className:"container max-w-lg text-center",children:[a.jsx(mh,{className:"h-16 w-16 text-primary mx-auto mb-4"}),a.jsx("h1",{className:"font-heading text-3xl font-bold mb-3",children:"Booking Received"}),a.jsxs("p",{className:"text-muted-foreground mb-2",children:["We've received your request for ",a.jsx("strong",{children:o})," on"," ",a.jsx("strong",{children:n&&rt(n,"EEEE d MMMM yyyy")})," at ",a.jsx("strong",{children:s}),"."]}),a.jsx("p",{className:"text-muted-foreground mb-6",children:"We'll be in touch shortly to confirm."}),a.jsx(J,{onClick:()=>
416{t(!1),u({name:"",email:"",phone:"",notes:""}),r(void 0),i(""),l("")},children:"Book Another"})]})})}):a.jsx(ve,{children:a.jsx("section",{className:"py-16 md:py-20 bg-secondary/30",children:a.jsxs("div",{className:"container max-w-2xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-2",children:"Book an Appointment"}),a.jsx("p",{className:"text-muted-foreground mb-8",children:"Select a service, pick a convenient date and time, and we'll take care of the rest."}),a.jsxs("form",{onSubmit:x,className:"space-y-4 bg-background p-6 md:p-8 rounded-xl border",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Service *"}),a.jsxs(_s,{value:o,onValueChange:l,children:[a.jsx(Or,{children:a.jsx(Ns,{placeholder:"Choose a service"})}),a.jsx(Mr,{children:d.map(v=>a.jsx(et,{value:v,children:v},v))})]})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Preferred Date *"}),a.jsxs(rP,{children:[a.jsx(sP,{asChild:!0,children:a.jsxs(J,{variant:"outline",className:ee("w-full justify-start text-left font-normal",!n&&"text-muted-foreground"),children:[a.jsx(ma,{className:"mr-2 h-4 w-4"}),n?rt(n,"dd/MM/yyyy"):"Pick a date"]})}),a.jsx(ox,{className:"w-auto p-0",align:"start",children:a.jsx(sx,{mode:"single",selected:n,onSelect:v=>{r(v),i("")},disabled:v=>v<new Date(new Date().setHours(0,0,0,0))||!f.some(w=>w.weekday===v.getDay()),initialFocus:!0,className:ee("p-3 pointer-events-auto")})})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Preferred Time *"}),a.jsxs(_s,{value:s,onValueChange:i,disabled:!n,children:[a.jsx(Or,{children:a.jsx(Ns,{placeholder:n?"Choose a time":"Pick a date first"})}),a.jsx(Mr,{children:b.map(v=>a.jsx(et,{value:v,children:v},v))})]})]})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Full Name *"}),a.jsx(z,{value:c.name,onChange:v=>u({...c,name:v.target.value}),required:!0,maxLength:100})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Phone *"}),a.jsx(z,{type:"tel",value:c.phone,onChange:v=>u({...c,phone:v.target.value}),required:!0,maxLength:20})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Email"}),a.jsx(z,{type:"email",value:c.email,onChange:v=>u({...c,email:v.target.value}),maxLength:255})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Notes"}),a.jsx(Pt,{value:c.notes,onChange:v=>u({...c,notes:v.target.value}),placeholder:"Anything we should know?",rows:3,maxLength:500})]}),a.jsx(J,{type:"submit",className:"w-full",disabled:y,children:y?"Submitting…":"Request Appointment"})]})]})})})},y7={hidden:{opacity:0,y:20},visible:e=>({opacity:1,y:0,transition:{delay:e*.06,duration:.5}})},x7=[{name:"Hepatitis A",price:"£50",doses:"1 dose",info:"Most destinations in Asia, Africa, South America."},{name:"Hepatitis B",price:"£40 / dose",doses:"3 doses",info:"Travellers at risk through activities or destination."},{name:"Typhoid",price:"£35",doses:"1 dose",info:"Areas with poor sanitation."},{name:"Cholera",price:"£35",doses:"2 doses",info:"Aid workers and high-risk areas."},{name:"Rabies",price:"£65 / dose",doses:"3 doses",info:"Travellers at risk of animal bites."},{name:"Japanese Encephalitis",price:"£95 / dose",doses:"2 doses",info:"Rural travel in South-East Asia."},{name:"Meningitis ACWY",price:"£50",doses:"1 dose",info:"Saudi Arabia, parts of Africa."},{name:"Yellow Fever",price:"£70",doses:"1 dose",info:"Many countries in Africa and South America."}],w7=()=>{const[e,t]=p.useState({name:"",email:"",phone:"",destination:"",date:"",notes:""}),n=r=>{r.preventDefault(),re.success("Booking request submitted! We'll call you to confirm your appointment."),t({name:"",email:"",phone:"",destination:"",date:"",notes:""})};return a.jsxs(ve,{seo:{title:"Travel Vaccines & Travel Clinic",description:"Travel vaccinations and antimalarials at Oxenhope Pharmacy in Keighley. Stay protected on your trip with our private travel clinic."},children:[a.jsxs("section",{className:"relative py-24 md:py-32",children:[a.jsxs("div",{className:"absolute inset-0",children:[a.jsx("img",{src:ST,alt:"Travel vaccines",className:"w-full h-full object-cover"}
416),a.jsx("div",{className:"absolute inset-0 bg-foreground/55"})]}),a.jsxs("div",{className:"container relative z-10 text-primary-foreground",children:[a.jsx("h1",{className:"font-heading text-4xl md:text-5xl font-bold mb-3",children:"Travel vaccines"}),a.jsx("p",{className:"text-lg opacity-90 max-w-lg",children:"Expert travel health advice and vaccinations for your trip."})]})]}),a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h2",{className:"font-heading text-2xl font-bold mb-2",children:"Available vaccines"}),a.jsx("p",{className:"text-muted-foreground text-sm mb-8",children:"Book a consultation and we'll advise which vaccines you need for your destination."}),a.jsx("div",{className:"border rounded-xl overflow-hidden",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"bg-secondary/60 text-left",children:[a.jsx("th",{className:"px-4 py-3 font-semibold",children:"Vaccine"}),a.jsx("th",{className:"px-4 py-3 font-semibold hidden sm:table-cell",children:"Doses"}),a.jsx("th",{className:"px-4 py-3 font-semibold text-right",children:"Price"})]})}),a.jsx("tbody",{className:"divide-y",children:x7.map((r,s)=>a.jsxs(Mn.tr,{initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:s,variants:y7,children:[a.jsxs("td",{className:"px-4 py-3",children:[a.jsx("span",{className:"font-medium",children:r.name}),a.jsx("span",{className:"block text-muted-foreground text-xs mt-0.5",children:r.info})]}),a.jsx("td",{className:"px-4 py-3 text-muted-foreground hidden sm:table-cell",children:r.doses}),a.jsx("td",{className:"px-4 py-3 text-right font-medium text-primary",children:r.price})]},r.name))})]})})]})}),a.jsx("section",{className:"py-14 bg-secondary/40",children:a.jsxs("div",{className:"container max-w-xl",children:[a.jsx("h2",{className:"font-heading text-2xl font-bold mb-2",children:"Book a travel consultation"}),a.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"Tell us where you're heading and we'll advise on the vaccines you need."}),a.jsxs("form",{onSubmit:n,className:"space-y-3",children:[a.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[a.jsx(z,{placeholder:"Full name",value:e.name,onChange:r=>t({...e,name:r.target.value}),required:!0,maxLength:100}),a.jsx(z,{placeholder:"Email",type:"email",value:e.email,onChange:r=>t({...e,email:r.target.value}),required:!0,maxLength:255})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[a.jsx(z,{placeholder:"Phone number",type:"tel",value:e.phone,onChange:r=>t({...e,phone:r.target.value}),required:!0,maxLength:20}),a.jsx(z,{placeholder:"Destination",value:e.destination,onChange:r=>t({...e,destination:r.target.value}),required:!0,maxLength:100})]}),a.jsx(z,{placeholder:"Preferred date",type:"date",value:e.date,onChange:r=>t({...e,date:r.target.value}),required:!0}),a.jsx(Pt,{placeholder:"Any notes (allergies, previous vaccines, etc.)",value:e.notes,onChange:r=>t({...e,notes:r.target.value}),maxLength:500,rows:3}),a.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground bg-terracotta-light p-3 rounded-md",children:[a.jsx(kM,{className:"h-3.5 w-3.5 text-accent shrink-0 mt-0.5"}),a.jsx("span",{children:"We recommend booking at least 6–8 weeks before travel."})]}),a.jsx(J,{type:"submit",children:"Request appointment"})]})]})})]})},b7="/assets/contact-illustrator-BksRZ1jz.jpg",S7=()=>{const[e,t]=p.useState({name:"",email:"",phone:"",subject:"",message:""}),[n,r]=p.useState(!1),s=async i=>{i.preventDefault(),r(!0);const o=crypto.randomUUID(),l={id:o,name:e.name.trim(),email:e.email.trim().toLowerCase(),phone:e.phone.trim()||null,subject:e.subject||null,message:e.message.trim()},{error:c}=await Q.from("contact_submissions").insert(l);if(c){r(!1),re.error("Could not send message. Please try again.");return}await Q.functions.invoke("send-transactional-email",{body:{templateName:"contact-notification",recipientEmail:"[email protected]",idempotencyKey:`contact-notify-${o}`,templateData:{name:l.name,email:l.email,phone:l.phone,subject:l.subject,message:l.message}}}),await Q.functions.invoke("send-transactional-email",{body:{templateName:"contact-confirmation",recipientEmail:l.email,idempotencyKey:`contact-confirm-${o}`,templateData:{name:l.name,message:l.message}}}),r(!1),re.success("Message sent! We'll get back to you shortly."),t({name:"",email:"",ph
416one:"",subject:"",message:""})};return a.jsxs(ve,{seo:{title:"Contact Oxenhope Pharmacy",description:"Get in touch with Oxenhope Pharmacy in Keighley. Find our address, opening hours, phone number and directions."},children:[a.jsxs("section",{className:"relative py-24 md:py-32",children:[a.jsxs("div",{className:"absolute inset-0",children:[a.jsx("img",{src:b7,alt:"Contact Oxenhope Pharmacy",className:"w-full h-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-foreground/55"})]}),a.jsxs("div",{className:"container relative z-10 text-primary-foreground",children:[a.jsx("h1",{className:"font-heading text-4xl md:text-5xl font-bold mb-3",children:"Contact us"}),a.jsx("p",{className:"text-lg opacity-90 max-w-lg",children:"Pop in, call, or send us a message — we'd love to hear from you."})]})]}),a.jsx("section",{className:"py-16 md:py-20",children:a.jsx("div",{className:"container",children:a.jsxs("div",{className:"grid lg:grid-cols-5 gap-12",children:[a.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[a.jsxs("div",{children:[a.jsxs("h3",{className:"font-heading font-semibold mb-1 flex items-center gap-2",children:[a.jsx(Ai,{className:"h-4 w-4 text-primary"})," Phone"]}),a.jsx("a",{href:"tel:01535649308",className:"text-muted-foreground hover:text-primary text-sm",children:"01535 649308"})]}),a.jsxs("div",{children:[a.jsxs("h3",{className:"font-heading font-semibold mb-1 flex items-center gap-2",children:[a.jsx(Pi,{className:"h-4 w-4 text-primary"})," Email"]}),a.jsx("a",{href:"mailto:[email protected]",className:"text-muted-foreground hover:text-primary text-sm",children:"[email protected]"})]}),a.jsxs("div",{children:[a.jsxs("h3",{className:"font-heading font-semibold mb-1 flex items-center gap-2",children:[a.jsx(Bv,{className:"h-4 w-4 text-primary"})," Address"]}),a.jsxs("p",{className:"text-muted-foreground text-sm",children:["Oxenhope Pharmacy, 36 Station Road,",a.jsx("br",{}),"Oxenhope, Keighley BD22 9JJ"]})]}),a.jsxs("div",{children:[a.jsxs("h3",{className:"font-heading font-semibold mb-1 flex items-center gap-2",children:[a.jsx(Fv,{className:"h-4 w-4 text-primary"})," Opening hours"]}),a.jsxs("div",{className:"text-muted-foreground text-sm space-y-0.5",children:[a.jsx("p",{children:"Mon–Fri: 9:00–18:00"}),a.jsx("p",{children:"Saturday: 9:00–12:00"}),a.jsx("p",{children:"Sunday: Closed"})]})]})]}),a.jsxs("div",{className:"lg:col-span-3",children:[a.jsx("h2",{className:"font-heading text-2xl font-bold mb-5",children:"Send us a message"}),a.jsxs("form",{onSubmit:s,className:"space-y-3",children:[a.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[a.jsx(z,{placeholder:"Full name",value:e.name,onChange:i=>t({...e,name:i.target.value}),required:!0,maxLength:100}),a.jsx(z,{placeholder:"Email",type:"email",value:e.email,onChange:i=>t({...e,email:i.target.value}),required:!0,maxLength:255})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[a.jsx(z,{placeholder:"Phone (optional)",type:"tel",value:e.phone,onChange:i=>t({...e,phone:i.target.value}),maxLength:20}),a.jsxs(_s,{value:e.subject,onValueChange:i=>t({...e,subject:i}),children:[a.jsx(Or,{children:a.jsx(Ns,{placeholder:"Subject"})}),a.jsxs(Mr,{children:[a.jsx(et,{value:"general",children:"General Enquiry"}),a.jsx(et,{value:"prescriptions",children:"Prescriptions"}),a.jsx(et,{value:"travel",children:"Travel Vaccines"}),a.jsx(et,{value:"services",children:"Health Services"}),a.jsx(et,{value:"feedback",children:"Feedback"})]})]})]}),a.jsx(Pt,{placeholder:"Your message…",value:e.message,onChange:i=>t({...e,message:i.target.value}),required:!0,rows:5,maxLength:1e3}),a.jsx(J,{type:"submit",disabled:n,children:n?"Sending…":"Send message"})]})]})]})})}),a.jsx("section",{className:"h-[350px] bg-secondary",children:a.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2362.123!2d-1.8501!3d53.8172!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNTPCsDQ5JzAyLjAiTiAxwrA1MScwMC40Ilc!5e0!3m2!1sen!2suk!4v1234567890",width:"100%",height:"100%",style:{border:0},allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Oxenhope Pharmacy location"})})]})},j7=hh("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Is({className:e,variant:t,...n}){return a.jsx("div",{className:ee(j7({variant:t}),e),...n})}const k7=()=>{const[e,t]=p.useState([]),[n,r]=p.useState(!0);return p.useEffect(()=>{Q.from("blog_posts").select("slug,title,excerpt,category,read_time,published_at,image_url").eq("is_published",!0).order("published_at",{ascending:!1}).then(({data:s})=>{t(s??[]),r(!1)})},[]),a.jsx(ve,{seo:{title:"Health News & Pharmacy Updates",description:"Health news, seasonal guides and pharmacy updates from the Oxenhope Pharmacy team in Keighley, West Yorkshire."},children:a.jsx("section",{className:"py-16 md:py-20 bg-secondary/30",children:a.jsxs("div",{className:"container max-w-4xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-2",children:"Health News"}),a.jsx("p",{className:"text-muted-foreground mb-10",children:"The latest health news, seasonal guides and updates from your community pharmacist."}),n?a.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):e.length===0?a.jsx("p",{className:"text-muted-foreground",children:"No articles yet — check back soon."}):a.jsx("div",{className:"grid gap-6",children:e.map(s=>a.jsx(X,{to:`/blog/${s.slug}`,children:a.jsxs(ut,{className:"hover:shadow-md transition-shadow overflow-hidden",children:[s.image_url&&a.jsx("img",{src:s.image_url,alt:s.title,className:"w-full h-48 object-cover"}),a.jsxs(dt,{className:"p-6",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-wrap",children:[s.category&&a.jsx(Is,{variant:"secondary",children:s.category}),a.jsx("span",{className:"text-xs text-muted-foreground",children:rt(new Date(s.published_at),"d MMMM yyyy")}),s.read_time&&a.jsxs("span",{className:"text-xs text-muted-foreground",children:["· ",s.read_time]})]}),a.jsx("h2",{className:"font-heading text-xl font-semibold mb-2",children:s.title}),a.jsx("p",{className:"text-muted-foreground text-sm mb-3",children:s.excerpt}),a.jsxs("span",{className:"text-primary text-sm font-medium inline-flex items-center gap-1",children:["Read more ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})]})]})},s.slug))})]})})})},C7=()=>{const{slug:e}=B3(),[t,n]=p.useState(null),[r,s]=p.useState(!0);if(p.useEffect(()=>{e&&Q.from("blog_posts").select("title,content,category,read_time,published_at,image_url").eq("slug",e).eq("is_published",!0).maybeSingle().then(({data:l})=>{n(l),s(!1)})},[e]),r)return a.jsx(ve,{children:a.jsx("div",{className:"container py-20 text-muted-foreground",children:"Loading…"})});if(!t)return a.jsx(GC,{to:"/blog",replace:!0});const i=t.content.replace(/\*\*/g,"").replace(/\n+/g," ").slice(0,160),o={title:t.title,de
416scription:i||`Read "${t.title}" on the Oxenhope Pharmacy health blog.`,image:t.image_url||void 0,type:"article",jsonLd:{"@context":"https://schema.org","@type":"Article",headline:t.title,datePublished:t.published_at,image:t.image_url||void 0,author:{"@type":"Organization",name:"Oxenhope Pharmacy"},publisher:{"@type":"Organization",name:"Oxenhope Pharmacy",logo:{"@type":"ImageObject",url:"https://oxenhopepharmacy.co.uk/favicon.png"}}}};return a.jsx(ve,{seo:o,children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("article",{className:"container max-w-2xl",children:[a.jsxs(X,{to:"/blog",className:"inline-flex items-center gap-1.5 text-sm text-primary hover:underline mb-6",children:[a.jsx(Ik,{className:"h-4 w-4"})," Back to Health Advice"]}),a.jsxs("div",{className:"flex items-center gap-3 mb-4 flex-wrap",children:[t.category&&a.jsx(Is,{variant:"secondary",children:t.category}),a.jsx("span",{className:"text-xs text-muted-foreground",children:rt(new Date(t.published_at),"d MMMM yyyy")}),t.read_time&&a.jsxs("span",{className:"text-xs text-muted-foreground",children:["· ",t.read_time]})]}),a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:t.title}),t.image_url&&a.jsx("img",{src:t.image_url,alt:t.title,className:"w-full rounded-lg mb-6"}),a.jsx("div",{className:"prose prose-sm max-w-none text-foreground",children:t.content.split(`
417
418`).map((l,c)=>{if(l.startsWith("**")&&l.endsWith("**"))return a.jsx("h3",{className:"font-heading font-semibold text-lg mt-6 mb-2",children:l.replace(/\*\*/g,"")},c);if(l.startsWith("- "))return a.jsx("ul",{className:"list-disc pl-5 space-y-1 my-3",children:l.split(`
419`).map((d,h)=>a.jsx("li",{className:"text-muted-foreground text-sm",children:d.replace(/^- /,"").replace(/\*\*/g,"")},h))},c);const u=l.split(/(\*\*[^*]+\*\*)/);return a.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed mb-3",children:u.map((d,h)=>d.startsWith("**")&&d.endsWith("**")?a.jsx("strong",{className:"text-foreground",children:d.replace(/\*\*/g,"")},h):d)},c)})})]})})})},_7=()=>{const e=qn();return p.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),a.jsxs("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:[a.jsx(bT,{title:"Page Not Found",description:"The page you are looking for could not be found at Oxenhope Pharmacy.",noindex:!0}),a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),a.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),a.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})]})};var N7="Label",VP=p.forwardRef((e,t)=>a.jsx(se.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));VP.displayName=N7;var WP=VP;const E7=hh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ne=p.forwardRef(({className:e,...t},n)=>a.jsx(WP,{ref:n,className:ee(E7(),e),...t}));ne.displayName=WP.displayName;const T7=()=>{const e=wa(),[t]=YC(),n=t.get("next")||"/account",[r,s]=p.useState(""),[i,o]=p.useState(""),[l,c]=p.useState(!1),u=async d=>{d.preventDefault(),c(!0);const{error:h}=await Q.auth.signInWithPassword({email:r,password:i});c(!1),h?re.error(h.message):(re.success("Welcome back!"),e(n))};return a.jsx(ve,{seo:{title:"Admin Login",description:"Secure login for Oxenhope Pharmacy administrators.",noindex:!0},children:a.jsx("section",{className:"py-16",children:a.jsxs("div",{className:"container max-w-md",children:[a.jsx("h1",{className:"font-heading text-3xl font-bold text-center mb-8",children:"Log In"}),a.jsxs("form",{onSubmit:u,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"email",children:"Email"}),a.jsx(z,{id:"email",type:"email",value:r,onChange:d=>s(d.target.value),required:!0})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"password",children:"Password"}),a.jsx(z,{id:"password",type:"password",value:i,onChange:d=>o(d.target.value),required:!0})]}),a.jsx(J,{type:"submit",className:"w-full",disabled:l,children:l?"Signing in…":"Log In"})]}),a.jsxs("div",{className:"mt-4 text-center text-sm space-y-2",children:[a.jsx(X,{to:"/reset-password",className:"text-primary hover:underline block",children:"Forgot your password?"}),a.jsxs("p",{className:"text-muted-foreground",children:["Don't have an account?"," ",a.jsx(X,{to:"/signup",className:"text-primary hover:underline",children:"Sign up"})]})]})]})})})},P7=()=>{const[e,t]=p.useState(""),[n,r]=p.useState(""),[s,i]=p.useState(""),[o,l]=p.useState(""),[c,u]=p.useState(!1),d=async h=>{h.preventDefault(),u(!0);const{error:f}=await Q.auth.signUp({email:e,password:n,options:{data:{first_name:s,last_name:o},emailRedirectTo:window.location.origin}});u(!1),f?re.error(f.message):re.success("Check your email to confirm your account!")};return a.jsx(ve,{seo:{title:"Create an Account",description:"Sign up for an Oxenhope Pharmacy account.",noindex:!0},children:a.jsx("section",{className:"py-16",children:a.jsxs("div",{className:"container max-w-md",children:[a.jsx("h1",{className:"font-heading text-3xl font-bold text-center mb-8",children:"Create Account"}),a.jsxs("form",{onSubmit:d,className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"firstName",children:"First Name"}),a.jsx(z,{id:"firstName",value:s,onChange:h=>i(h.target.value),required:!0})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"lastName",children:"Last Name"}),a.jsx(z,{id:"lastName",value:o,onChange:h=>l(h.target.value),required:!0})]})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"email",children:"Email"}
419),a.jsx(z,{id:"email",type:"email",value:e,onChange:h=>t(h.target.value),required:!0})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"password",children:"Password"}),a.jsx(z,{id:"password",type:"password",value:n,onChange:h=>r(h.target.value),required:!0,minLength:6})]}),a.jsx(J,{type:"submit",className:"w-full",disabled:c,children:c?"Creating account…":"Sign Up"})]}),a.jsxs("p",{className:"mt-4 text-center text-sm text-muted-foreground",children:["Already have an account?"," ",a.jsx(X,{to:"/login",className:"text-primary hover:underline",children:"Log in"})]})]})})})},A7=()=>{const e=wa(),[t,n]=p.useState(""),[r,s]=p.useState(""),[i,o]=p.useState(!1),[l,c]=p.useState(!1);p.useEffect(()=>{window.location.hash.includes("type=recovery")&&c(!0)},[]);const u=async h=>{h.preventDefault(),o(!0);const{error:f}=await Q.auth.resetPasswordForEmail(t,{redirectTo:`${window.location.origin}/reset-password`});o(!1),f?re.error(f.message):re.success("Check your email for a password reset link.")},d=async h=>{h.preventDefault(),o(!0);const{error:f}=await Q.auth.updateUser({password:r});o(!1),f?re.error(f.message):(re.success("Password updated successfully!"),e("/account"))};return a.jsx(ve,{seo:{title:"Reset Password",description:"Reset your Oxenhope Pharmacy account password.",noindex:!0},children:a.jsx("section",{className:"py-16",children:a.jsxs("div",{className:"container max-w-md",children:[a.jsx("h1",{className:"font-heading text-3xl font-bold text-center mb-8",children:l?"Set New Password":"Reset Password"}),l?a.jsxs("form",{onSubmit:d,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"newPassword",children:"New Password"}),a.jsx(z,{id:"newPassword",type:"password",value:r,onChange:h=>s(h.target.value),required:!0,minLength:6})]}),a.jsx(J,{type:"submit",className:"w-full",disabled:i,children:i?"Updating…":"Update Password"})]}):a.jsxs("form",{onSubmit:u,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"email",children:"Email"}),a.jsx(z,{id:"email",type:"email",value:t,onChange:h=>n(h.target.value),required:!0})]}),a.jsx(J,{type:"submit",className:"w-full",disabled:i,children:i?"Sending…":"Send Reset Link"})]})]})})})},R7=()=>{const{user:e,loading:t,signOut:n,isAdmin:r}=dy(),s=wa(),[i,o]=p.useState(null),[l,c]=p.useState(!1);p.useEffect(()=>{!t&&!e&&s("/login")},[e,t,s]),p.useEffect(()=>{e&&Q.from("profiles").select("first_name, last_name").eq("id",e.id).single().then(({data:h})=>o(h))},[e]);const u=async()=>{await n(),s("/")},d=async()=>{c(!0);const{data:h,error:f}=await Q.rpc("claim_first_admin");if(c(!1),f)return re.error(f.message);h?(re.success("You're now the admin!"),window.location.href="/admin"):re.error("An admin already exists.")};return t||!e?null:a.jsx(ve,{seo:{title:"Your Account",description:"Manage your Oxenhope Pharmacy account.",noindex:!0},children:a.jsx("section",{className:"py-16",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl font-bold mb-8",children:"My Account"}),a.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[a.jsxs(ut,{children:[a.jsxs(or,{className:"flex flex-row items-center gap-3",children:[a.jsx(qk,{className:"h-5 w-5 text-primary"}),a.jsx(ar,{className:"text-lg",children:"Profile"})]}),a.jsxs(dt,{className:"space-y-1 text-sm",children:[a.jsxs("p",{children:[a.jsx("span",{className:"text-muted-foreground",children:"Name:"})," ",i==null?void 0:i.first_name," ",i==null?void 0:i.last_name]}),a.jsxs("p",{children:[a.jsx("span",{className:"text-muted-foreground",children:"Email:"})," ",e.email]})]})]}),a.jsxs(ut,{children:[a.jsxs(or,{className:"flex flex-row items-center gap-3",children:[a.jsx(DM,{className:"h-5 w-5 text-primary"}),a.jsx(ar,{className:"text-lg",children:"Orders"})]}),a.jsx(dt,{children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"No orders yet."})})]}),a.jsxs(ut,{children:[a.jsxs(or,{className:"flex flex-row items-center gap-3",children:[a.jsx(ma,{className:"h-5 w-5 text-primary"}),a.jsx(ar,{className:"text-lg",children:"Appointments"})]}),a.jsx(dt,{children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"No upcoming appointments."})})]})]}),r?a.jsxs(ut,{className:"mt-6 border-primary",children:[a.jsxs(or,{className:"flex flex-row items-center gap-3",children:[a.jsx(Bw,{className:"h-5 w-5 text-primary"}),a.jsx(ar,{className:"text-lg",children:"Admin"})]}),a.jsx(dt,{children:a.jsx(X,{to:"/admin",children:a.jsx(J,{children:"Open Admin Dashboard"})})})]}):a.jsxs(ut,{className:"mt-6 border-dashed",children:[a.jsxs(or,{className:"flex flex-row items-center gap-3",children:[a.jsx(Bw,{className:"h-5 w-5 text-muted-foreground"}),a.jsx(ar,{className:"text-lg",children:"Site Admin Setup"})]}),a.jsxs(dt,{className:"space-y-2",children:[a.jsx("p",{className:"text-sm text-muted-foreground",children:"If you're the pharmacy owner, claim admin access here. This only works once — after that the button is disabled."}),a.jsx(J,{onClick:d,disabled:l,children:l?"Working…":"Claim Admin Access"})]})]}),a.jsx(J,{variant:"outline",onClick:u,className:"mt-8",children:"Sign Out"})]})})})},O7=()=>
419{const[e,t]=p.useState({name:"",email:"",phone:"",nature:"",details:""}),[n,r]=p.useState(!1),s=async i=>{i.preventDefault(),r(!0);const{error:o}=await Q.from("complaints").insert({name:e.name.trim(),email:e.email.trim().toLowerCase(),phone:e.phone.trim()||null,nature:e.nature.trim()||null,details:e.details.trim()});if(r(!1),o){re.error("Could not submit complaint. Please try again.");return}re.success("Complaint submitted. We'll be in touch within 72 hours."),t({name:"",email:"",phone:"",nature:"",details:""})};return a.jsx(ve,{seo:{title:"Complaints Procedure",description:"Read the Oxenhope Pharmacy complaints procedure and submit a complaint."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-8",children:"Complaints Procedure"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"At Oxenhope Pharmacy, we are proud of our high standards and our quality of service. The majority of our customers are very happy with the services that they receive from us. However, there may be rare occasions where a customer is not satisfied and may wish to complain about a service or a product."}),a.jsxs("div",{className:"bg-secondary/40 rounded-xl p-6 border",children:[a.jsx("h2",{className:"font-heading text-lg font-semibold text-foreground mb-3",children:"How to make a complaint"}),a.jsx("p",{className:"leading-relaxed mb-4",children:"You can submit a complaint using the form below, or contact the Superintendent Pharmacist directly via telephone or email."}),a.jsxs("dl",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsx("dt",{className:"font-semibold text-foreground shrink-0",children:"Superintendent Pharmacist:"}),a.jsx("dd",{children:"Sajid Rasool (2072959)"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("dt",{className:"font-semibold text-foreground shrink-0",children:"Telephone:"}),a.jsx("dd",{children:a.jsx("a",{href:"tel:01535649308",className:"text-primary hover:underline",children:"01535 649 308"})})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("dt",{className:"font-semibold text-foreground shrink-0",children:"Email:"}),a.jsx("dd",{children:a.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline",children:"[email protected]"})})]})]})]}),a.jsx("p",{className:"leading-relaxed",children:"We will acknowledge your complaint within 72 hours and aim to resolve the matter within 7 to 14 days of receipt. In a few cases, this timeline may be exceeded, but we will inform you of the progress throughout the period."}),a.jsx("p",{className:"leading-relaxed",children:"Complaints about NHS services are also dealt with by the NHS Health Services Commissioner."})]}),a.jsxs("div",{className:"mt-10 bg-background border rounded-xl p-6",children:[a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground mb-4",children:"Submit a complaint"}),a.jsxs("form",{onSubmit:s,className:"space-y-3",children:[a.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[a.jsx(z,{placeholder:"Full name",value:e.name,onChange:i=>t({...e,name:i.target.value}),required:!0,maxLength:100}),a.jsx(z,{placeholder:"Email",type:"email",value:e.email,onChange:i=>t({...e,email:i.target.value}),required:!0,maxLength:255})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-3",children:[a.jsx(z,{placeholder:"Phone (optional)",type:"tel",value:e.phone,onChange:i=>t({...e,phone:i.target.value}),maxLength:20}),a.jsx(z,{placeholder:"Nature of complaint",value:e.nature,onChange:i=>t({...e,nature:i.target.value}),maxLength:150})]}),a.jsx(Pt,{placeholder:"Please describe your complaint in detail…",value:e.details,onChange:i=>t({...e,details:i.target.value}),required:!0,rows:6,maxLength:2e3}),a.jsx(J,{type:"submit",disabled:n,children:n?"Submitting…":"Submit complaint"})]})]})]})})})},M7=()=>a.jsx(ve,{seo:{title:"GPhC Registration",description:"Oxenhope Pharmacy is registered with the General Pharmaceutical Council (GPhC). View our registration details."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-8",children:"GPhC Registration"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"Oxenhope Pharmacy is registered with the General Pharmaceutical Council (GPhC), the independent regulator for pharmacies in Great Britain. The GPhC sets standards for pharmacy professionals and pharmacies, and ensures they are met."}),a.jsxs("div",{className:"bg-secondary/40 rounded-xl p-6 border",children:[a.jsx("h2",{className:"font-heading text-lg font-semibold text-foreground mb-3",children:"Registration Details"}),a.jsxs("dl",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsx("dt",{className:"font-semibold text-foreground shrink-0",children:"Pharmacy Name:"}),a.jsx("dd",{children:"Oxenhope Pharmacy"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("dt",{className:"font-semibold text-foreground shrink-0",children:"GPhC Registration Number:"}),a.jsx("dd",{children:"1116807"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("dt",{className:"font-semibold text-foreground shrink-0",children:"Superintendent Pharmacist:"}),a.jsx("dd",{children:"Sajid Rasool (2072959)"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("dt",{className:"font-semibold text-foreground shrink-0",children:"Address:"}),a.jsx("dd",{children:"Oxenhope Pharmacy, 36 Station Road, Oxenhope, Keighley BD22 9JJ"})]})]})]}),a.jsxs("p",{className:"leading-relaxed",children:["You can verify our registration on the"," ",a.jsx("a",{href:"https://www.pharmacyregulation.org/registers/pharmacy",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"GPhC online register"}),"."]}),a.jsx("h2",{className:"font-heading text-lg font-semibold text-foreground !mt-8",children:"What does GPhC registration mean?"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-2",children:[a.jsx("li",{children:"We meet the standards set by the GPhC for the safe and effective practice of p
419harmacy."}),a.jsx("li",{children:"Our pharmacists and pharmacy technicians are registered professionals."}),a.jsx("li",{children:"We are regularly inspected to ensure compliance with professional standards."}),a.jsx("li",{children:"We follow strict procedures for dispensing, patient safety, and data protection."})]})]})]})})});var Yh="Checkbox",[D7,XG]=sn(Yh),[I7,cx]=D7(Yh);function L7(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:s,disabled:i,form:o,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[f,m]=pr({prop:n,defaultProp:s??!1,onChange:c,caller:Yh}),[y,g]=p.useState(null),[b,x]=p.useState(null),v=p.useRef(!1),w=y?!!o||!!y.closest("form"):!0,S={checked:f,disabled:i,setChecked:m,control:y,setControl:g,name:l,form:o,value:d,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:Es(s)?!1:s,isFormControl:w,bubbleInput:b,setBubbleInput:x};return a.jsx(I7,{scope:t,...S,children:F7(h)?h(S):r})}var HP="CheckboxTrigger",zP=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},s)=>{const{control:i,value:o,disabled:l,checked:c,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:y}=cx(HP,e),g=fe(s,d),b=p.useRef(c);return p.useEffect(()=>{const x=i==null?void 0:i.form;if(x){const v=()=>h(b.current);return x.addEventListener("reset",v),()=>x.removeEventListener("reset",v)}},[i,h]),a.jsx(se.button,{type:"button",role:"checkbox","aria-checked":Es(c)?"mixed":c,"aria-required":u,"data-state":JP(c),"data-disabled":l?"":void 0,disabled:l,value:o,...r,ref:g,onKeyDown:B(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:B(n,x=>{h(v=>Es(v)?!0:!v),y&&m&&(f.current=x.isPropagationStopped(),f.current||x.stopPropagation())})})});zP.displayName=HP;var ux=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:l,value:c,onCheckedChange:u,form:d,...h}=e;return a.jsx(L7,{__scopeCheckbox:n,checked:s,defaultChecked:i,disabled:l,required:o,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:f})=>a.jsxs(a.Fragment,{children:[a.jsx(zP,{...h,ref:t,__scopeCheckbox:n}),f&&a.jsx(YP,{__scopeCheckbox:n})]})})});ux.displayName=Yh;var qP="CheckboxIndicator",KP=p.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,i=cx(qP,n);return a.jsx(qt,{present:r||Es(i.checked)||i.checked===!0,children:a.jsx(se.span,{"data-state":JP(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});KP.displayName=qP;var GP="CheckboxBubbleInput",YP=p.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:l,disabled:c,name:u,value:d,form:h,bubbleInput:f,setBubbleInput:m}=cx(GP,e),y=fe(n,m),g=ax(i),b=Qv(r);p.useEffect(()=>{const v=f;if(!v)return;const w=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(w,"checked").set,k=!s.current;if(g!==i&&j){const _=new Event("click",{bubbles:k});v.indeterminate=Es(i),j.call(v,Es(i)?!1:i),v.dispatchEvent(_)}},[f,g,i,s]);const x=p.useRef(Es(i)?!1:i);return a.jsx(se.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??x.current,required:l,disabled:c,name:u,value:d,form:h,...t,tabIndex:-1,ref:y,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});YP.displayName=GP;function F7(e){return typeof e=="function"}function Es(e){return e==="indeterminate"}function JP(e){return Es(e)?"indeterminate":e?"checked":"unchecked"}const Ig=p.forwardRef(({className:e,...t},n)=>a.jsx(ux,{ref:n,className:ee("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(KP,{className:ee("flex items-center justify-center text-current"),children:a.jsx(fh,{className:"h-4 w-4"})})}));Ig.displayName=ux.displayName;const $7=()=>{const{toast:e}=lk(),[t,n]=p.useState(!1),r=s=>{s.preventDefault(),n(!0),e({title:"Nomination submitted",description:"We'll process your EPS nomination shortly. Thank y
419ou!"})};return t?a.jsx(ve,{seo:{title:"Nominate Oxenhope Pharmacy (EPS)",description:"Nominate Oxenhope Pharmacy as your NHS Electronic Prescription Service (EPS) provider in Keighley for fast, paperless prescriptions."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-2xl text-center",children:[a.jsx("h1",{className:"font-heading text-3xl font-bold mb-4",children:"Thank you!"}),a.jsx("p",{className:"text-muted-foreground",children:"Your EPS nomination request has been submitted. We will process it and contact you if we need any further information."})]})})}):a.jsx(ve,{children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-2xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-3",children:"EPS Nomination"}),a.jsx("p",{className:"text-muted-foreground mb-8 leading-relaxed",children:"Complete this form to nominate Oxenhope Pharmacy as your preferred pharmacy for electronic prescriptions. By filling in this form you are asking your doctor to send all your electronic prescriptions to us. You can change this nomination at any time."}),a.jsxs("form",{onSubmit:r,className:"space-y-5",children:[a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"title",children:"Title *"}),a.jsxs(_s,{required:!0,children:[a.jsx(Or,{id:"title",children:a.jsx(Ns,{placeholder:"Select"})}),a.jsxs(Mr,{children:[a.jsx(et,{value:"mr",children:"Mr"}),a.jsx(et,{value:"mrs",children:"Mrs"}),a.jsx(et,{value:"ms",children:"Ms"}),a.jsx(et,{value:"miss",children:"Miss"}),a.jsx(et,{value:"dr",children:"Dr"})]})]})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"fullName",children:"Full Name *"}),a.jsx(z,{id:"fullName",required:!0})]})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"phoneHome",children:"Phone (Home) *"}),a.jsx(z,{id:"phoneHome",type:"tel",required:!0})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"phoneMobile",children:"Phone (Mobile) *"}),a.jsx(z,{id:"phoneMobile",type:"tel",required:!0})]})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"email",children:"Email Address *"}),a.jsx(z,{id:"email",type:"email",required:!0})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"dob",children:"Date of Birth *"}),a.jsx(z,{id:"dob",type:"date",required:!0})]})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"nhsNumber",children:"NHS Number (if known)"}),a.jsx(z,{id:"nhsNumber"})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"address1",children:"Address Line 1 *"}),a.jsx(z,{id:"address1",required:!0})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"address2",children:"Address Line 2"}),a.jsx(z,{id:"address2"})]})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"address3",children:"Address Line 3"}),a.jsx(z,{id:"address3"})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"postcode",children:"Postcode *"}),a.jsx(z,{id:"postcode",required:!0})]})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"gpDetails",children:"GP Details *"}),a.jsx(z,{id:"gpDetails",placeholder:"Name and address of your GP surgery",required:!0})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"exempt",children:"Are you exempt from paying? *"}),a.jsxs(_s,{required:!0,children:[a.jsx(Or,{id:"exempt",children:a.jsx(Ns,{placeholder:"Select"})}),a.jsxs(Mr,{children:[a.jsx(et,{value:"yes",children:"Yes"}),a.jsx(et,{value:"no",children:"No"})]})]})]}),a.jsxs("div",{children:[a.jsx(ne,{htmlFor:"delivery",children:"Delivery preference"}),a.jsxs(_s,{children:[a.jsx(Or,{id:"delivery",children:a.jsx(Ns,{placeholder:"Select"})}),a.jsxs(Mr,{children:[a.jsx(et,{value:"delivered",children:"Delivered"}),a.jsx(et,{value:"collect",children:"Collect from pharmacy"})]})]})]})]}),a.jsxs("div",{className:"space-y-3 pt-2",children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Ig,{id:"consent",required:!0}),a.jsx(ne,{htmlFor:"consent",className:"text-sm text-muted-foreground leading-relaxed",children:"I consent to my future prescriptions being sent electronically to Oxenhope Pharmacy. I understand I can change this nomination at any time."})]}),a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Ig,{id:"marketing"}),a.jsx(ne,{htmlFor:"marketing",className:"text-sm text-muted-foreground leading-relaxed",children:"I am happy to be contacted about news and offers."})]})]}),a.jsx(J,{type:"submit",size:"lg",children:"Submit Nomination"})]})]})})})},B7="https://raelslzpbjmhkgahgvfr.supabase.co",U7="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJhZWxzbHpwYmptaGtnYWhndmZyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzUxMzA4MjQsImV4cCI6MjA5MDcwNjgyNH0.o12YWxJmlGNDB_-j8qnyKmUF-jWjcnVpHs5DzW2TVJc",V7=()=>{const[e]=YC(),t=e.get("token"),[n,r]=p.useState("loading"),[s,i]=p.useState(!1);p.useEffect(()=>{if(!t){r("invalid");return}fetch(`${B7}/functions/v1/handle-email-unsubscribe?token=${encodeURIComponent(t)}`,{headers:{apikey:U7}}).then(async l=>{const c=await l.json();if(!l.ok)return r("invalid");c.valid?r("valid"):c.reason==="already_unsubscribed"?r("already"):r("invalid")}).catch(()=>r("error"))},[t]);const o=async()=>
419{if(!t)return;i(!0);const{data:l,error:c}=await Q.functions.invoke("handle-email-unsubscribe",{body:{token:t}});if(i(!1),c)return r("error");l!=null&&l.success||(l==null?void 0:l.reason)==="already_unsubscribed"?r("done"):r("error")};return a.jsx(ve,{seo:{title:"Unsubscribe",description:"Unsubscribe from Oxenhope Pharmacy emails.",noindex:!0},children:a.jsx("section",{className:"py-16",children:a.jsxs("div",{className:"container max-w-md text-center",children:[a.jsx("h1",{className:"font-heading text-3xl font-bold mb-4",children:"Unsubscribe"}),n==="loading"&&a.jsx("p",{className:"text-muted-foreground",children:"Checking your link…"}),n==="valid"&&a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"text-muted-foreground mb-6",children:"Click below to stop receiving emails from Oxenhope Pharmacy."}),a.jsx(J,{onClick:o,disabled:s,children:s?"Processing…":"Confirm unsubscribe"})]}),n==="already"&&a.jsx("p",{className:"text-muted-foreground",children:"You're already unsubscribed."}),n==="done"&&a.jsx("p",{className:"text-muted-foreground",children:"You've been unsubscribed. Sorry to see you go!"}),n==="invalid"&&a.jsx("p",{className:"text-muted-foreground",children:"This unsubscribe link is invalid or has expired."}),n==="error"&&a.jsx("p",{className:"text-destructive",children:"Something went wrong. Please try again later."})]})})})},W7=[{to:"/admin",label:"Dashboard",icon:Uk,end:!0},{to:"/admin/bookings",label:"Bookings",icon:ma},{to:"/admin/contacts",label:"Contact Enquiries",icon:MM},{to:"/admin/complaints",label:"Complaints",icon:FM},{to:"/admin/newsletter",label:"Newsletter",icon:Pi},{to:"/admin/services",label:"Services",icon:Vv},{to:"/admin/blog",label:"Blog Posts",icon:$v},{to:"/admin/content",label:"Site Content",icon:Bk},{to:"/admin/settings",label:"Time Slots",icon:IM},{to:"/admin/help",label:"Help & Guide",icon:Fk}],wr=({children:e,title:t})=>{const{user:n,loading:r,isAdmin:s,signOut:i}=dy(),o=qn();return r?a.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:"Loading…"}):n?s?a.jsxs("div",{className:"min-h-screen flex bg-secondary/30",children:[a.jsxs("aside",{className:"w-60 bg-background border-r flex flex-col",children:[a.jsx("div",{className:"p-4 border-b",children:a.jsx(X,{to:"/",className:"block",children:a.jsx("img",{src:xT,alt:"Oxenhope Pharmacy",className:"h-12 w-auto mx-auto"})})}),a.jsx("nav",{className:"flex-1 p-3 space-y-1",children:W7.map(l=>{const c=l.end?o.pathname===l.to:o.pathname.startsWith(l.to);return a.jsxs(X,{to:l.to,className:`flex items-center gap-2.5 px-3 py-2 rounded-md text-sm transition-colors ${c?"bg-primary text-primary-foreground":"text-foreground hover:bg-secondary"}`,children:[a.jsx(l.icon,{className:"h-4 w-4"}),l.label]},l.to)})}),a.jsxs("div",{className:"p-3 border-t space-y-2",children:[a.jsx(X,{to:"/",className:"block text-xs text-muted-foreground hover:text-primary px-3",children:"View site →"}),a.jsxs(J,{variant:"outline",size:"sm",className:"w-full",onClick:()=>i(),children:[a.jsx(AM,{className:"h-3.5 w-3.5 mr-1.5"})," Sign out"]})]})]}),a.jsxs("main",{className:"flex-1 p-6 md:p-8 overflow-auto",children:[t&&a.jsx("h1",{className:"font-heading text-2xl font-bold mb-6",children:t}),e]})]}):a.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center gap-4 p-6 text-center",children:[a.jsx("h1",{className:"text-2xl font-bold",children:"Access denied"}),a.jsx("p",{className:"text-muted-foreground",children:"This account isn't an admin."}),a.jsx(J,{onClick:()=>i(),children:"Sign out"})]}):a.jsx(GC,{to:"/login?next=/admin",replace:!0})},H7=()=>{const[e,t]=p.useState({pending:0,upcoming:0,services:0,posts:0});p.useEffect(()=>{(async()=>{const r=new Date().toISOString().slice(0,10),[{count:s},{count:i},{count:o},{count:l}]=await Promise.all([Q.from("bookings").select("*",{count:"exact",head:!0}).eq("status","pending"),Q.from("bookings").select("*",{count:"exact",head:!0}).gte("appointment_date",r).neq("status","cancelled"),Q.from("services").select("*",{count:"exact",head:!0}),Q.from("blog_posts").select("*",{count:"exact",head:!0})]);t({pending:s??0,upcoming:i??0,services:o??0,posts:l??0})})()},[]);const n=[{label:"Pending bookings",value:e.pending,icon:Fv,link:"/admin/bookings",color:"text-amber-600"},{label:"Upcoming appointments",value:e.upcoming,icon:ma,link:"/admin/bookings",color:"text-primary"},{label:"Services",value:e.services,icon:Vv,link:"/admin/services",color:"text-primary"},{label:"Blog posts",value:e.posts,icon:$v,link:"/admin/blog",color:"text-primary"}];return a.jsxs(wr,{title:"Welcome back 👋",children:[a.jsx("p",{className:"text-muted-foreground -mt-4 mb-6",children:"Manage bookings and your website content from one place."}),a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-4",children:n.map(r=>a.jsx(X,{to:r.link,children:a.jsx(ut,{className:"hover:shadow-md transition-shadow",children:a.jsxs(dt,{className:"p-5 flex items-center gap-4",children:[a.jsx(r.icon,{className:`h-8 w-8 ${r.color}`}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-bold",children:r.value}),a.jsx("p",{className:"text-xs text-muted-foreground",children:r.label})]})]})})},r.label))})]})};var Jh="Tabs",[z7,ZG]=sn(Jh,[Lh]),QP=Lh(),[q7,dx]=z7(Jh),XP=p.forwardRef((e,t)=>
vendor: 4,130 bytes, line 419
419{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=Dh(l),[h,f]=pr({prop:r,onChange:s,defaultProp:i??"",caller:Jh});return a.jsx(q7,{scope:n,baseId:$n(),value:h,onValueChange:f,orientation:o,dir:d,activationMode:c,children:a.jsx(se.div,{dir:d,"data-orientation":o,...u,ref:t})})});XP.displayName=Jh;var ZP="TabsList",eA=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,i=dx(ZP,n),o=QP(n);return a.jsx(pE,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:a.jsx(se.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});eA.displayName=ZP;var tA="TabsTrigger",nA=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=e,o=dx(tA,n),l=QP(n),c=iA(o.baseId,r),u=oA(o.baseId,r),d=r===o.value;return a.jsx(gE,{asChild:!0,...l,focusable:!s,active:d,children:a.jsx(se.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:t,onMouseDown:B(e.onMouseDown,h=>{!s&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:B(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:B(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!s&&h&&o.onValueChange(r)})})})});nA.displayName=tA;var rA="TabsContent",sA=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=e,l=dx(rA,n),c=iA(l.baseId,r),u=oA(l.baseId,r),d=r===l.value,h=p.useRef(d);return p.useEffect(()=>{const f=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(f)},[]),a.jsx(qt,{present:s||d,children:({present:f})=>a.jsx(se.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:f&&i})})});sA.displayName=rA;function iA(e,t){return`${e}-trigger-${t}`}function oA(e,t){return`${e}-content-${t}`}var K7=XP,aA=eA,lA=nA,cA=sA;const G7=K7,uA=p.forwardRef(({className:e,...t},n)=>a.jsx(aA,{ref:n,className:ee("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));uA.displayName=aA.displayName;const Lg=p.forwardRef(({className:e,...t},n)=>a.jsx(lA,{ref:n,className:ee("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));Lg.displayName=lA.displayName;const dA=p.forwardRef(({className:e,...t},n)=>a.jsx(cA,{ref:n,className:ee("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));dA.displayName=cA.displayName;var Qh="Dialog",[hA,eY]=sn(Qh),[Y7,Kn]=hA(Qh),fA=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,l=p.useRef(null),c=p.useRef(null),[u,d]=pr({prop:r,defaultProp:s??!1,onChange:i,caller:Qh});return a.jsx(Y7,{scope:t,triggerRef:l,contentRef:c,contentId:$n(),titleId:$n(),descriptionId:$n(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};fA.displayName=Qh;var mA="DialogTrigger",J7=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Kn(mA,n),i=fe(t,s.triggerRef);return a.jsx(se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":mx(s.open),...r,ref:i,onClick:B(e.onClick,s.onOpenToggle)})});J7.displayName=mA;var hx="DialogPortal",[Q7,pA]=hA(hx,{forceMount:void 0}),gA=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=Kn(hx,t);return a.jsx(Q7,{scope:t,forceMount:n,children:p.Children.map(r,o=>a.jsx(qt,{present:n||i.open,children:a.jsx(fa,{asChild:!0,container:s,children:o})}))})};gA.displayName=hx;var zd="DialogOverlay",vA=p.forwardRef((e,t)=>
vendor: 4,881 bytes, lines 419-423
419{const n=pA(zd,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Kn(zd,e.__scopeDialog);return i.modal?a.jsx(qt,{present:r||i.open,children:a.jsx(Z7,{...s,ref:t})}):null});vA.displayName=zd;var X7=As("DialogOverlay.RemoveScroll"),Z7=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Kn(zd,n);return a.jsx(jc,{as:X7,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(se.div,{"data-state":mx(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ii="DialogContent",yA=p.forwardRef((e,t)=>{const n=pA(Ii,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Kn(Ii,e.__scopeDialog);return a.jsx(qt,{present:r||i.open,children:i.modal?a.jsx(eG,{...s,ref:t}):a.jsx(tG,{...s,ref:t})})});yA.displayName=Ii;var eG=p.forwardRef((e,t)=>{const n=Kn(Ii,e.__scopeDialog),r=p.useRef(null),s=fe(t,n.contentRef,r);return p.useEffect(()=>{const i=r.current;if(i)return Fh(i)},[]),a.jsx(xA,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:B(e.onFocusOutside,i=>i.preventDefault())})}),tG=p.forwardRef((e,t)=>{const n=Kn(Ii,e.__scopeDialog),r=p.useRef(!1),s=p.useRef(!1);return a.jsx(xA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),xA=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,l=Kn(Ii,n),c=p.useRef(null),u=fe(t,c);return Ih(),a.jsxs(a.Fragment,{children:[a.jsx(bc,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:a.jsx(Bi,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":mx(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(nG,{titleId:l.titleId}),a.jsx(sG,{contentRef:c,descriptionId:l.descriptionId})]})]})}),fx="DialogTitle",wA=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Kn(fx,n);return a.jsx(se.h2,{id:s.titleId,...r,ref:t})});wA.displayName=fx;var bA="DialogDescription",SA=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Kn(bA,n);return a.jsx(se.p,{id:s.descriptionId,...r,ref:t})});SA.displayName=bA;var jA="DialogClose",kA=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Kn(jA,n);return a.jsx(se.button,{type:"button",...r,ref:t,onClick:B(e.onClick,()=>s.onOpenChange(!1))})});kA.displayName=jA;function mx(e){return e?"open":"closed"}var CA="DialogTitleWarning",[tY,_A]=_2(CA,{contentName:Ii,titleName:fx,docsSlug:"dialog"}),nG=({titleId:e})=>{const t=_A(CA),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
420
421If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
422
423For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},rG="DialogDescriptionWarning",sG=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_A(rG).contentName}}.`;return p.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},iG=fA,oG=gA,NA=vA,EA=yA,TA=wA,PA=SA,aG=kA;const px=iG,lG=oG,AA=p.forwardRef(({className:e,...t},n)=>a.jsx(NA,{ref:n,className:ee("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));AA.displayName=NA.displayName;const Xh=p.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(lG,{children:[a.jsx(AA,{}),a.jsxs(EA,{ref:r,className:ee("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
423nded-lg",e),...n,children:[t,a.jsxs(aG,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[a.jsx(fc,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Xh.displayName=EA.displayName;const Zh=({className:e,...t})=>a.jsx("div",{className:ee("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Zh.displayName="DialogHeader";const ef=p.forwardRef(({className:e,...t},n)=>a.jsx(TA,{ref:n,className:ee("text-lg font-semibold leading-none tracking-tight",e),...t}));ef.displayName=TA.displayName;const cG=p.forwardRef(({className:e,...t},n)=>a.jsx(PA,{ref:n,className:ee("text-sm text-muted-foreground",e),...t}));cG.displayName=PA.displayName;const Nm=["pending","confirmed","completed","cancelled"],F1=e=>e==="confirmed"?"bg-primary text-primary-foreground":e==="completed"?"bg-emerald-600 text-white":e==="cancelled"?"bg-destructive text-destructive-foreground":"bg-amber-500 text-white",uG=()=>{const[e,t]=p.useState([]),[n,r]=p.useState(null),[s,i]=p.useState("list"),o=async()=>{const{data:f}=await Q.from("bookings").select("*").order("appointment_date").order("appointment_time");t(f??[])};p.useEffect(()=>{o()},[]);const l=async(f,m)=>{const{error:y}=await Q.from("bookings").update({status:m}).eq("id",f);if(y)return re.error(y.message);re.success("Status updated"),r(g=>g&&g.id===f?{...g,status:m}:g),o()},c=async(f,m)=>{const{error:y}=await Q.from("bookings").update({admin_notes:m}).eq("id",f);if(y)return re.error(y.message);re.success("Notes saved"),o()},u=async f=>{if(!confirm("Delete this booking?"))return;const{error:m}=await Q.from("bookings").delete().eq("id",f);if(m)return re.error(m.message);r(null),o()},d=e.reduce((f,m)=>{var y;return(f[y=m.appointment_date]||(f[y]=[])).push(m),f},{}),h=Object.keys(d).sort();return a.jsxs(wr,{title:"Bookings",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," total bookings"]}),a.jsxs("div",{className:"flex gap-1",children:[a.jsxs(J,{size:"sm",variant:s==="list"?"default":"outline",onClick:()=>i("list"),children:[a.jsx(TM,{className:"h-3.5 w-3.5 mr-1"})," List"]}),a.jsxs(J,{size:"sm",variant:s==="calendar"?"default":"outline",onClick:()=>i("calendar"),children:[a.jsx(bM,{className:"h-3.5 w-3.5 mr-1"})," Calendar"]})]})]}),s==="list"?a.jsxs(G7,{defaultValue:"all",children:[a.jsxs(uA,{children:[a.jsx(Lg,{value:"all",children:"All"}),Nm.map(f=>a.jsx(Lg,{value:f,className:"capitalize",children:f},f))]}),["all",...Nm].map(f=>{const m=f==="all"?e:e.filter(y=>y.status===f);return a.jsxs(dA,{value:f,className:"mt-4 space-y-2",children:[m.length===0&&a.jsx("p",{className:"text-sm text-muted-foreground py-8 text-center",children:"No bookings."}),m.map(y=>a.jsx(ut,{className:"hover:shadow-sm cursor-pointer",onClick:()=>r(y),children:a.jsxs(dt,{className:"p-4 flex flex-wrap items-center gap-4",children:[a.jsxs("div",{className:"text-center min-w-[68px]",children:[a.jsx("p",{className:"text-xs text-muted-foreground uppercase",children:rt(yu(y.appointment_date),"MMM")}),a.jsx("p",{className:"text-2xl font-bold leading-none",children:rt(yu(y.appointment_date),"d")}),a.jsx("p",{className:"text-xs",children:y.appointment_time})]}),a.jsxs("div",{className:"flex-1 min-w-[200px]",children:[a.jsx("p",{className:"font-semibold",children:y.customer_name}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:[y.service," · ",y.customer_phone]})]}),a.jsx(Is,{className:F1(y.status),children:y.status})]})},y.id))]},f)})]}):a.jsxs("div",{className:"space-y-4",children:[h.length===0&&a.jsx("p",{className:"text-sm text-muted-foreground py-8 text-center",children:"No bookings."}),h.map(f=>a.jsxs("div",{children:[a.jsx("h3",{className:"font-heading font-semibold mb-2",children:rt(yu(f),"EEEE d MMMM yyyy")}),a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-2",children:d[f].map(m=>a.jsx(ut,{className:"cursor-pointer hover:shadow-sm",onClick:()=>r(m),children:a.jsxs(dt,{className:"p-3 text-sm",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"font-bold",children:m.appointment_time}),a.jsx(Is,{className:F1(m.status),children:m.status})]}),a.jsx("p",{className:"font-medium",children:m.customer_name}),a.jsx("p",{className:"text-xs text-muted-foreground",children:m.service})]})},m.id))})]},f))]}),a.jsx(px,{open:!!n,onOpenChange:f=>!f&&r(null),children:a.jsx(Xh,{className:"max-w-lg",children:n&&a.jsxs(a.Fragment,{children:[a.jsx(Zh,{children:a.jsx(ef,{children:n.customer_name})}),a.jsxs("div",{className:"space-y-3 text-sm",children:[a.jsxs("p",{children:[a.jsx("strong",{children:"Service:"})," ",n.service]}),a.jsxs("p",{children:[a.jsx("strong",{children:"When:"})," ",rt(yu(n.appointment_date),"EEEE d MMM yyyy")," at ",n.appointment_time]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Phone:"})," ",a.jsx("a",{className:"text-primary",href:`tel:${n.customer_phone}`,children:n.customer_phone})]}),n.customer_email&&a.jsxs("p",{children:[a.jsx("strong",{children:"Email:"})," ",a.jsx("a",{className:"text-primary",href:`mailto:${n.customer_email}`,children:n.customer_email})]}),n.notes&&a.jsxs("p",{children:[a.jsx("strong",{children:"Customer note:"})," ",n.notes]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-xs font-medium block mb-1",children:"Status"}),a.jsxs(_s,{value:n.status,onValueChange:f=>l(n.id,f),children:[a.jsx(Or,{children:a.jsx(Ns,{})}),a.jsx(Mr,{children:Nm.map(f=>a.jsx(et,{value:f,className:"capitalize",children:f},f))})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-xs font-medium block mb-1",children:"Admin notes"}),a.jsx(Pt,{defaultValue:n.admin_notes??"",rows:3,onBlur:f=>f.target.value!==(n.admin_notes??"")&&c(n.id,f.target.value)})]}),a.jsxs(J,{variant:"destructive",size:"sm",onClick:()=>u(n.id),children:[a.jsx(Ui,{className:"h-3.5 w-3.5 mr-1.5"})," Delete booking"]})]})]})})})]})};var tf="Switch",[dG,nY]=sn(tf),[hG,fG]=dG(tf),RA=p.forwardRef((e,t)=>
423{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:u,form:d,...h}=e,[f,m]=p.useState(null),y=fe(t,w=>m(w)),g=p.useRef(!1),b=f?d||!!f.closest("form"):!0,[x,v]=pr({prop:s,defaultProp:i??!1,onChange:u,caller:tf});return a.jsxs(hG,{scope:n,checked:x,disabled:l,children:[a.jsx(se.button,{type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":IA(x),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:y,onClick:B(e.onClick,w=>{v(S=>!S),b&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),b&&a.jsx(DA,{control:f,bubbles:!g.current,name:r,value:c,checked:x,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});RA.displayName=tf;var OA="SwitchThumb",MA=p.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=fG(OA,n);return a.jsx(se.span,{"data-state":IA(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});MA.displayName=OA;var mG="SwitchBubbleInput",DA=p.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...s},i)=>{const o=p.useRef(null),l=fe(o,i),c=ax(n),u=Qv(t);return p.useEffect(()=>{const d=o.current;if(!d)return;const h=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==n&&m){const y=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(y)}},[c,n,r]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});DA.displayName=mG;function IA(e){return e?"checked":"unchecked"}var LA=RA,pG=MA;const rc=p.forwardRef(({className:e,...t},n)=>a.jsx(LA,{className:ee("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:a.jsx(pG,{className:ee("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));rc.displayName=LA.displayName;const gx=({value:e,onChange:t,folder:n="uploads"})=>{const[r,s]=p.useState(!1),i=async o=>{s(!0);const l=o.name.split(".").pop(),c=`${n}/${Date.now()}-${Math.random().toString(36).slice(2,8)}.${l}`,{error:u}=await Q.storage.from("site-images").upload(c,o,{upsert:!1});if(s(!1),u)return re.error(u.message);const{data:d}=Q.storage.from("site-images").getPublicUrl(c);t(d.publicUrl),re.success("Image uploaded")};return a.jsxs("div",{className:"space-y-2",children:[e&&a.jsxs("div",{className:"relative inline-block",children:[a.jsx("img",{src:e,alt:"",className:"h-32 w-auto rounded border"}),a.jsx("button",{type:"button",onClick:()=>t(null),className:"absolute -top-2 -right-2 bg-destructive text-destructive-foreground rounded-full p-1",children:a.jsx(fc,{className:"h-3 w-3"})})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(z,{type:"file",accept:"image/*",onChange:o=>{var l;return((l=o.target.files)==null?void 0:l[0])&&i(o.target.files[0])},disabled:r,className:"max-w-xs"}),r&&a.jsxs("span",{className:"text-xs text-muted-foreground",children:[a.jsx($M,{className:"h-3.5 w-3.5 inline animate-pulse"})," Uploading…"]})]})]})},gG={slug:"",title:"",short_description:"",long_description:"",image_url:null,display_order:0,is_published:!0,is_bookable:!0},vG=()=>{const[e,t]=p.useState([]),[n,r]=p.useState(null),s=async()=>{const{data:l}=await Q.from("services").select("*").order("display_order");t(l??[])};p.useEffect(()=>{s()},[]);const i=async()=>{if(!(n!=null&&n.slug)||!n.title)return re.error("Slug and title required");const l={...n},{error:c}=n.id?await Q.from("services").update(l).eq("id",n.id):await Q.from("services").insert(l);if(c)return re.error(c.message);re.success("Saved"),r(null),s()},o=async l=>{if(!confirm("Delete this service?"))return;const{error:c}=await Q.from("services").delete().eq("id",l);if(c)return re.error(c.message);s()};return a.jsxs(wr,{title:"Services",children:[a.jsx("div",{className:"flex justify-end mb-4",children:a.jsxs(J,{onClick:()=>r({...gG,display_order:e.length+1}),children:[a.jsx(Uv,{className:"h-4 w-4 mr-1"})," Add service"]})}),a.jsx("div",{className:"space-y-2",children:e.map(l=>a.jsx(ut,{children:a.jsxs(dt,{className:"p-4 flex items-center gap-4",children:[l.image_url?a.jsx("img",{src:l.image_url,alt:"",className:"h-14 w-14 object-cover rounded"}):a.jsx("div",{className:"h-14 w-14 bg-secondary rounded"}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("p",{className:"font-semibold",children:[l.title," ",!l.is_published&&a.jsx("span",{className:"text-xs text-muted-foreground",children:"(hidden)"})," ",l.is_bookable?a.jsx("span",{className:"text-xs text-primary",children:"· bookable"}):a.jsx("span",{className:"text-xs text-muted-foreground",children:"· not bookable"})]}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["/",l.slug," · order ",l.display_order]})]}),a.jsx(J,{size:"sm",variant:"outline",onClick:()=>r(l),children:a.jsx(Hk,{className:"h-3.5 w-3.5"})}),a.jsx(J,{size:"sm",variant:"ghost",onClick:()=>o(l.id),children:a.jsx(Ui,{className:"h-3.5 w-3.5"})})]})},l.id))}),a.jsx(px,{open:!!n,onOpenChange:l=>!l&&r(null),children:a.jsxs(Xh,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[a.jsx(Zh,{children:a.jsx(ef,{children:n!=null&&n.id?"Edit service":"New service"})}),n&&a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(ne,{children:"Title"}),a.jsx(z,{value:n.title??"",onChange:l=>r({...n,title:l.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Slug (URL)"}),a.jsx(z,{value:n.slug??"",onChange:l=>r({...n,slug:l.target.value})})]})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Short description"}),a.jsx(Pt,{rows:2,value:n.short_description??"",onChange:l=>r({...n,short_description:l.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Long description"}),a.jsx(Pt,{rows:6,value:n.long_description??"",onChange:l=>r({...n,long_description:l.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Image"}),a.jsx(gx,{value:n.image_url,onChange:l=>r({...n,image_url:l}),folder:"services"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-3 items-end",children:[a.jsxs("div",{children:[a.jsx(ne,{children:"Display order"}),a.jsx(z,{type:"number",value:n.display_order??0,onChange:l=>r({...n,display_order:+l.target.value})})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(rc,{checked:!!n.is_published,onCheckedChange:l=>r({...n,is_published:l})}),a.jsx(ne,{children:"Published"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(rc,{checked:!!n.is_bookable,onCheckedChange:l=>r({...n,is_bookable:l})}),a.jsx(ne,{children:"Bookable"})]})]}),a.jsx(J,{onClick:i,className:"w-full",children:"Save"})]})]})})]})},yG={slug:"",title:"",excerpt:"",content:"",category:"",read_time:"3 min read",image_url:null,is_published:!0,published_at:new Date().toISOString().slice(0,10)},xG=()=>{const[e,t]=p.useState([]),[n,r]=p.useState(null),s=async()=>{const{data:l}=await Q.from("blog_posts").select("*").order("published_at",{ascending:!1});t(l??[])};p.useEffect(()=>{s()},[]);const i=async()=>
423{if(!(n!=null&&n.slug)||!n.title||!n.excerpt||!n.content)return re.error("Title, slug, excerpt and content required");const l={...n},{error:c}=n.id?await Q.from("blog_posts").update(l).eq("id",n.id):await Q.from("blog_posts").insert(l);if(c)return re.error(c.message);re.success("Saved"),r(null),s()},o=async l=>{confirm("Delete this post?")&&(await Q.from("blog_posts").delete().eq("id",l),s())};return a.jsxs(wr,{title:"Blog Posts",children:[a.jsx("div",{className:"flex justify-end mb-4",children:a.jsxs(J,{onClick:()=>r(yG),children:[a.jsx(Uv,{className:"h-4 w-4 mr-1"})," New post"]})}),a.jsxs("div",{className:"space-y-2",children:[e.length===0&&a.jsx("p",{className:"text-sm text-muted-foreground py-8 text-center",children:'No posts yet — click "New post" to write your first article.'}),e.map(l=>a.jsx(ut,{children:a.jsxs(dt,{className:"p-4 flex items-center gap-4",children:[l.image_url?a.jsx("img",{src:l.image_url,alt:"",className:"h-14 w-14 object-cover rounded"}):a.jsx("div",{className:"h-14 w-14 bg-secondary rounded"}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("p",{className:"font-semibold",children:[l.title," ",!l.is_published&&a.jsx("span",{className:"text-xs text-muted-foreground",children:"(draft)"})]}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[l.category," · ",rt(new Date(l.published_at),"d MMM yyyy")]})]}),a.jsx(J,{size:"sm",variant:"outline",onClick:()=>r(l),children:a.jsx(Hk,{className:"h-3.5 w-3.5"})}),a.jsx(J,{size:"sm",variant:"ghost",onClick:()=>o(l.id),children:a.jsx(Ui,{className:"h-3.5 w-3.5"})})]})},l.id))]}),a.jsx(px,{open:!!n,onOpenChange:l=>!l&&r(null),children:a.jsxs(Xh,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[a.jsx(Zh,{children:a.jsx(ef,{children:n!=null&&n.id?"Edit post":"New post"})}),n&&a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(ne,{children:"Title"}),a.jsx(z,{value:n.title??"",onChange:l=>r({...n,title:l.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Slug (URL)"}),a.jsx(z,{value:n.slug??"",onChange:l=>r({...n,slug:l.target.value})})]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[a.jsxs("div",{children:[a.jsx(ne,{children:"Category"}),a.jsx(z,{value:n.category??"",onChange:l=>r({...n,category:l.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Read time"}),a.jsx(z,{value:n.read_time??"",onChange:l=>r({...n,read_time:l.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Date"}),a.jsx(z,{type:"date",value:n.published_at??"",onChange:l=>r({...n,published_at:l.target.value})})]})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Excerpt"}),a.jsx(Pt,{rows:2,value:n.excerpt??"",onChange:l=>r({...n,excerpt:l.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Content (Markdown supported: **bold**, line breaks, lists)"}),a.jsx(Pt,{rows:12,value:n.content??"",onChange:l=>r({...n,content:l.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Featured image"}),a.jsx(gx,{value:n.image_url,onChange:l=>r({...n,image_url:l}),folder:"blog"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(rc,{checked:!!n.is_published,onCheckedChange:l=>r({...n,is_published:l})}),a.jsx(ne,{children:"Published"})]}),a.jsx(J,{onClick:i,className:"w-full",children:"Save"})]})]})})]})},wG=()=>{const[e,t]=p.useState(null),[n,r]=p.useState(null);p.useEffect(()=>{(async()=>{const{data:o}=await Q.from("site_content").select("*").in("key",["hero","site_info"]);o==null||o.forEach(l=>{l.key==="hero"&&t(l.value),l.key==="site_info"&&r(l.value)})})()},[]);const s=async()=>{const{error:o}=await Q.from("site_content").update({value:e}).eq("key","hero");if(o)return re.error(o.message);re.success("Homepage hero saved")},i=async()=>{const{error:o}=await Q.from("site_content").update({value:n}).eq("key","site_info");if(o)return re.error(o.message);re.success("Site info saved")};return a.jsx(wr,{title:"Site Content",children:a.jsxs("div",{className:"space-y-6 max-w-3xl",children:[a.jsxs(ut,{children:[a.jsx(or,{children:a.jsx(ar,{children:"Homepage hero"})}),a.jsx(dt,{className:"space-y-3",children:e?a.jsxs(a.Fragment,{children:[a.jsxs("div",{children:[a.jsx(ne,{children:"Headline"}),a.jsx(z,{value:e.title,onChange:o=>t({...e,title:o.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Description"}),a.jsx(Pt,{rows:3,value:e.description,onChange:o=>t({...e,description:o.target.value})})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(ne,{children:"Button label"}),a.jsx(z,{value:e.cta_label,onChange:o=>t({...e,cta_label:o.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Button link"}),a.jsx(z,{value:e.cta_link,onChange:o=>t({...e,cta_link:o.target.value})})]})]}
423),a.jsxs("div",{children:[a.jsx(ne,{children:"Hero image (optional — leave empty to use default)"}),a.jsx(gx,{value:e.image_url,onChange:o=>t({...e,image_url:o}),folder:"hero"})]}),a.jsx(J,{onClick:s,children:"Save hero"})]}):a.jsx("p",{children:"Loading…"})})]}),a.jsxs(ut,{children:[a.jsx(or,{children:a.jsx(ar,{children:"Pharmacy info (header, footer, contact)"})}),a.jsx(dt,{className:"space-y-3",children:n?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(ne,{children:"Phone"}),a.jsx(z,{value:n.phone,onChange:o=>r({...n,phone:o.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Email"}),a.jsx(z,{value:n.email,onChange:o=>r({...n,email:o.target.value})})]})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Address"}),a.jsx(Pt,{rows:2,value:n.address,onChange:o=>r({...n,address:o.target.value})})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[a.jsxs("div",{children:[a.jsx(ne,{children:"Mon–Fri hours"}),a.jsx(z,{value:n.hours_weekday,onChange:o=>r({...n,hours_weekday:o.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Saturday hours"}),a.jsx(z,{value:n.hours_saturday,onChange:o=>r({...n,hours_saturday:o.target.value})})]}),a.jsxs("div",{children:[a.jsx(ne,{children:"Sunday hours"}),a.jsx(z,{value:n.hours_sunday,onChange:o=>r({...n,hours_sunday:o.target.value})})]})]}),a.jsx(J,{onClick:i,children:"Save pharmacy info"})]}):a.jsx("p",{children:"Loading…"})})]})]})})},$1=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],bG=()=>{const[e,t]=p.useState([]),[n,r]=p.useState(1),[s,i]=p.useState("09:00"),o=async()=>{const{data:d}=await Q.from("time_slots").select("*").order("weekday").order("slot_time");t(d??[])};p.useEffect(()=>{o()},[]);const l=async(d,h)=>{await Q.from("time_slots").update({is_active:h}).eq("id",d),o()},c=async d=>{await Q.from("time_slots").delete().eq("id",d),o()},u=async()=>{const{error:d}=await Q.from("time_slots").insert({weekday:n,slot_time:s});if(d)return re.error(d.message);re.success("Slot added"),o()};return a.jsxs(wr,{title:"Booking Time Slots",children:[a.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Configure which times are bookable on each day. Toggle off to temporarily hide a slot."}),a.jsxs(ut,{className:"mb-6",children:[a.jsx(or,{children:a.jsx(ar,{className:"text-base",children:"Add a slot"})}),a.jsxs(dt,{className:"flex flex-wrap items-end gap-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-xs block mb-1",children:"Day"}),a.jsx("select",{className:"border rounded h-10 px-3 bg-background",value:n,onChange:d=>r(+d.target.value),children:$1.map((d,h)=>a.jsx("option",{value:h,children:d},h))})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-xs block mb-1",children:"Time (HH:MM)"}),a.jsx(z,{type:"time",value:s,onChange:d=>i(d.target.value),className:"w-32"})]}),a.jsxs(J,{onClick:u,children:[a.jsx(Uv,{className:"h-4 w-4 mr-1"})," Add"]})]})]}),a.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:$1.map((d,h)=>{const f=e.filter(m=>m.weekday===h);return a.jsxs(ut,{children:[a.jsx(or,{children:a.jsx(ar,{className:"text-base",children:d})}),a.jsxs(dt,{className:"space-y-1",children:[f.length===0&&a.jsx("p",{className:"text-xs text-muted-foreground",children:"Closed"}),f.map(m=>a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{children:m.slot_time}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(rc,{checked:m.is_active,onCheckedChange:y=>l(m.id,y)}),a.jsx("button",{onClick:()=>c(m.id),className:"text-muted-foreground hover:text-destructive",children:a.jsx(Ui,{className:"h-3.5 w-3.5"})})]})]},m.id))]})]},h)})})]})},Jn=({tone:e="info",title:t,children:n})=>{const r={info:"bg-primary/5 border-primary/30 text-foreground",warn:"bg-destructive/5 border-destructive/30 text-foreground",tip:"bg-secondary border-border text-foreground"};return a.jsxs("div",{className:`border-l-4 rounded-r-md p-4 my-4 ${r[e]}`,children:[t&&a.jsx("p",{className:"font-semibold mb-1",children:t}),a.jsx("div",{className:"text-sm leading-relaxed [&>p]:m-0",children:n})]})},ei=({children:e})=>a.jsx("ol",{className:"list-decimal pl-5 space-y-1.5 my-3 text-sm",children:e}),ti=({children:e})=>a.jsx("ul",{className:"list-disc pl-5 space-y-1.5 my-3 text-sm",children:e}),Dt=({children:e})=>a.jsx("p",{className:"my-3 text-sm leading-relaxed",children:e}),Ke=({children:e})=>a.jsx("h3",{className:"font-heading font-semibold text-base mt-5 mb-2",children:e}),oo=({headers:e,rows:t})=>a.jsx("div",{className:"my-4 overflow-x-auto rounded-md border",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{className:"bg-secondary",children:a.jsx("tr",{children:e.map(n=>a.jsx("th",{className:"text-left px-3 py-2 font-semibold",children:n},n))})}),a.jsx("tbody",{children:t.map((n,r)=>a.jsx("tr",{className:"border-t",children:n.map((s,i)=>a.jsx("td",{className:"px-3 py-2 align-top",children:s},i))},r))})]})}),Ka=[{id:"overview",title:"Overview",icon:NM,body:a.jsxs(a.Fragment,{children:[a.jsx(Dt,{children:"The admin backend lets you manage everything that appears on the public Oxenhope Pharmacy website — bookings, services, blog posts, homepage content and appointment availability. No technical knowledge is required; if you can use email and Word, you can run this site."}),a.jsx(Dt,{children:"This guide is organised by task. Use the menu on the left to jump to a section, or search by keyword."}),a.jsx(Jn,{tone:"tip",title:"Saving your work",children:"Most pages save automatically when you click the save/update button. If you navigate away with unsaved changes, the browser will warn 
423you."})]})},{id:"claim-admin",title:"Claiming admin access",icon:EM,body:a.jsxs(a.Fragment,{children:[a.jsx(Dt,{children:"The very first time the site is set up, one person needs to claim admin rights. After that, anyone else who needs access must be added by an existing admin."}),a.jsx(Ke,{children:"One-time setup"}),a.jsxs(ei,{children:[a.jsxs("li",{children:["Go to the website and click ",a.jsx("strong",{children:"Sign up"}),"."]}),a.jsx("li",{children:"Create an account with the pharmacy's main email address."}),a.jsx("li",{children:"Verify the email by clicking the link sent to your inbox."}),a.jsxs("li",{children:["Visit ",a.jsx("code",{children:"/admin"}),` — you'll see a "Claim admin access" button.`]}),a.jsx("li",{children:"Click it. You're now the admin."})]}),a.jsx(Jn,{tone:"warn",title:"Only works once",children:'The "Claim admin access" button only appears if no admin exists yet. After the first claim it disappears for security.'})]})},{id:"login",title:"Logging in day-to-day",icon:PM,body:a.jsxs(a.Fragment,{children:[a.jsxs(ei,{children:[a.jsx("li",{children:"Scroll to the very bottom of any page on the website."}),a.jsxs("li",{children:["Click the small ",a.jsx("strong",{children:"Staff login"})," link in the footer."]}),a.jsx("li",{children:"Enter your email and password."}),a.jsx("li",{children:"You'll land on the admin dashboard automatically."})]}),a.jsxs(Jn,{tone:"tip",title:"Bookmark it",children:["Save ",a.jsx("code",{children:"oxenhopepharmacy.co.uk/admin"})," as a browser bookmark for one-click access."]})]})},{id:"dashboard",title:"Dashboard tour",icon:Uk,body:a.jsxs(a.Fragment,{children:[a.jsx(Dt,{children:"The dashboard is your starting point. From left to right in the sidebar:"}),a.jsx(oo,{headers:["Item","What it does"],rows:[["Dashboard","At-a-glance counts of bookings, services and blog posts."],["Bookings","Every appointment request, list or calendar view."],["Services","Add, edit, reorder or hide pharmacy services."],["Blog Posts","Write and publish news and health articles."],["Site Content","Homepage hero, contact details, opening hours."],["Time Slots","Configure which days and times are bookable."],["Help & Guide","This guide."]]})]})},{id:"bookings",title:"Managing bookings",icon:ma,body:a.jsxs(a.Fragment,{children:[a.jsxs(Dt,{children:["Every appointment request submitted through the website appears here in real time. You'll also receive an email at ",a.jsx("strong",{children:"[email protected]"})," for each one."]}),a.jsx(Ke,{children:"List vs Calendar view"}),a.jsxs(ti,{children:[a.jsxs("li",{children:[a.jsx("strong",{children:"List view"})," — best for processing today's requests in order."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Calendar view"})," — best for spotting busy days and gaps."]})]}),a.jsx(Ke,{children:"Booking statuses"}),a.jsx(oo,{headers:["Status","Meaning"],rows:[["Pending","New request, not yet contacted."],["Confirmed","You've spoken to the patient and the slot is booked."],["Completed","Appointment has taken place."],["Cancelled","Patient cancelled or did not attend."]]}),a.jsx(Ke,{children:"Confirming a booking"}),a.jsxs(ei,{children:[a.jsx("li",{children:"Click the booking row to expand it."}),a.jsx("li",{children:"Phone or email the patient to agree the time."}),a.jsxs("li",{children:["Set status to ",a.jsx("strong",{children:"Confirmed"}),"."]}),a.jsx("li",{children:'Add a note if needed (e.g. "PIL emailed").'})]}),a.jsx(Jn,{tone:"tip",title:"Notes are private",children:"Admin notes are only visible to staff — patients never see them."})]})},{id:"time-slots",title:"Time slots & availability",icon:Fv,body:a.jsxs(a.Fragment,{children:[a.jsx(Dt,{children:"Time slots control which dates and times patients can choose when booking. If a slot isn't listed here, it won't appear on the booking form."}),a.jsx(Ke,{children:"Adding a slot"}),a.jsxs(ei,{children:[a.jsxs("li",{children:["Go to ",a.jsx("strong",{children:"Time Slots"}),"."]}),a.jsx("li",{children:"Pick a weekday (Mon–Sun)."}),a.jsxs("li",{children:["Enter the time in 24-hour format (e.g. ",a.jsx("code",{children:"14:30"}),")."]}),a.jsxs("li",{children:["Click ",a.jsx("strong",{children:"Add"}),"."]})]}),a.jsx(Ke,{children:"Disabling without deleting"}),a.jsxs(Dt,{children:["Toggle the ",a.jsx("strong",{children:"Active"})," switch off to temporarily hide a slot (e.g. during holidays). Switch it back on when you're ready."]}),a.jsx(Jn,{tone:"warn",title:"Holidays",children:"Remember to disable slots before bank holidays and the Christmas closure."})]})},{id:"services",title:"Services CMS",icon:Vv,body:a.jsxs(a.Fragment,{children:[a.jsx(Ke,{children:"Adding a service"}),a.jsxs(ei,{children:[a.jsxs("li",{children:["Click ",a.jsx("strong",{children:"+ New Service"}),"."]}),a.jsx("li",{children:"Fill in title, short description (1–2 sentences) and full description (markdown supp
423orted)."}),a.jsx("li",{children:"Upload a square image (recommended 800×800)."}),a.jsxs("li",{children:["Tick ",a.jsx("strong",{children:"Bookable"})," if patients should be able to request it from the booking form."]}),a.jsxs("li",{children:["Tick ",a.jsx("strong",{children:"Published"})," to make it live."]}),a.jsx("li",{children:"Set a display order (lower numbers appear first)."})]}),a.jsx(Ke,{children:"Editing or hiding"}),a.jsxs(ti,{children:[a.jsx("li",{children:"Click any service row to edit."}),a.jsxs("li",{children:["Untick ",a.jsx("strong",{children:"Published"})," to hide without deleting — useful for seasonal services like flu jabs."]})]})]})},{id:"blog",title:"Blog posts",icon:$v,body:a.jsxs(a.Fragment,{children:[a.jsx(Dt,{children:"Use the blog for health tips, seasonal advice, NHS Pharmacy First updates and pharmacy news."}),a.jsx(Ke,{children:"Writing a post"}),a.jsxs(ei,{children:[a.jsxs("li",{children:["Click ",a.jsx("strong",{children:"+ New Post"}),"."]}),a.jsx("li",{children:'Add a clear, keyword-rich title (e.g. "Hay fever relief from your Keighley pharmacist").'}),a.jsx("li",{children:"Write a 1-sentence excerpt — this shows on the blog list and in Google."}),a.jsxs("li",{children:["Write the body in markdown — use ",a.jsx("code",{children:"##"})," for subheadings."]}),a.jsx("li",{children:"Upload a header image (1200×630 recommended)."}),a.jsxs("li",{children:["Tick ",a.jsx("strong",{children:"Published"})," when ready."]})]}),a.jsx(Jn,{tone:"tip",title:"SEO tip",children:'Mention "Keighley", "Oxenhope" or "West Yorkshire" naturally — it helps local search rankings.'})]})},{id:"site-content",title:"Site content & homepage",icon:Bk,body:a.jsxs(a.Fragment,{children:[a.jsxs(Dt,{children:["The ",a.jsx("strong",{children:"Site Content"})," page lets you change global text and images without editing code."]}),a.jsx(oo,{headers:["Field","Where it appears"],rows:[["Hero title / subtitle","Big text at the top of the homepage."],["Hero image","Background image on the homepage."],["Phone / email / address","Footer and contact page."],["Opening hours","Footer, contact page and Google profile."]]}),a.jsxs(Jn,{tone:"warn",title:"Phone numbers",children:["Always include the area code — ",a.jsx("code",{children:"01535 642 825"}),", not ",a.jsx("code",{children:"642 825"}),"."]})]})},{id:"images",title:"Image specs & free tools",icon:SM,body:a.jsxs(a.Fragment,{children:[a.jsx(Ke,{children:"Recommended sizes"}),a.jsx(oo,{headers:["Use","Size","Format"],rows:[["Service tile","800 × 800","JPG"],["Blog header","1200 × 630","JPG"],["Homepage hero","1920 × 1080","JPG"],["Logo / icon","Any (transparent)","PNG"]]}),a.jsx(Ke,{children:"Free tools we recommend"}),a.jsxs(ti,{children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Squoosh"})," (squoosh.app) — shrinks file size without losing quality."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Canva"})," (canva.com) — quick branded graphics."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Unsplash"})," (unsplash.com) — free royalty-free photos. Prefer UK-based imagery."]})]}),a.jsx(Jn,{tone:"warn",title:"File size",children:"Keep images under 500 KB where possible. Large images make the site slow."})]})},{id:"account",title:"Account & password",icon:BM,body:a.jsxs(a.Fragment,{children:[a.jsx(Ke,{children:"Changing your password"}),a.jsxs(ei,{children:[a.jsx("li",{children:"Sign out."}),a.jsxs("li",{children:["On the login page click ",a.jsx("strong",{children:"Forgot password?"}),"."]}),a.jsx("li",{children:"Enter your email — a reset link will be sent."}),a.jsx("li",{children:"Click the link and choose a new password (at least 8 characters)."})]}),a.jsx(Jn,{tone:"warn",title:"Don't share logins",children:"Each admin should have their own account. If a staff member leaves, change the password and remove their access."})]})},{id:"checklist",title:"Best-practice checklist",icon:LM,body:a.jsxs(a.Fragment,{children:[a.jsx(Ke,{children:"Daily"}),a.jsxs(ti,{children:[a.jsx("li",{children:"Check new bookings and confirm by phone."}),a.jsx("li",{children:"Reply to any contact-form enquiries."})]}),a.jsx(Ke,{children:"Weekly"}),a.jsxs(ti,{children:[a.jsxs("li",{children:["Mark completed appointments as ",a.jsx("strong",{children:"Completed"}),"."]}),a.jsx("li",{children:"Review next week's slots and disable any unavailable ones."})]}),a.jsx(Ke,{children:"Monthly"}),a.jsxs(ti,{children:[a.jsx("li",{children:"Publish at least one blog post."}),a.jsx("li",{children:"Review service descriptions and prices."}),a.jsx("li",{children:"Refresh the homepage hero image if relevant."})]}),a.jsx(Ke,{children:"Seasonal"}),a.jsxs(ti,{children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Sept–Nov:"})," publish flu vaccine info, enable flu slots."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Mar–Jun:"})," hay fever, travel vaccines."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Dec:"})," Christmas opening hours, disable closed-day slots."]})]})]})},{id:"troubleshooting",title:"Troubleshooting & FAQs",icon:Fk,body:a.jsxs(a.Fragment,{children:[a.jsx(Ke,{children:"I can't log in"}),a.jsxs(Dt,{children:["Use ",a.jsx("strong",{children:"Forgot password?"})," to reset. If you still can't get in, another admin can re-add your account."]}),a.jsx(Ke,{children:"A patient says they can't book my time slot"}),a.jsxs(Dt,{children:["Check the slot is active and the service is marked as ",a.jsx("strong",{children:"Bookable"}),". Slots only appear on weekdays you've configured."]}),a.jsx(Ke,{children:"My image won't upload"}),a.jsx(Dt,{children:"Files must be JPG or PNG and under 5 MB. Use Squoosh to compress oversized photos."}),a.jsx(Ke,{children:"The booking confirmation email didn't arrive"}),a.jsx(Dt,{children:"Check spam. Patient must enter a valid email — phone-only bookings won't trigger an email. Admin notification always goes to [email protected]."}),a.jsx(Ke,{children:"I deleted something by accident"}),a.jsx(Dt,{children:"Get in touch with Lovable support — recent versions can usually be restored."})]})},{id:"glossary",title:"Glossary",icon:wM,body:a.jsx(a.Fragment,{children:a.jsx(oo,{headers:["Term","Meaning"],rows:[["CMS","Content Management System — the admin pages you're using now."],["Slug","The URL-friendly version of a title (e.g. 'flu-vaccine')."],["Markdown","Simple formatting using # for headings, ** for bold."],["Hero","The big banner area at the top of a page."],["EPS","Electronic Prescription Service — NHS digital prescriptions."],["Pharmacy First","NHS service letting p
423harmacists treat 7 common conditions."],["PGD","Patient Group Direction — lets pharmacists supply certain meds without a GP prescription."]]})})},{id:"cheatsheet",title:"Quick reference",icon:UM,body:a.jsxs(a.Fragment,{children:[a.jsx(oo,{headers:["I want to…","Go to"],rows:[["See today's bookings","Bookings → List view"],["Block a holiday","Time Slots → toggle Active off"],["Add a new service","Services → + New Service"],["Update phone number","Site Content → contact"],["Write a news post","Blog Posts → + New Post"],["Reset my password","Sign out → Forgot password?"],["Hide a service for the season","Services → untick Published"],["Change homepage image","Site Content → Hero image"]]}),a.jsxs(Jn,{tone:"tip",title:"Need offline access?",children:["Use the ",a.jsx("strong",{children:"Download PDF"})," button at the top of this page for a printable copy."]})]})}],SG=()=>{const[e,t]=p.useState(""),[n,r]=p.useState(Ka[0].id),s=p.useRef(null),i=qn(),o=p.useMemo(()=>{const c=e.trim().toLowerCase();return c?Ka.filter(u=>u.title.toLowerCase().includes(c)||(u.keywords??"").toLowerCase().includes(c)):Ka},[e]);p.useEffect(()=>{const c=new IntersectionObserver(u=>{const d=u.filter(h=>h.isIntersecting).sort((h,f)=>h.boundingClientRect.top-f.boundingClientRect.top);d[0]&&r(d[0].target.id)},{rootMargin:"-80px 0px -70% 0px",threshold:0});return Ka.forEach(u=>{const d=document.getElementById(u.id);d&&c.observe(d)}),()=>c.disconnect()},[]),p.useEffect(()=>{var u;const c=i.hash.replace("#","");c&&((u=document.getElementById(c))==null||u.scrollIntoView({behavior:"smooth",block:"start"}))},[i.hash]);const l=c=>{var u;(u=document.getElementById(c))==null||u.scrollIntoView({behavior:"smooth",block:"start"})};return a.jsxs(wr,{title:"Help & Guide",children:[a.jsxs("div",{className:"flex justify-between items-start mb-6 gap-4 flex-wrap",children:[a.jsx("p",{className:"text-muted-foreground text-sm max-w-2xl",children:"Everything you need to manage the Oxenhope Pharmacy website. Use the menu on the left to jump to a section, or download the full PDF for offline reference."}),a.jsx(J,{asChild:!0,variant:"outline",size:"sm",children:a.jsxs("a",{href:"/admin-guide.pdf",download:!0,children:[a.jsx($k,{className:"h-4 w-4 mr-2"})," Download PDF"]})})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[260px_1fr] gap-6",children:[a.jsxs("aside",{className:"lg:sticky lg:top-6 lg:self-start lg:max-h-[calc(100vh-3rem)] lg:overflow-y-auto",children:[a.jsxs("div",{className:"relative mb-3",children:[a.jsx(Vk,{className:"h-4 w-4 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),a.jsx(z,{placeholder:"Search…",value:e,onChange:c=>t(c.target.value),className:"pl-8"})]}),a.jsxs("nav",{className:"space-y-0.5",children:[o.map(c=>{const u=c.icon,d=n===c.id;return a.jsxs("button",{onClick:()=>l(c.id),className:`w-full text-left flex items-center gap-2 px-3 py-2 rounded-md text-sm transition-colors ${d?"bg-primary text-primary-foreground":"text-foreground hover:bg-secondary"}`,children:[a.jsx(u,{className:"h-4 w-4 shrink-0"}),a.jsx("span",{className:"truncate",children:c.title})]},c.id)}),o.length===0&&a.jsx("p",{className:"text-xs text-muted-foreground px-3 py-2",children:"No matches."})]})]}),a.jsx("article",{ref:s,className:"bg-background rounded-xl border p-6 md:p-8 max-w-3xl",children:Ka.map((c,u)=>{const d=c.icon;return a.jsxs("section",{id:c.id,className:u>0?"mt-10 pt-6 border-t":"",children:[a.jsxs("h2",{className:"font-heading text-xl font-bold flex items-center gap-2 mb-2 scroll-mt-6",children:[a.jsx(d,{className:"h-5 w-5 text-primary"})," ",c.title]}),c.body]},c.id)})})]})]})},jG=()=>{const[e,t]=p.useState([]),[n,r]=p.useState(!0),s=async()=>{r(!0);const{data:l,error:c}=await Q.from("contact_submissions").select("*").order("created_at",{ascending:!1});c?re.error(c.message):t(l||[]),r(!1)};p.useEffect(()=>{s()},[]);const i=async(l,c)=>{const{error:u}=await Q.from("contact_submissions").update({is_read:c}).eq("id",l);if(u)return re.error(u.message);t(e.map(d=>d.id===l?{...d,is_read:c}:d))},o=async l=>{if(!confirm("Delete this enquiry?"))return;const{error:c}=await Q.from("contact_submissions").delete().eq("id",l);if(c)return re.error(c.message);t(e.filter(u=>u.id!==l)),re.success("Deleted")};return a.jsx(wr,{title:"Contact Enquiries",children:n?a.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):e.length===0?a.jsx("p",{className:"text-muted-foreground",children:"No contact enquiries yet."}):a.jsx("div",{className:"space-y-3",children:e.map(l=>a.jsxs("div",{className:`bg-background border rounded-lg p-4 ${l.is_read?"":"border-primary/40"}`,children:[a.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx("h3",{className:"font-semibold",children:l.name}),!l.is_read&&a.jsx(Is,{variant:"default",children:"New"}),l.subject&&a.jsx(Is,{variant:"secondary",children:l.subject})]}),a.jsxs("div",{className:"text-xs text-muted-foreground mt-1 flex gap-3 flex-wrap",children:[a.jsxs("a",{href:`mailto:${l.email}`,className:"flex items-center gap-1 hover:text-primary",children:[a.jsx(Pi,{className:"h-3 w-3"}),l.email]}),l.phone&&a.jsxs("a",{href:`tel:${l.phone}`,className:"flex items-center gap-1 hover:text-primary",children:[a.jsx(Ai,{className:"h-3 w-3"}),l.phone]}
423),a.jsx("span",{children:new Date(l.created_at).toLocaleString("en-GB")})]})]}),a.jsxs("div",{className:"flex gap-2 shrink-0",children:[a.jsxs(J,{size:"sm",variant:"outline",onClick:()=>i(l.id,!l.is_read),children:[a.jsx(fh,{className:"h-3.5 w-3.5 mr-1"}),l.is_read?"Unread":"Read"]}),a.jsx(J,{size:"sm",variant:"ghost",onClick:()=>o(l.id),children:a.jsx(Ui,{className:"h-3.5 w-3.5"})})]})]}),a.jsx("p",{className:"text-sm whitespace-pre-wrap",children:l.message})]},l.id))})})},kG=["new","in_progress","resolved","closed"],CG=()=>{const[e,t]=p.useState([]),[n,r]=p.useState(!0),s=async()=>{r(!0);const{data:c,error:u}=await Q.from("complaints").select("*").order("created_at",{ascending:!1});u?re.error(u.message):t(c||[]),r(!1)};p.useEffect(()=>{s()},[]);const i=async(c,u)=>{const{error:d}=await Q.from("complaints").update(u).eq("id",c);if(d)return re.error(d.message);t(e.map(h=>h.id===c?{...h,...u}:h))},o=async c=>{if(!confirm("Delete this complaint?"))return;const{error:u}=await Q.from("complaints").delete().eq("id",c);if(u)return re.error(u.message);t(e.filter(d=>d.id!==c))},l=c=>c==="resolved"||c==="closed"?"secondary":"default";return a.jsx(wr,{title:"Complaints",children:n?a.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):e.length===0?a.jsx("p",{className:"text-muted-foreground",children:"No complaints yet."}):a.jsx("div",{className:"space-y-3",children:e.map(c=>a.jsxs("div",{className:"bg-background border rounded-lg p-4",children:[a.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx("h3",{className:"font-semibold",children:c.name}),a.jsx(Is,{variant:l(c.status),children:c.status.replace("_"," ")}),c.nature&&a.jsxs("span",{className:"text-sm text-muted-foreground",children:["— ",c.nature]})]}),a.jsxs("div",{className:"text-xs text-muted-foreground mt-1 flex gap-3 flex-wrap",children:[a.jsxs("a",{href:`mailto:${c.email}`,className:"flex items-center gap-1 hover:text-primary",children:[a.jsx(Pi,{className:"h-3 w-3"}),c.email]}),c.phone&&a.jsxs("a",{href:`tel:${c.phone}`,className:"flex items-center gap-1 hover:text-primary",children:[a.jsx(Ai,{className:"h-3 w-3"}),c.phone]}),a.jsx("span",{children:new Date(c.created_at).toLocaleString("en-GB")})]})]}),a.jsxs("div",{className:"flex gap-2 shrink-0 items-center",children:[a.jsxs(_s,{value:c.status,onValueChange:u=>i(c.id,{status:u}),children:[a.jsx(Or,{className:"h-8 w-36 text-xs",children:a.jsx(Ns,{})}),a.jsx(Mr,{children:kG.map(u=>a.jsx(et,{value:u,children:u.replace("_"," ")},u))})]}),a.jsx(J,{size:"sm",variant:"ghost",onClick:()=>o(c.id),children:a.jsx(Ui,{className:"h-3.5 w-3.5"})})]})]}),a.jsx("p",{className:"text-sm whitespace-pre-wrap mb-3",children:c.details}),a.jsx(Pt,{placeholder:"Internal notes (only admins can see this)…",defaultValue:c.admin_notes||"",onBlur:u=>u.target.value!==(c.admin_notes||"")&&i(c.id,{admin_notes:u.target.value}),rows:2,className:"text-sm"})]},c.id))})})},_G=()=>{const[e,t]=p.useState([]),[n,r]=p.useState(!0),s=async()=>{r(!0);const{data:u,error:d}=await Q.from("newsletter_subscribers").select("*").order("created_at",{ascending:!1});d?re.error(d.message):t(u||[]),r(!1)};p.useEffect(()=>{s()},[]);const i=async(u,d)=>{const{error:h}=await Q.from("newsletter_subscribers").update({is_active:d}).eq("id",u);if(h)return re.error(h.message);t(e.map(f=>f.id===u?{...f,is_active:d}:f))},o=async u=>{if(!confirm("Remove this subscriber?"))return;const{error:d}=await Q.from("newsletter_subscribers").delete().eq("id",u);if(d)return re.error(d.message);t(e.filter(h=>h.id!==u))},l=()=>{const d=["email,subscribed_on,source",...e.filter(y=>y.is_active).map(y=>`${y.email},${new Date(y.created_at).toISOString()},${y.source||""}`)].join(`
424`),h=new Blob([d],{type:"text/csv"}),f=URL.createObjectURL(h),m=document.createElement("a");m.href=f,m.download=`newsletter-subscribers-${new Date().toISOString().slice(0,10)}.csv`,m.click(),URL.revokeObjectURL(f)},c=e.filter(u=>u.is_active).length;return a.jsxs(wr,{title:"Newsletter Subscribers",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsxs("p",{className:"text-sm text-muted-foreground",children:[c," active · ",e.length," total"]}),a.jsxs(J,{size:"sm",variant:"outline",onClick:l,disabled:e.length===0,children:[a.jsx($k,{className:"h-3.5 w-3.5 mr-1.5"})," Export CSV"]})]}),n?a.jsx("p",{className:"text-muted-foreground",children:"Loading…"}):e.length===0?a.jsx("p",{className:"text-muted-foreground",children:"No subscribers yet."}):a.jsx("div",{className:"bg-background border rounded-lg overflow-hidden",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{className:"bg-secondary/50 text-left",children:a.jsxs("tr",{children:[a.jsx("th",{className:"p-3",children:"Email"}),a.jsx("th",{className:"p-3",children:"Source"}),a.jsx("th",{className:"p-3",children:"Subscribed"}),a.jsx("th",{className:"p-3",children:"Status"}),a.jsx("th",{className:"p-3 text-right",children:"Actions"})]})}),a.jsx("tbody",{children:e.map(u=>a.jsxs("tr",{className:"border-t",children:[a.jsx("td",{className:"p-3",children:a.jsx("a",{href:`mailto:${u.email}`,className:"hover:text-primary",children:u.email})}),a.jsx("td",{className:"p-3 text-muted-foreground",children:u.source||"—"}),a.jsx("td",{className:"p-3 text-muted-foreground",children:new Date(u.created_at).toLocaleDateString("en-GB")}),a.jsx("td",{className:"p-3",children:a.jsx(Is,{variant:u.is_active?"default":"secondary",children:u.is_active?"Active":"Unsubscribed"})}),a.jsxs("td",{className:"p-3 text-right",children:[a.jsx(J,{size:"sm",variant:"outline",className:"mr-2",onClick:()=>i(u.id,!u.is_active),children:u.is_active?"Unsubscribe":"Reactivate"}),a.jsx(J,{size:"sm",variant:"ghost",onClick:()=>o(u.id),children:a.jsx(Ui,{className:"h-3.5 w-3.5"})})]})]},u.id))})]})})]})},NG=()=>a.jsx(ve,{seo:{title:"Weight Loss Injections in Keighley",description:"Mounjaro, Wegovy and Saxenda weight loss injections at Oxenhope Pharmacy in Keighley. Private consultation included."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Weight Loss Injections"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"Oxenhope Pharmacy offers convenient and effective injectable weight loss drugs designed to help you take control of your health and reach your weight loss goals. This treatment is specifically designed to reduce hunger and regulate blood sugar levels, providing you with the support you need to maintain a healthy lifestyle."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"How Do Injectable Weight Loss Drugs Work?"}),a.jsx("p",{className:"leading-relaxed",children:"Weight loss drugs work by mimicking natural hormones in your body to suppress hunger and help you feel fuller for longer. When combined with a balanced diet and regular physical activity, this injectable treatment can accelerate your weight loss journey and improve overall health."}),a.jsx("p",{className:"leading-relaxed",children:"Oxenhope Pharmacy offers two different weight loss drugs:"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-3",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Wegovy"})," — Contains the active ingredient semaglutide, a GLP-1 receptor agonist, which mimics the effects of a naturally occurring hormone that helps regulate appetite and feelings of hunger. It also reduces blood sugar levels by promoting the release of insulin when blood sugar levels are high."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Mounjaro"})," — Contains tirzepatide, a dual GLP-1 and GIP receptor agonist. It is designed to help with weight loss by mimicking two hormones involved in appetite regulation. These hormones work together to enhance feelings of fullness, reduce hunger, and improve glucose control."]})]}),a.jsx("p",{className:"leading-relaxed",children:"Both drugs come with a pre-filled injector pen and are taken weekly by being injected in the upper arms, thighs or abdomen."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Is a Weight Loss Injection Right For Me?"}),a.jsx("p",{className:"leading-relaxed",children:"Weight loss injections may be suitable if you have a BMI of 30 or above, or a BMI of 27 or above with weight-related health conditions. Our pharmacists will carry out a thorough consultation to assess your suitability."}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/book-appointment",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Book a consultation ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),EG=()=>a.jsx(ve,{seo:{title:"Private PGDs & Treatments",description:"Access private prescription-only treatments at Oxenhope Pharmacy in Keighley — no GP appointment needed."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Private PGDs"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"At Oxenhope Pharmacy, we offer a range of private healthcare solutions designed to enhance your lifestyle. Our services are tailored to meet your individual needs, ensuring you receive the best care possible. Whether you're seeking advice, treatment, or preventive measures, our expert team is here to supp
424ort you every step of the way."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Our Private Services Include:"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-2",children:[a.jsx("li",{children:"Men's health"}),a.jsx("li",{children:"Minor ailments"}),a.jsx("li",{children:"Seasonal health"}),a.jsx("li",{children:"Sexual health"}),a.jsx("li",{children:"Skincare"}),a.jsx("li",{children:"Travel health"}),a.jsx("li",{children:"Vaccinations"}),a.jsx("li",{children:"Weight management"}),a.jsx("li",{children:"Women's health"})]}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/contact",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Contact us for more information ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),TG=()=>a.jsx(ve,{seo:{title:"NHS Pharmacy First Service",description:"Free NHS Pharmacy First treatment at Oxenhope Pharmacy in Keighley for 7 common conditions including UTIs, sinusitis and sore throat."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Pharmacy First Services"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"Welcome to Oxenhope Pharmacy, your trusted neighbourhood pharmacy in Keighley. Our commitment to your health goes beyond traditional services, and we are proud to introduce the innovative Pharmacy First, offering you quick and easy access to professional healthcare solutions right here in Keighley."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"What is Pharmacy First?"}),a.jsx("p",{className:"leading-relaxed",children:"Pharmacy First is a revolutionary healthcare service designed to provide immediate access to essential clinical treatments without the need for a GP appointment. At Oxenhope Pharmacy, we understand the value of your time and well-being, and that's why we are excited to offer this convenient alternative."}),a.jsx("p",{className:"leading-relaxed",children:"Oxenhope Pharmacy can provide prescription-only medicine free of charge under the NHS for the following conditions:"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[a.jsx("li",{children:"Sinusitis (12 years and over)"}),a.jsx("li",{children:"Sore throat (5 years and over)"}),a.jsx("li",{children:"Acute otitis media (1 to 17 years)"}),a.jsx("li",{children:"Infected insect bites (1 year and over)"}),a.jsx("li",{children:"Impetigo (1 year and over)"}),a.jsx("li",{children:"Shingles (18 years and over)"}),a.jsx("li",{children:"Uncomplicated urinary tract infections in women (16–64 years)"})]}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"How Does it Work?"}),a.jsxs("ol",{className:"list-decimal pl-5 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Walk-In Convenience:"})," Skip the wait for a GP appointment. Visit us and speak directly with our trained professionals."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Assessment and Advice:"})," Our expert team will assess your symptoms and provide professional advice on the most suitable treatment options."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Prescription Issuance:"})," If necessary, we can provide prescriptions on the spot, ensuring you get the required medication without delay."]})]}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Key Benefits of Pharmacy First"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Immediate Access:"})," Receive prompt attention without the need for a lengthy wait."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Expert Guidance:"})," Benefit from the knowledge and expertise of our trained pharmacy professionals."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Convenient Location:"})," Access healthcare services right in the heart of Keighley."]})]}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/contact",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Visit us today ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),PG=()=>a.jsx(ve,{seo:{title:"Travel Clinic in Keighley",description:"Private travel clinic at Oxenhope Pharmacy in Keighley. Travel vaccinations, antimalarials and bespoke travel health advice."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Travel Clinic"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"Are you preparing for your upcoming journey, whether it's a gap year adventure, a spiritual pilgrimage to Mecca for Hajj or Umrah, or a business trip to an exotic de
424stination? No matter where you're headed, our Travel Clinic in Keighley is dedicated to safeguarding your health throughout your travels."}),a.jsx("p",{className:"leading-relaxed",children:"We're partnered with PharmaDoctor for Travel Vaccines!"}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Why are travel vaccinations important?"}),a.jsx("p",{className:"leading-relaxed",children:"Travelling to exotic countries can expose you to pathogens your body lacks protection against. This may lead to infection and disease, for example, Hepatitis A or Yellow Fever which will, of course, lead to illness. In some cases, these illnesses can be very severe or even fatal. By having a vaccination, or multiple before you travel, you will develop protection against them."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"How do travel vaccines work?"}),a.jsx("p",{className:"leading-relaxed",children:"Travel vaccines function similarly, offering immunity against various diseases, with many types available. Essentially, we inject a solution into you, mimicking the invading pathogen of the disease. This process triggers your immune system to create antibodies specifically designed to fight the infection. Therefore, if you ever encounter a bacteria or virus in the future, your defence system will destroy it before it can harm you."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"When to get your travel vaccines"}),a.jsx("p",{className:"leading-relaxed",children:"We recommend getting your travel vaccinations at least 6–8 weeks before you travel. Some vaccines require multiple doses over several weeks, so it's best to plan ahead. However, even if your trip is sooner, come and see us — we can still help."}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/book-appointment",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Book a travel consultation ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),AG=()=>a.jsx(ve,{seo:{title:"Uric Acid Testing for Gout",description:"Quick uric acid blood tests for gout management at Oxenhope Pharmacy in Keighley with same-day results."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Uric Acid Testing"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsxs("p",{className:"leading-relaxed",children:["At Oxenhope Pharmacy, we provide comprehensive uric acid testing to help you manage your health and prevent potential complications associated with high uric acid levels, such as gout and kidney stones. ",a.jsx("em",{children:"Please note, the cost of this service is £10."})]}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Why Test for Uric Acid?"}),a.jsx("p",{className:"leading-relaxed",children:"Uric acid testing is essential for diagnosing and monitoring conditions associated with elevated uric acid levels. It can help identify gout, monitor the effectiveness of treatment for gout or kidney stones, and evaluate the risk of developing related conditions. Regular testing is particularly crucial for individuals experiencing symptoms of high uric acid, such as joint pain and kidney problems, or those with a history of related health issues."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Our Testing Process"}),a.jsx("p",{className:"leading-relaxed",children:"We conduct a simple blood test to measure the level of uric acid in your blood. Here's what you can expect:"}),a.jsxs("ol",{className:"list-decimal pl-5 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Preparation"})," — No special preparation is typically required. However, we recommend consulting with our specialists if you need to adjust your medication or diet before the test."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Blood Sample Collection"})," — A small blood sample will be drawn from a vein in your arm using a needle. The procedure is quick and causes minimal discomfort."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Analysis"})," — The collected sample will be analysed to determine the uric acid level. Normal blood uric acid levels typically range from 3.5 to 7.2 mg/dL for men and 2.6 to 6.0 mg/dL for women."]})]}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/book-appointment",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Book a test ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),RG=()=>a.jsx(ve,{seo:{title:"Cholesterol Testing in Keighley",description:"Walk-in cholesterol checks at Oxenhope Pharmacy in Keighley. Quick finger-prick test with results in minutes."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Cholesterol Testing"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"Oxenhope Pharmacy is your trusted destination for comprehensive cholesterol checks in Keighley. Understanding your cholesterol levels is crucial for maintaining heart health and preventing cardiovascular diseases."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Why Check Your Cholesterol?"}),a.jsx("p",{className:"leading-relaxed",children:"High cholesterol is a major risk factor for heart disease and stroke. It often has no symptoms, so regular testing is the only way to know y
424our levels. Our quick and convenient cholesterol test can help you understand your risk and take proactive steps to protect your health."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"What to Expect"}),a.jsx("p",{className:"leading-relaxed",children:"Our cholesterol check involves a simple finger-prick blood test that provides results quickly. Our pharmacists will explain your results, advise on lifestyle changes if needed, and refer you to your GP if further investigation is required."}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/book-appointment",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Book a cholesterol check ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),OG=()=>a.jsx(ve,{seo:{title:"Blood Glucose & Diabetes Testing",description:"Blood glucose testing for diabetes and prediabetes at Oxenhope Pharmacy in Keighley. Fast, accurate results."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Blood Glucose Testing"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"At Oxenhope Pharmacy, we understand the critical importance of early detection and management of high blood sugar which can lead to diabetes. Our comprehensive blood sugar testing services are designed to provide accurate and timely diagnosis, helping you manage your health effectively."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Why Test for Blood Sugar?"}),a.jsx("p",{className:"leading-relaxed",children:"Blood glucose testing is crucial for individuals who are at risk of, or experiencing symptoms of diabetes, those who have risk factors such as a family history of diabetes, or anyone who wants to ensure they are diabetes-free. Regular testing can help in early detection and prevent complications associated with diabetes, such as heart disease, kidney damage, and vision impairment."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Our Testing Options"}),a.jsxs("ol",{className:"list-decimal pl-5 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Fasting Blood Sugar Test"})," — This test measures your blood sugar after an overnight fast. A fasting blood sugar level from 100 to 125 mg/dL suggests prediabetes, and 126 mg/dL or higher indicates diabetes."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Random Blood Sugar Test"})," — A blood sample will be taken at a random time, regardless of when you last ate. Blood sugar levels of 200 mg/dL or higher suggest diabetes."]})]}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/book-appointment",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Book a blood glucose test ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),MG=()=>a.jsx(ve,{seo:{title:"Vitamin B12 Injections in Keighley",description:"Vitamin B12 injections at Oxenhope Pharmacy in Keighley to boost energy and support overall health."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"B12 Injections"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"Oxenhope Pharmacy, located in the heart of Keighley, offers B12 injections to support a range of health conditions. Our trained pharmacists use the latest equipment to ensure that you receive a safe and effective B12 injection."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Benefits of B12 Injections"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[a.jsx("li",{children:"Boosts energy levels"}),a.jsx("li",{children:"Supports a healthy nervous system"}),a.jsx("li",{children:"Promotes healthy skin, hair and nails"}),a.jsx("li",{children:"Helps to reduce stress and anxiety"})]}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"How do B12 injections work?"}),a.jsx("p",{className:"leading-relaxed",children:"B12 injections deliver high doses of vitamin B12 giving a fast acting result via an Intra Muscular injection, this method of delivery ensures that the body absorbs the maximum amount of B12 for optimal health benefits."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Is a B12 injection right for me?"}),a.jsx("p",{className:"leading-relaxed",children:"B12 injections may be recommended for individuals with a B12 deficiency, a medical condition that affects the absorption of B12 from food. If you are feeling tired, run-down, or have a diagnosed B12 deficiency, a B12 injection may be right for you."}),a.jsx("p",{className:"leading-relaxed",children:"At Oxenhope Pharmacy, we are committed to providing you with the highest quality health care services. Our team of knowledgeable pharmacists will work with you to determine the best treatment plan for your individual needs."}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/book-appointment",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Book a B12 injection ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),DG=()=>
424a.jsx(ve,{seo:{title:"Microsuction Earwax Removal",description:"Safe, painless microsuction earwax removal at Oxenhope Pharmacy in Keighley by trained clinicians."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Earwax Removal"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"In the UK, 3.9% need earwax management yearly, enduring 12–16 week waits. The lack of NHS treatment leads many to suffer unaware of local pharmacy options. Various factors, like age and loud noises, impact ear health. Earwax build-up and hearing loss can lead to social withdrawal. If you are concerned about your hearing health and you are looking for earwax removal in Keighley then please contact us, we can help."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Diagnosis & Treatment"}),a.jsx("p",{className:"leading-relaxed",children:"Thanks to modern technology, we are able to quickly diagnose wax build up and carry out treatment to remove the wax following a pre-consultation where you will be asked to use olive oil ear spray for a few days prior to your appointment."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"What to expect"}),a.jsx("p",{className:"leading-relaxed",children:"Each appointment will take around 30 minutes. One of our highly trained clinicians will carry out the test. Once they have removed the wax they will take a look at the general health of the ear canal and discuss any findings with you."}),a.jsx("p",{className:"leading-relaxed",children:"During the examination, high-definition images and videos will be taken – looking at before and after images. This will identify any issues and whether or not you may require onward referral."}),a.jsx("p",{className:"leading-relaxed",children:"In most cases, however, the initial problem is simply the presence of excessive wax. If this occurs, our team can perform a fast and painless micro-suction procedure to clear the ear of debris and wax build-up. This procedure can immediately improve your hearing and is a popular, well used service."}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/book-appointment",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Book an earwax removal appointment ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),IG=()=>a.jsx(ve,{seo:{title:"Free Blood Pressure Checks",description:"Free NHS blood pressure checks at Oxenhope Pharmacy in Keighley — no appointment needed."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Blood Pressure Checks"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"High blood pressure is a leading risk factor for Cardiovascular Disease (CVD) and a silent threat, affecting over 5.5 million undiagnosed individuals in England. Early detection is crucial to reduce CVD risks. Oxenhope Pharmacy partners with the NHS to offer Blood Pressure Checks in Keighley."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"What is High Blood Pressure?"}),a.jsx("p",{className:"leading-relaxed",children:"Hypertension, also known as High Blood Pressure, is a common condition whereby the long-term force of blood against your artery walls is high enough that it may eventually cause severe health problems. Unfortunately, Hypertension does not portray any noticeable symptoms and the only way to find out if your blood pressure is high is to have it checked."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Causes of High Blood Pressure"}),a.jsx("p",{className:"leading-relaxed",children:"The causes of high blood pressure are not always clear, however, you may be at a higher risk if you:"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[a.jsx("li",{children:"Eat too much salt and do not eat enough fruit and vegetables"}),a.jsx("li",{children:"Do not do enough exercise"}
424),a.jsx("li",{children:"Are overweight"}),a.jsx("li",{children:"Drink too much alcohol or caffeine-based drinks"}),a.jsx("li",{children:"Smoke regularly"}),a.jsx("li",{children:"Are over the age of 65"}),a.jsx("li",{children:"Are sleep-deprived or have disturbed sleep"}),a.jsx("li",{children:"Have a relative with high blood pressure"})]}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/book-appointment",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Book a blood pressure check ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),LG=()=>a.jsx(ve,{seo:{title:"Flu Vaccinations (NHS & Private)",description:"Get your flu jab at Oxenhope Pharmacy in Keighley. NHS and private flu vaccinations available throughout the season."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Flu Vaccine"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"Getting the flu vaccine in Keighley is a great idea. Maybe you are worried about catching the flu, or you are concerned about having time off work. Or maybe you just want to make sure you do not pass it on to the more vulnerable members of your family. Whatever the reason, having the flu vaccine against this year's strain of seasonal flu can give you protection and peace of mind. Oxenhope Pharmacy offers NHS and private flu vaccines in Keighley."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"The Importance of the Flu Vaccine"}),a.jsx("p",{className:"leading-relaxed",children:"The significance of flu vaccination lies in the fact that, although flu is disagreeable for the majority of individuals, it can pose a risk and potentially be life-threatening for certain individuals, especially those with specific health conditions."}),a.jsx("p",{className:"leading-relaxed",children:"The optimal period for receiving your flu vaccination is during autumn or early winter, prior to the onset of flu transmission. However, it is still possible to obtain your vaccine at a later time."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"NHS Flu Vaccine Eligibility"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[a.jsx("li",{children:"Adults who are 65 and over"}),a.jsx("li",{children:"People with certain medical conditions"}),a.jsx("li",{children:"Pregnant women"}),a.jsx("li",{children:"Frontline health or social care workers"}),a.jsx("li",{children:"Anyone who receives a carer's allowance, or are the main carer for an older or disabled person"}),a.jsx("li",{children:"All those living with someone who has lowered immunity due to disease or treatment"})]}),a.jsx("div",{className:"mt-8",children:a.jsxs(X,{to:"/book-appointment",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Book your flu vaccine ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})})]})]})})}),FG=()=>a.jsx(ve,{seo:{title:"Covid-19 Vaccinations",description:"Covid-19 vaccinations at Oxenhope Pharmacy in Keighley for eligible NHS patients and private bookings."},children:a.jsx("section",{className:"py-16 md:py-20",children:a.jsxs("div",{className:"container max-w-3xl",children:[a.jsx("h1",{className:"font-heading text-3xl md:text-4xl font-bold mb-6",children:"Covid-19 Vaccine"}),a.jsxs("div",{className:"prose prose-sm max-w-none text-muted-foreground space-y-5",children:[a.jsx("p",{className:"leading-relaxed",children:"Welcome to Oxenhope Pharmacy, your dedicated local pharmacy in Keighley. In our commitment to community health, we are proud to offer the COVID-19 Vaccine, a crucial step towards safeguarding your well-being."}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"COVID-19 Vaccine Services"}),a.jsx("p",{className:"leading-relaxed",children:"Our COVID-19 Vaccine Services aim to provide convenient access to vaccination, helping protect you and those around you from the ongoing threat of the virus."}),a.jsxs("ul",{className:"list-disc pl-5 space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Convenient Accessibility:"})," Access COVID-19 vaccination conveniently in Keighley, saving you time and ensuring a streamlined process."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Community Safety:"})," By getting vaccinated, you contribute to community safety, helping to reduce the spread of COVID-19 and protect vulnerable populations."]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Peace of Mind:"})," Receive your COVID-19 vaccine with confidence, knowing that you're taking a crucial step towards safeguarding your health."]})]}),a.jsx("h2",{className:"font-heading text-xl font-semibold text-foreground !mt-8",children:"Eligibility for COVID-19 Vaccination Autumn Booster 2025"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[a.jsx("li",{children:"Aged 75 and over"}),a.jsx("li",{children:"Immunocompromised"}),a.jsx("li",{children:"Pregnancy"})]}),a.jsxs("p",{className:"leading-relaxed",children:["To ensure you meet the latest eligibility criteria, please consult the most recent"," ",a.jsx("a",{href:"https://www.nhs.u
424k/conditions/covid-19/covid-19-vaccination/getting-a-covid-19-vaccine/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"NHS guidelines"}),"."]}),a.jsxs("div",{className:"bg-secondary/40 rounded-xl p-6 border mt-6",children:[a.jsx("h3",{className:"font-heading font-semibold text-foreground mb-2",children:"Book Your Vaccine"}),a.jsx("p",{className:"leading-relaxed mb-3",children:"You can book your COVID-19 vaccine through the NHS booking system or by contacting us directly."}),a.jsxs("a",{href:"https://www.nhs.uk/nhs-services/covid-19-services/covid-19-vaccination-services/book-covid-19-vaccination/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline",children:["Book via NHS ",a.jsx(qe,{className:"h-3.5 w-3.5"})]})]})]})]})})}),$G=new c3,BG=()=>a.jsx(n_,{children:a.jsx(d3,{client:$G,children:a.jsx($L,{children:a.jsxs(B5,{children:[a.jsx(jD,{}),a.jsx(tI,{}),a.jsx(c4,{children:a.jsxs(t4,{children:[a.jsx(de,{path:"/",element:a.jsx(gz,{})}),a.jsx(de,{path:"/about",element:a.jsx(yz,{})}),a.jsx(de,{path:"/services",element:a.jsx(bz,{})}),a.jsx(de,{path:"/services/weight-loss-injections",element:a.jsx(NG,{})}),a.jsx(de,{path:"/services/private-pgds",element:a.jsx(EG,{})}),a.jsx(de,{path:"/services/pharmacy-first",element:a.jsx(TG,{})}),a.jsx(de,{path:"/services/travel-clinic",element:a.jsx(PG,{})}),a.jsx(de,{path:"/services/uric-acid-testing",element:a.jsx(AG,{})}),a.jsx(de,{path:"/services/cholesterol-testing",element:a.jsx(RG,{})}),a.jsx(de,{path:"/services/blood-glucose-testing",element:a.jsx(OG,{})}),a.jsx(de,{path:"/services/b12-injections",element:a.jsx(MG,{})}),a.jsx(de,{path:"/services/earwax-removal",element:a.jsx(DG,{})}),a.jsx(de,{path:"/services/blood-pressure-checks",element:a.jsx(IG,{})}),a.jsx(de,{path:"/services/flu-vaccine",element:a.jsx(LG,{})}),a.jsx(de,{path:"/services/covid-19-vaccine",element:a.jsx(FG,{})}),a.jsx(de,{path:"/prescriptions",element:a.jsx(Cz,{})}),a.jsx(de,{path:"/prescription-order",element:a.jsx(BK,{})}),a.jsx(de,{path:"/book-appointment",element:a.jsx(v7,{})}),a.jsx(de,{path:"/travel-vaccines",element:a.jsx(w7,{})}),a.jsx(de,{path:"/blog",element:a.jsx(k7,{})}),a.jsx(de,{path:"/blog/:slug",element:a.jsx(C7,{})}),a.jsx(de,{path:"/contact",element:a.jsx(S7,{})}),a.jsx(de,{path:"/login",element:a.jsx(T7,{})}),a.jsx(de,{path:"/signup",element:a.jsx(P7,{})}),a.jsx(de,{path:"/reset-password",element:a.jsx(A7,{})}),a.jsx(de,{path:"/account",element:a.jsx(R7,{})}),a.jsx(de,{path:"/complaints",element:a.jsx(O7,{})}),a.jsx(de,{path:"/gphc-registration",element:a.jsx(M7,{})}),a.jsx(de,{path:"/eps-nomination",element:a.jsx($7,{})}),a.jsx(de,{path:"/unsubscribe",element:a.jsx(V7,{})}),a.jsx(de,{path:"/admin",element:a.jsx(H7,{})}),a.jsx(de,{path:"/admin/bookings",element:a.jsx(uG,{})}),a.jsx(de,{path:"/admin/services",element:a.jsx(vG,{})}),a.jsx(de,{path:"/admin/blog",element:a.jsx(xG,{})}),a.jsx(de,{path:"/admin/content",element:a.jsx(wG,{})}),a.jsx(de,{path:"/admin/settings",element:a.jsx(bG,{})}),a.jsx(de,{path:"/admin/help",element:a.jsx(SG,{})}),a.jsx(de,{path:"/admin/contacts",element:a.jsx(jG,{})}),a.jsx(de,{path:"/admin/complaints",element:a.jsx(CG,{})}),a.jsx(de,{path:"/admin/newsletter",element:a.jsx(_G,{})}),a.jsx(de,{path:"*",element:a.jsx(_7,{})})]})})]})})})});ak(document.getElementById("root")).render(a.jsx(BG,{}));

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.