vendor: 4,973 bytes, lines 1-9
1var Bre=Object.defineProperty;var FD=e=>{throw TypeError(e)};var Ure=(e,t,r)=>t in e?Bre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $=(e,t,r)=>Ure(e,typeof t!="symbol"?t+"":t,r),B1=(e,t,r)=>t.has(e)||FD("Cannot "+r);var Q=(e,t,r)=>(B1(e,t,"read from private field"),r?r.call(e):t.get(e)),jt=(e,t,r)=>t.has(e)?FD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),et=(e,t,r,n)=>(B1(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Yt=(e,t,r)=>(B1(e,t,"access private method"),r);var fy=(e,t,r,n)=>({set _(a){et(e,t,a,r)},get _(){return Q(e,t,n)}});function zre(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var $p=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ur(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var iU={exports:{}},Tw={},oU={exports:{}},sr={};/** 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 av=Symbol.for("react.element"),Wre=Symbol.for("react.portal"),Vre=Symbol.for("react.fragment"),Hre=Symbol.for("react.strict_mode"),qre=Symbol.for("react.profiler"),Yre=Symbol.for("react.provider"),Gre=Symbol.for("react.context"),Kre=Symbol.for("react.forward_ref"),Qre=Symbol.for("react.suspense"),Zre=Symbol.for("react.memo"),Xre=Symbol.for("react.lazy"),BD=Symbol.iterator;function Jre(e){return e===null||typeof e!="object"?null:(e=BD&&e[BD]||e["@@iterator"],typeof e=="function"?e:null)}var lU={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cU=Object.assign,dU={};function fm(e,t,r){this.props=e,this.context=t,this.refs=dU,this.updater=r||lU}fm.prototype.isReactComponent={};fm.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")};fm.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uU(){}uU.prototype=fm.prototype;function kP(e,t,r){this.props=e,this.context=t,this.refs=dU,this.updater=r||lU}var CP=kP.prototype=new uU;CP.constructor=kP;cU(CP,fm.prototype);CP.isPureReactComponent=!0;var UD=Array.isArray,fU=Object.prototype.hasOwnProperty,TP={current:null},hU={key:!0,ref:!0,__self:!0,__source:!0};function mU(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)fU.call(t,n)&&!hU.hasOwnProperty(n)&&(a[n]=t[n]);var l=arguments.length-2;if(l===1)a.children=r;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];a.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)a[n]===void 0&&(a[n]=l[n]);return{$$typeof:av,type:e,key:i,ref:o,props:a,_owner:TP.current}}function ene(e,t){return{$$typeof:av,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function _P(e){return typeof e=="object"&&e!==null&&e.$$typeof===av}function tne(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var zD=/\/+/g;function U1(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tne(""+e.key):t.toString(36)}function pb(e,t,r,n,a){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 av:case Wre:o=!0}}if(o)return o=e,a=a(o),e=n===""?"."+U1(o,0):n,UD(a)?(r="",e!=null&&(r=e.replace(zD,"$&/")+"/"),pb(a,t,r,"",function(d){return d})):a!=null&&(_P(a)&&(a=ene(a,r+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(zD,"$&/")+"/")+e)),t.push(a)),1;if(o=0,n=n===""?".":n+":",UD(e))for(var l=0;l<e.length;l++){i=e[l];var c=n+U1(i,l);
vendor: 4,273 bytes, lines 9-17
9o+=pb(i,t,r,c,a)}else if(c=Jre(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=n+U1(i,l++),o+=pb(i,t,r,c,a);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 hy(e,t,r){if(e==null)return e;var n=[],a=0;return pb(e,n,"","",function(i){return t.call(r,i,a++)}),n}function rne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var na={current:null},gb={transition:null},nne={ReactCurrentDispatcher:na,ReactCurrentBatchConfig:gb,ReactCurrentOwner:TP};function pU(){throw Error("act(...) is not supported in production builds of React.")}sr.Children={map:hy,forEach:function(e,t,r){hy(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return hy(e,function(){t++}),t},toArray:function(e){return hy(e,function(t){return t})||[]},only:function(e){if(!_P(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};sr.Component=fm;sr.Fragment=Vre;sr.Profiler=qre;sr.PureComponent=kP;sr.StrictMode=Hre;sr.Suspense=Qre;sr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nne;sr.act=pU;sr.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=cU({},e.props),a=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=TP.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)fU.call(t,c)&&!hU.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];n.children=l}return{$$typeof:av,type:e.type,key:a,ref:i,props:n,_owner:o}};sr.createContext=function(e){return e={$$typeof:Gre,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Yre,_context:e},e.Consumer=e};sr.createElement=mU;sr.createFactory=function(e){var t=mU.bind(null,e);return t.type=e,t};sr.createRef=function(){return{current:null}};sr.forwardRef=function(e){return{$$typeof:Kre,render:e}};sr.isValidElement=_P;sr.lazy=function(e){return{$$typeof:Xre,_payload:{_status:-1,_result:e},_init:rne}};sr.memo=function(e,t){return{$$typeof:Zre,type:e,compare:t===void 0?null:t}};sr.startTransition=function(e){var t=gb.transition;gb.transition={};try{e()}finally{gb.transition=t}};sr.unstable_act=pU;sr.useCallback=function(e,t){return na.current.useCallback(e,t)};sr.useContext=function(e){return na.current.useContext(e)};sr.useDebugValue=function(){};sr.useDeferredValue=function(e){return na.current.useDeferredValue(e)};sr.useEffect=function(e,t){return na.current.useEffect(e,t)};sr.useId=function(){return na.current.useId()};sr.useImperativeHandle=function(e,t,r){return na.current.useImperativeHandle(e,t,r)};sr.useInsertionEffect=function(e,t){return na.current.useInsertionEffect(e,t)};sr.useLayoutEffect=function(e,t){return na.current.useLayoutEffect(e,t)};sr.useMemo=function(e,t){return na.current.useMemo(e,t)};sr.useReducer=function(e,t,r){return na.current.useReducer(e,t,r)};sr.useRef=function(e){return na.current.useRef(e)};sr.useState=function(e){return na.current.useState(e)};sr.useSyncExternalStore=function(e,t,r){return na.current.useSyncExternalStore(e,t,r)};sr.useTransition=function(){return na.current.useTransition()};sr.version="18.3.1";oU.exports=sr;var p=oU.exports;const O=ur(p),PP=zre({__proto__:null,default:O},[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 sne=p,ane=Symbol.for("react.element"),ine=Symbol.for("react.fragment"),one=Object.prototype.hasOwnProperty,lne=sne.__SECRET_INT
vendor: 11,453 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cne={key:!0,ref:!0,__self:!0,__source:!0};function gU(e,t,r){var n,a={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)one.call(t,n)&&!cne.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:ane,type:e,key:i,ref:o,props:a,_owner:lne.current}}Tw.Fragment=ine;Tw.jsx=gU;Tw.jsxs=gU;iU.exports=Tw;var s=iU.exports,xU={exports:{}},Va={},vU={exports:{}},yU={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(R,q){var V=R.length;R.push(q);e:for(;0<V;){var se=V-1>>>1,oe=R[se];if(0<a(oe,q))R[se]=q,R[V]=oe,V=se;else break e}}function r(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var q=R[0],V=R.pop();if(V!==q){R[0]=V;e:for(var se=0,oe=R.length,_e=oe>>>1;se<_e;){var U=2*(se+1)-1,M=R[U],G=U+1,K=R[G];if(0>a(M,V))G<oe&&0>a(K,M)?(R[se]=K,R[G]=V,se=G):(R[se]=M,R[U]=V,se=U);else if(G<oe&&0>a(K,V))R[se]=K,R[G]=V,se=G;else break e}}return q}function a(R,q){var V=R.sortIndex-q.sortIndex;return V!==0?V:R.id-q.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=[],d=[],u=1,f=null,h=3,m=!1,g=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(R){for(var q=r(d);q!==null;){if(q.callback===null)n(d);else if(q.startTime<=R)n(d),q.sortIndex=q.expirationTime,t(c,q);else break;q=r(d)}}function w(R){if(x=!1,j(R),!g)if(r(c)!==null)g=!0,W(N);else{var q=r(d);q!==null&&z(w,q.startTime-R)}}function N(R,q){g=!1,x&&(x=!1,b(T),T=-1),m=!0;var V=h;try{for(j(q),f=r(c);f!==null&&(!(f.expirationTime>q)||R&&!P());){var se=f.callback;if(typeof se=="function"){f.callback=null,h=f.priorityLevel;var oe=se(f.expirationTime<=q);q=e.unstable_now(),typeof oe=="function"?f.callback=oe:f===r(c)&&n(c),j(q)}else n(c);f=r(c)}if(f!==null)var _e=!0;else{var U=r(d);U!==null&&z(w,U.startTime-q),_e=!1}return _e}finally{f=null,h=V,m=!1}}var S=!1,k=null,T=-1,C=5,E=-1;function P(){return!(e.unstable_now()-E<C)}function _(){if(k!==null){var R=e.unstable_now();E=R;var q=!0;try{q=k(!0,R)}finally{q?I():(S=!1,k=null)}}else S=!1}var I;if(typeof y=="function")I=function(){y(_)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,H=F.port2;F.port1.onmessage=_,I=function(){H.postMessage(null)}}else I=function(){v(_,0)};function W(R){k=R,S||(S=!0,I())}function z(R,q){T=v(function(){R(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){g||m||(g=!0,W(N))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(R){switch(h){case 1:case 2:case 3:var q=3;break;default:q=h}var V=h;h=q;try{return R()}finally{h=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,q){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var V=h;h=R;try{return q()}finally{h=V}},e.unstable_scheduleCallback=function(R,q,V){var se=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?se+V:se):V=se,R){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=V+oe,R={id:u++,callback:q,priorityLevel:R,startTime:V,expirationTime:oe,sortIndex:-1},V>se?(R.sortIndex=V,t(d,R),r(c)===null&&R===r(d)&&(x?(b(T),T=-1):x=!0,z(w,V-se))):(R.sortIndex=oe,t(c,R),g||m||(g=!0,W(N))),R},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(R){var q=h;return function(){var V=h;h=q;try{return R.apply(this,arguments)}finally{h=V}}}})(yU);vU.exports=yU;var dne=vU.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 une=p,za=dne;function De(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 bU=new Set,bg={};function Au(e,t){dh(e,t),dh(e+"Capture",t)}function dh(e,t){for(bg[e]=t,e=0;e<t.length;e++)bU.add(t[e])}var Pl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wk=Object.prototype.hasOwnProperty,fne=/^[: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]*$/,WD={},VD={};function hne(e){return Wk.call(VD,e)?!0:Wk.call(WD,e)?!1:fne.test(e)?VD[e]=!0:(WD[e]=!0,!1)}function mne(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pne(e,t,r,n){if(t===null||typeof t>"u"||mne(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 sa(e,t,r,n,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var gs={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){gs[e]=new sa(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];gs[t]=new sa(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){gs[e]=new sa(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){gs[e]=new sa(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){gs[e]=new sa(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){gs[e]=new sa(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){gs[e]=new sa(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){gs[e]=new sa(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){gs[e]=new sa(e,5,!1,e.toLowerCase(),null,!1,!1)});var EP=/[\-:]([a-z])/g;function OP(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(EP,OP);gs[t]=new sa(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(EP,OP);gs[t]=new sa(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(EP,OP);gs[t]=new sa(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){gs[e]=new sa(e,1,!1,e.toLowerCase(),null,!1,!1)});gs.xlinkHref=new sa("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){gs[e]=new sa(e,1,!1,e.toLowerCase(),null,!0,!0)});function AP(e,t,r,n){var a=gs.hasOwnProperty(t)?gs[t]:null;(a!==null?a.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(pne(t,r,a,n)&&(r=null),n||a===null?hne(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,n=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var zl=une.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,my=Symbol.for("react.element"),of=Symbol.for("react.portal"),lf=Symbol.for("react.fragment"),DP=Symbol.for("react.strict_mode"),Vk=Symbol.for("react.profiler"),jU=Symbol.for("react.provider"),wU=Symbol.for("react.context"),MP=Symbol.for("react.forward_ref"),Hk=Symbol.for("react.suspense"),qk=Symbol.for("react.suspense_list"),IP=Symbol.for("react.memo"),lc=Symbol.for("react.lazy"),NU=Symbol.for("react.offscreen"),HD=Symbol.iterator;function Xm(e){return e===null||typeof e!="object"?null:(e=HD&&e[HD]||e["@@iterator"],typeof e=="function"?e:null)}var pn=Object.assign,z1;function Lp(e){if(z1===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);z1=t&&t[1]||""}return` 34`+z1+e}var W1=!1;function V1(e,t){if(!e||W1)return"";W1=!0;var r=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(d){var n=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){n=d}e.call(t.prototype)}else{try{throw Error()}catch(d){n=d}e()}}
vendor: 14,137 bytes, lines 34-37
34catch(d){if(d&&n&&typeof d.stack=="string"){for(var a=d.stack.split(` 35`),i=n.stack.split(` 36`),o=a.length-1,l=i.length-1;1<=o&&0<=l&&a[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(a[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||a[o]!==i[l]){var c=` 37`+a[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{W1=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Lp(e):""}function gne(e){switch(e.tag){case 5:return Lp(e.type);case 16:return Lp("Lazy");case 13:return Lp("Suspense");case 19:return Lp("SuspenseList");case 0:case 2:case 15:return e=V1(e.type,!1),e;case 11:return e=V1(e.type.render,!1),e;case 1:return e=V1(e.type,!0),e;default:return""}}function Yk(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 lf:return"Fragment";case of:return"Portal";case Vk:return"Profiler";case DP:return"StrictMode";case Hk:return"Suspense";case qk:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wU:return(e.displayName||"Context")+".Consumer";case jU:return(e._context.displayName||"Context")+".Provider";case MP:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case IP:return t=e.displayName||null,t!==null?t:Yk(e.type)||"Memo";case lc:t=e._payload,e=e._init;try{return Yk(e(t))}catch{}}return null}function xne(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 Yk(t);case 8:return t===DP?"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 Vc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function SU(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vne(e){var t=SU(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function py(e){e._valueTracker||(e._valueTracker=vne(e))}function kU(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=SU(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Zb(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 Gk(e,t){var r=t.checked;return pn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function qD(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Vc(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function CU(e,t){t=t.checked,t!=null&&AP(e,"checked",t,!1)}function Kk(e,t){CU(e,t);var r=Vc(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Qk(e,t.type,r):t.hasOwnProperty("defaultValue")&&Qk(e,t.type,Vc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function YD(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Qk(e,t,r){(t!=="number"||Zb(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Fp=Array.isArray;function Ef(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Vc(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Zk(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(De(91));return pn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function GD(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(De(92));if(Fp(r)){if(1<r.length)throw Error(De(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Vc(r)}}function TU(e,t){var r=Vc(t.value),n=Vc(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function KD(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function _U(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 Xk(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?_U(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var gy,PU=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(gy=gy||document.createElement("div"),gy.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=gy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function jg(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Zp={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},yne=["Webkit","ms","Moz","O"];Object.keys(Zp).forEach(function(e){yne.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zp[t]=Zp[e]})});function EU(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Zp.hasOwnProperty(e)&&Zp[e]?(""+t).trim():t+"px"}function OU(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=EU(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var bne=pn({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 Jk(e,t){if(t){if(bne[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(De(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(De(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(De(61))}if(t.style!=null&&typeof t.style!="object")throw Error(De(62))}}function eC(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tC=null;function RP(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rC=null,Of=null,Af=null;function QD(e){if(e=lv(e)){if(typeof rC!="function")throw Error(De(280));var t=e.stateNode;t&&(t=Aw(t),rC(e.stateNode,e.type,t))}}function AU(e){Of?Af?Af.push(e):Af=[e]:Of=e}function DU(){if(Of){var e=Of,t=Af;if(Af=Of=null,QD(e),t)for(e=0;e<t.length;e++)QD(t[e])}}function MU(e,t){return e(t)}function IU(){}var H1=!1;function RU(e,t,r){if(H1)return e(t,r);H1=!0;try{return MU(e,t,r)}finally{H1=!1,(Of!==null||Af!==null)&&(IU(),DU())}}function wg(e,t){var r=e.stateNode;if(r===null)return null;var n=Aw(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(De(231,t,typeof r));return r}var nC=!1;if(Pl)try{var Jm={};Object.defineProperty(Jm,"passive",{get:function(){nC=!0}}),window.addEventListener("test",Jm,Jm),window.removeEventListener("test",Jm,Jm)}catch{nC=!1}function jne(e,t,r,n,a,i,o,l,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(r,d)}catch(u){this.onError(u)}}var Xp=!1,Xb=null,Jb=!1,sC=null,wne={onError:function(e){Xp=!0,Xb=e}};function Nne(e,t,r,n,a,i,o,l,c){Xp=!1,Xb=null,jne.apply(wne,arguments)}function Sne(e,t,r,n,a,i,o,l,c){if(Nne.apply(this,arguments),Xp){if(Xp){var d=Xb;Xp=!1,Xb=null}else throw Error(De(198));Jb||(Jb=!0,sC=d)}}function Du(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function $U(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 ZD(e){if(Du(e)!==e)throw Error(De(188))}function kne(e){var t=e.alternate;if(!t){if(t=Du(e),t===null)throw Error(De(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===r)return ZD(a),e;if(i===n)return ZD(a),t;i=i.sibling}throw Error(De(188))}if(r.return!==n.return)r=a,n=i;else{for(var o=!1,l=a.child;l;){if(l===r){o=!0,r=a,n=i;break}if(l===n){o=!0,n=a,r=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===r){o=!0,r=i,n=a;break}if(l===n){o=!0,n=i,r=a;break}l=l.sibling}if(!o)throw Error(De(189))}}if(r.alternate!==n)throw Error(De(190))}if(r.tag!==3)throw Error(De(188));return r.stateNode.current===r?e:t}function LU(e){return e=kne(e),e!==null?FU(e):null}function FU(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=FU(e);if(t!==null)return t;e=e.sibling}return null}var BU=za.unstable_scheduleCallback,XD=za.unstable_cancelCallback,Cne=za.unstable_shouldYield,Tne=za.unstable_requestPaint,Tn=za.unstable_now,_ne=za.unstable_getCurrentPriorityLevel,$P=za.unstable_ImmediatePriority,UU=za.unstable_UserBlockingPriority,e0=za.unstable_NormalPriority,Pne=za.unstable_LowPriority,zU=za.unstable_IdlePriority,_w=null,_o=null;function Ene(e){if(_o&&typeof _o.onCommitFiberRoot=="function")try{_o.onCommitFiberRoot(_w,e,void 0,(e.current.flags&128)===128)}catch{}}var Ri=Math.clz32?Math.clz32:Dne,One=Math.log,Ane=Math.LN2;function Dne(e){return e>>>=0,e===0?32:31-(One(e)/Ane|0)|0}var xy=64,vy=4194304;function Bp(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 t0(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var l=o&~a;l!==0?n=Bp(l):(i&=o,i!==0&&(n=Bp(i)))}else o=r&~a,o!==0?n=Bp(o):i!==0&&(n=Bp(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Ri(t),a=1<<r,n|=e[r],t&=~a;return n}function Mne(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 Ine(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Ri(i),l=1<<o,c=a[o];c===-1?(!(l&r)||l&n)&&(a[o]=Mne(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function aC(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function WU(){var e=xy;return xy<<=1,!(xy&4194240)&&(xy=64),e}function q1(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,096 bytes, line 37
37function iv(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ri(t),e[t]=r}function Rne(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-Ri(r),i=1<<a;t[a]=0,n[a]=-1,e[a]=-1,r&=~i}}function LP(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Ri(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}var Er=0;function VU(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var HU,FP,qU,YU,GU,iC=!1,yy=[],Oc=null,Ac=null,Dc=null,Ng=new Map,Sg=new Map,uc=[],$ne="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 JD(e,t){switch(e){case"focusin":case"focusout":Oc=null;break;case"dragenter":case"dragleave":Ac=null;break;case"mouseover":case"mouseout":Dc=null;break;case"pointerover":case"pointerout":Ng.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sg.delete(t.pointerId)}}function ep(e,t,r,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=lv(t),t!==null&&FP(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Lne(e,t,r,n,a){switch(t){case"focusin":return Oc=ep(Oc,e,t,r,n,a),!0;case"dragenter":return Ac=ep(Ac,e,t,r,n,a),!0;case"mouseover":return Dc=ep(Dc,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;return Ng.set(i,ep(Ng.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,Sg.set(i,ep(Sg.get(i)||null,e,t,r,n,a)),!0}return!1}function KU(e){var t=Od(e.target);if(t!==null){var r=Du(t);if(r!==null){if(t=r.tag,t===13){if(t=$U(r),t!==null){e.blockedOn=t,GU(e.priority,function(){qU(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xb(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=oC(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);tC=n,r.target.dispatchEvent(n),tC=null}else return t=lv(r),t!==null&&FP(t),e.blockedOn=r,!1;t.shift()}return!0}function eM(e,t,r){xb(e)&&r.delete(t)}function Fne(){iC=!1,Oc!==null&&xb(Oc)&&(Oc=null),Ac!==null&&xb(Ac)&&(Ac=null),Dc!==null&&xb(Dc)&&(Dc=null),Ng.forEach(eM),Sg.forEach(eM)}function tp(e,t){e.blockedOn===t&&(e.blockedOn=null,iC||(iC=!0,za.unstable_scheduleCallback(za.unstable_NormalPriority,Fne)))}function kg(e){function t(a){return tp(a,e)}if(0<yy.length){tp(yy[0],e);for(var r=1;r<yy.length;r++){var n=yy[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Oc!==null&&tp(Oc,e),Ac!==null&&tp(Ac,e),Dc!==null&&tp(Dc,e),Ng.forEach(t),Sg.forEach(t),r=0;r<uc.length;r++)n=uc[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<uc.length&&(r=uc[0],r.blockedOn===null);)KU(r),r.blockedOn===null&&uc.shift()}var Df=zl.ReactCurrentBatchConfig,r0=!0;function Bne(e,t,r,n){var a=Er,i=Df.transition;Df.transition=null;try{Er=1,BP(e,t,r,n)}finally{Er=a,Df.transition=i}}function Une(e,t,r,n){var a=Er,i=Df.transition;Df.transition=null;try{Er=4,BP(e,t,r,n)}finally{Er=a,Df.transition=i}}function BP(e,t,r,n){if(r0){var a=oC(e,t,r,n);if(a===null)rS(e,t,n,n0,r),JD(e,n);else if(Lne(a,e,t,r,n))n.stopPropagation();else if(JD(e,n),t&4&&-1<$ne.indexOf(e)){for(;a!==null;){var i=lv(a);if(i!==null&&HU(i),i=oC(e,t,r,n),i===null&&rS(e,t,n,n0,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else rS(e,t,n,null,r)}}var n0=null;function oC(e,t,r,n){if(n0=null,e=RP(n),e=Od(e),e!==null)if(t=Du(e),t===null)e=null;else if(r=t.tag,r===13){if(e=$U(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return n0=e,null}
vendor: 10,219 bytes, line 37
37function QU(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(_ne()){case $P:return 1;case UU:return 4;case e0:case Pne:return 16;case zU:return 536870912;default:return 16}default:return 16}}var Cc=null,UP=null,vb=null;function ZU(){if(vb)return vb;var e,t=UP,r=t.length,n,a="value"in Cc?Cc.value:Cc.textContent,i=a.length;for(e=0;e<r&&t[e]===a[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===a[i-n];n++);return vb=a.slice(e,1<n?1-n:void 0)}function yb(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 by(){return!0}function tM(){return!1}function Ha(e){function t(r,n,a,i,o){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?by:tM,this.isPropagationStopped=tM,this}return pn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=by)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=by)},persist:function(){},isPersistent:by}),t}var hm={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zP=Ha(hm),ov=pn({},hm,{view:0,detail:0}),zne=Ha(ov),Y1,G1,rp,Pw=pn({},ov,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:WP,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!==rp&&(rp&&e.type==="mousemove"?(Y1=e.screenX-rp.screenX,G1=e.screenY-rp.screenY):G1=Y1=0,rp=e),Y1)},movementY:function(e){return"movementY"in e?e.movementY:G1}}),rM=Ha(Pw),Wne=pn({},Pw,{dataTransfer:0}),Vne=Ha(Wne),Hne=pn({},ov,{relatedTarget:0}),K1=Ha(Hne),qne=pn({},hm,{animationName:0,elapsedTime:0,pseudoElement:0}),Yne=Ha(qne),Gne=pn({},hm,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kne=Ha(Gne),Qne=pn({},hm,{data:0}),nM=Ha(Qne),Zne={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xne={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"},Jne={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ese(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jne[e])?!!t[e]:!1}function WP(){return ese}var tse=pn({},ov,{key:function(e){if(e.key){var t=Zne[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yb(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xne[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:WP,charCode:function(e){return e.type==="keypress"?yb(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yb(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rse=Ha(tse),nse=pn({},Pw,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sM=Ha(nse),sse=pn({},ov,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:WP}),ase=Ha(sse),ise=pn({},hm,{propertyName:0,elapsedTime:0,pseudoElement:0}),ose=Ha(ise),lse=pn({},Pw,{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}),cse=Ha(lse),dse=[9,13,27,32],VP=Pl&&"CompositionEvent"in window,Jp=null;Pl&&"documentMode"in document&&(Jp=document.documentMode);var use=Pl&&"TextEvent"in window&&!Jp,XU=Pl&&(!VP||Jp&&8<Jp&&11>=Jp),aM=" ",iM=!1;function JU(e,t){switch(e){case"keyup":return dse.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ez(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cf=!1;function fse(e,t){switch(e){case"compositionend":return ez(t);case"keypress":return t.which!==32?null:(iM=!0,aM);case"textInput":return e=t.data,e===aM&&iM?null:e;default:return null}}function hse(e,t){if(cf)return e==="compositionend"||!VP&&JU(e,t)?(e=ZU(),vb=UP=Cc=null,cf=!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 XU&&t.locale!=="ko"?null:t.data;default:return null}}var mse={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 oM(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mse[e.type]:t==="textarea"}function tz(e,t,r,n){AU(n),t=s0(t,"onChange"),0<t.length&&(r=new zP("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var eg=null,Cg=null;function pse(e){fz(e,0)}function Ew(e){var t=ff(e);if(kU(t))return e}function gse(e,t){if(e==="change")return t}var rz=!1;if(Pl){var Q1;if(Pl){var Z1="oninput"in document;if(!Z1){var lM=document.createElement("div");lM.setAttribute("oninput","return;"),Z1=typeof lM.oninput=="function"}Q1=Z1}else Q1=!1;rz=Q1&&(!document.documentMode||9<document.documentMode)}function cM(){eg&&(eg.detachEvent("onpropertychange",nz),Cg=eg=null)}function nz(e){if(e.propertyName==="value"&&Ew(Cg)){var t=[];tz(t,Cg,e,RP(e)),RU(pse,t)}}function xse(e,t,r){e==="focusin"?(cM(),eg=t,Cg=r,eg.attachEvent("onpropertychange",nz)):e==="focusout"&&cM()}function vse(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ew(Cg)}function yse(e,t){if(e==="click")return Ew(t)}function bse(e,t){if(e==="input"||e==="change")return Ew(t)}function jse(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zi=typeof Object.is=="function"?Object.is:jse;function Tg(e,t){if(zi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var a=r[n];if(!Wk.call(t,a)||!zi(e[a],t[a]))return!1}return!0}function dM(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uM(e,t){var r=dM(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dM(r)}}function sz(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sz(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function az(){for(var e=window,t=Zb();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Zb(e.document)}return t}function HP(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 wse(e){var t=az(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&sz(r.ownerDocument.documentElement,r)){if(n!==null&&HP(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=uM(r,i);var o=uM(r,n);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Nse=Pl&&"documentMode"in document&&11>=document.documentMode,df=null,lC=null,tg=null,cC=!1;function fM(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;
vendor: 4,139 bytes, line 37
37cC||df==null||df!==Zb(n)||(n=df,"selectionStart"in n&&HP(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),tg&&Tg(tg,n)||(tg=n,n=s0(lC,"onSelect"),0<n.length&&(t=new zP("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=df)))}function jy(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var uf={animationend:jy("Animation","AnimationEnd"),animationiteration:jy("Animation","AnimationIteration"),animationstart:jy("Animation","AnimationStart"),transitionend:jy("Transition","TransitionEnd")},X1={},iz={};Pl&&(iz=document.createElement("div").style,"AnimationEvent"in window||(delete uf.animationend.animation,delete uf.animationiteration.animation,delete uf.animationstart.animation),"TransitionEvent"in window||delete uf.transitionend.transition);function Ow(e){if(X1[e])return X1[e];if(!uf[e])return e;var t=uf[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in iz)return X1[e]=t[r];return e}var oz=Ow("animationend"),lz=Ow("animationiteration"),cz=Ow("animationstart"),dz=Ow("transitionend"),uz=new Map,hM="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 ad(e,t){uz.set(e,t),Au(t,[e])}for(var J1=0;J1<hM.length;J1++){var eS=hM[J1],Sse=eS.toLowerCase(),kse=eS[0].toUpperCase()+eS.slice(1);ad(Sse,"on"+kse)}ad(oz,"onAnimationEnd");ad(lz,"onAnimationIteration");ad(cz,"onAnimationStart");ad("dblclick","onDoubleClick");ad("focusin","onFocus");ad("focusout","onBlur");ad(dz,"onTransitionEnd");dh("onMouseEnter",["mouseout","mouseover"]);dh("onMouseLeave",["mouseout","mouseover"]);dh("onPointerEnter",["pointerout","pointerover"]);dh("onPointerLeave",["pointerout","pointerover"]);Au("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Au("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Au("onBeforeInput",["compositionend","keypress","textInput","paste"]);Au("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Au("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Au("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Up="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(" "),Cse=new Set("cancel close invalid load scroll toggle".split(" ").concat(Up));function mM(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Sne(n,t,void 0,e),e.currentTarget=null}function fz(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var o=n.length-1;0<=o;o--){var l=n[o],c=l.instance,d=l.currentTarget;if(l=l.listener,c!==i&&a.isPropagationStopped())break e;mM(a,l,d),i=c}else for(o=0;o<n.length;o++){if(l=n[o],c=l.instance,d=l.currentTarget,l=l.listener,c!==i&&a.isPropagationStopped())break e;mM(a,l,d),i=c}}}if(Jb)throw e=sC,Jb=!1,sC=null,e}function Gr(e,t){var r=t[mC];r===void 0&&(r=t[mC]=new Set);var n=e+"__bubble";r.has(n)||(hz(t,e,2,!1),r.add(n))}function tS(e,t,r){var n=0;t&&(n|=4),hz(r,e,n,t)}var wy="_reactListening"+Math.random().toString(36).slice(2);function _g(e){if(!e[wy]){e[wy]=!0,bU.forEach(function(r){r!=="selectionchange"&&(Cse.has(r)||t
vendor: 6,038 bytes, lines 37-38
37S(r,!1,e),tS(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wy]||(t[wy]=!0,tS("selectionchange",!1,t))}}function hz(e,t,r,n){switch(QU(t)){case 1:var a=Bne;break;case 4:a=Une;break;default:a=BP}r=a.bind(null,t,r,e),a=void 0,!nC||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function rS(e,t,r,n,a){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;if(l===a||l.nodeType===8&&l.parentNode===a)break;if(o===4)for(o=n.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;o=o.return}for(;l!==null;){if(o=Od(l),o===null)return;if(c=o.tag,c===5||c===6){n=i=o;continue e}l=l.parentNode}}n=n.return}RU(function(){var d=i,u=RP(r),f=[];e:{var h=uz.get(e);if(h!==void 0){var m=zP,g=e;switch(e){case"keypress":if(yb(r)===0)break e;case"keydown":case"keyup":m=rse;break;case"focusin":g="focus",m=K1;break;case"focusout":g="blur",m=K1;break;case"beforeblur":case"afterblur":m=K1;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=rM;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Vne;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=ase;break;case oz:case lz:case cz:m=Yne;break;case dz:m=ose;break;case"scroll":m=zne;break;case"wheel":m=cse;break;case"copy":case"cut":case"paste":m=Kne;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=sM}var x=(t&4)!==0,v=!x&&e==="scroll",b=x?h!==null?h+"Capture":null:h;x=[];for(var y=d,j;y!==null;){j=y;var w=j.stateNode;if(j.tag===5&&w!==null&&(j=w,b!==null&&(w=wg(y,b),w!=null&&x.push(Pg(y,w,j)))),v)break;y=y.return}0<x.length&&(h=new m(h,g,null,r,u),f.push({event:h,listeners:x}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&r!==tC&&(g=r.relatedTarget||r.fromElement)&&(Od(g)||g[El]))break e;if((m||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,m?(g=r.relatedTarget||r.toElement,m=d,g=g?Od(g):null,g!==null&&(v=Du(g),g!==v||g.tag!==5&&g.tag!==6)&&(g=null)):(m=null,g=d),m!==g)){if(x=rM,w="onMouseLeave",b="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(x=sM,w="onPointerLeave",b="onPointerEnter",y="pointer"),v=m==null?h:ff(m),j=g==null?h:ff(g),h=new x(w,y+"leave",m,r,u),h.target=v,h.relatedTarget=j,w=null,Od(u)===d&&(x=new x(b,y+"enter",g,r,u),x.target=j,x.relatedTarget=v,w=x),v=w,m&&g)t:{for(x=m,b=g,y=0,j=x;j;j=Hu(j))y++;for(j=0,w=b;w;w=Hu(w))j++;for(;0<y-j;)x=Hu(x),y--;for(;0<j-y;)b=Hu(b),j--;for(;y--;){if(x===b||b!==null&&x===b.alternate)break t;x=Hu(x),b=Hu(b)}x=null}else x=null;m!==null&&pM(f,h,m,x,!1),g!==null&&v!==null&&pM(f,v,g,x,!0)}}e:{if(h=d?ff(d):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var N=gse;else if(oM(h))if(rz)N=bse;else{N=vse;var S=xse}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(N=yse);if(N&&(N=N(e,d))){tz(f,N,r,u);break e}S&&S(e,h,d),e==="focusout"&&(S=h._wrapperState)&&S.controlled&&h.type==="number"&&Qk(h,"number",h.value)}switch(S=d?ff(d):window,e){case"focusin":(oM(S)||S.contentEditable==="true")&&(df=S,lC=d,tg=null);break;case"focusout":tg=lC=df=null;break;case"mousedown":cC=!0;break;case"contextmenu":case"mouseup":case"dragend":cC=!1,fM(f,r,u);break;case"selectionchange":if(Nse)break;case"keydown":case"keyup":fM(f,r,u)}var k;if(VP)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else cf?JU(e,r)&&(T="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(XU&&r.locale!=="ko"&&(cf||T!=="onCompositionStart"?T==="onCompositionEnd"&&cf&&(k=ZU()):(Cc=u,UP="value"in Cc?Cc.value:Cc.textContent,cf=!0)),S=s0(d,T),0<S.length&&(T=new nM(T,e,null,r,u),f.push({event:T,listeners:S}),k?T.data=k:(k=ez(r),k!==null&&(T.data=k)))),(k=use?fse(e,r):hse(e,r))&&(d=s0(d,"onBeforeInput"),0<d.length&&(u=new nM("onBeforeInput","beforeinput",null,r,u),f.push({event:u,listeners:d}),u.data=k))}fz(f,t)})}function Pg(e,t,r){return{instance:e,listener:t,currentTarget:r}}function s0(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=wg(e,r),i!=null&&n.unshift(Pg(e,i,a)),i=wg(e,t),i!=null&&n.push(Pg(e,i,a))),e=e.return}return n}function Hu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pM(e,t,r,n,a){for(var i=t._reactName,o=[];r!==null&&r!==n;){var l=r,c=l.alternate,d=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&d!==null&&(l=d,a?(c=wg(r,i),c!=null&&o.unshift(Pg(r,c,l))):a||(c=wg(r,i),c!=null&&o.push(Pg(r,c,l)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var Tse=/\r\n?/g,_se=/\u0000|\uFFFD/g;function gM(e){return(typeof e=="string"?e:""+e).replace(Tse,` 38`).replace(_se,"")}function Ny(e,t,r){if(t=gM(t),gM(e)!==t&&r)throw Error(De(425))}function a0(){}var dC=null,uC=null;function fC(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 hC=typeof setTimeout=="function"?setTimeout:void 0,Pse=typeof clearTimeout=="function"?clearTimeout:void 0,xM=typeof Promise=="function"?Promise:void 0,Ese=typeof queueMicrotask=="function"?queueMicrotask:typeof xM<"u"?function(e){return xM.resolve(null).then(e).catch(Ose)}:hC;function Ose(e){setTimeout(function(){throw e})}function nS(e,t){var r=t,n=0;
vendor: 4,839 bytes, line 38
38do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(n===0){e.removeChild(a),kg(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=a}while(r);kg(t)}function Mc(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 vM(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var mm=Math.random().toString(36).slice(2),fo="__reactFiber$"+mm,Eg="__reactProps$"+mm,El="__reactContainer$"+mm,mC="__reactEvents$"+mm,Ase="__reactListeners$"+mm,Dse="__reactHandles$"+mm;function Od(e){var t=e[fo];if(t)return t;for(var r=e.parentNode;r;){if(t=r[El]||r[fo]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=vM(e);e!==null;){if(r=e[fo])return r;e=vM(e)}return t}e=r,r=e.parentNode}return null}function lv(e){return e=e[fo]||e[El],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ff(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(De(33))}function Aw(e){return e[Eg]||null}var pC=[],hf=-1;function id(e){return{current:e}}function Xr(e){0>hf||(e.current=pC[hf],pC[hf]=null,hf--)}function Wr(e,t){hf++,pC[hf]=e.current,e.current=t}var Hc={},Os=id(Hc),xa=id(!1),lu=Hc;function uh(e,t){var r=e.type.contextTypes;if(!r)return Hc;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function va(e){return e=e.childContextTypes,e!=null}function i0(){Xr(xa),Xr(Os)}function yM(e,t,r){if(Os.current!==Hc)throw Error(De(168));Wr(Os,t),Wr(xa,r)}function mz(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(De(108,xne(e)||"Unknown",a));return pn({},r,n)}function o0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hc,lu=Os.current,Wr(Os,e),Wr(xa,xa.current),!0}function bM(e,t,r){var n=e.stateNode;if(!n)throw Error(De(169));r?(e=mz(e,t,lu),n.__reactInternalMemoizedMergedChildContext=e,Xr(xa),Xr(Os),Wr(Os,e)):Xr(xa),Wr(xa,r)}var il=null,Dw=!1,sS=!1;function pz(e){il===null?il=[e]:il.push(e)}function Mse(e){Dw=!0,pz(e)}function od(){if(!sS&&il!==null){sS=!0;var e=0,t=Er;try{var r=il;for(Er=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}il=null,Dw=!1}catch(a){throw il!==null&&(il=il.slice(e+1)),BU($P,od),a}finally{Er=t,sS=!1}}return null}var mf=[],pf=0,l0=null,c0=0,ti=[],ri=0,cu=null,ll=1,cl="";function wd(e,t){mf[pf++]=c0,mf[pf++]=l0,l0=e,c0=t}function gz(e,t,r){ti[ri++]=ll,ti[ri++]=cl,ti[ri++]=cu,cu=e;var n=ll;e=cl;var a=32-Ri(n)-1;n&=~(1<<a),r+=1;var i=32-Ri(t)+a;if(30<i){var o=a-a%5;i=(n&(1<<o)-1).toString(32),n>>=o,a-=o,ll=1<<32-Ri(t)+a|r<<a|n,cl=i+e}else ll=1<<i|r<<a|n,cl=e}function qP(e){e.return!==null&&(wd(e,1),gz(e,1,0))}function YP(e){for(;e===l0;)l0=mf[--pf],mf[pf]=null,c0=mf[--pf],mf[pf]=null;for(;e===cu;)cu=ti[--ri],ti[ri]=null,cl=ti[--ri],ti[ri]=null,ll=ti[--ri],ti[ri]=null}var Ia=null,Ma=null,rn=!1,Ti=null;function xz(e,t){var r=ai(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function jM(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ia=e,Ma=Mc(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ia=e,Ma=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=cu!==null?{id:ll,overflow:cl}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ai(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ia=e,Ma=null,!0):!1;default:return!1}}function gC(e){return(e.mode&1)!==0&&(e.flags&128)===0}function xC(e){if(rn){var t=Ma;if(t){var r=t;if(!jM(e,t)){if(gC(e))throw Error(De(418));t=Mc(r.nextSibling);var n=Ia;t&&jM(e,t)?xz(n,r):(e.flags=e.flags&-4097|2,rn=!1,Ia=e)}}else{if(gC(e))throw Error(De(418));e.flags=e.flags&-4097|2,rn=!1,Ia=e}}}function wM(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ia=e}function Sy(e){if(e!==Ia)return!1;if(!rn)return wM(e),rn=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!fC(e.type,e.memoizedProps)),t&&(t=Ma)){if(gC(e))throw vz(),Error(De(418));for(;t;)xz(e,t),t=Mc(t.nextSibling)}if(wM(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(De(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Ma=Mc(e.nextSibling);break e}t--}
vendor: 17,264 bytes, line 38
38else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Ma=null}}else Ma=Ia?Mc(e.stateNode.nextSibling):null;return!0}function vz(){for(var e=Ma;e;)e=Mc(e.nextSibling)}function fh(){Ma=Ia=null,rn=!1}function GP(e){Ti===null?Ti=[e]:Ti.push(e)}var Ise=zl.ReactCurrentBatchConfig;function np(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(De(309));var n=r.stateNode}if(!n)throw Error(De(147,e));var a=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=a.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(De(284));if(!r._owner)throw Error(De(290,e))}return e}function ky(e,t){throw e=Object.prototype.toString.call(t),Error(De(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function NM(e){var t=e._init;return t(e._payload)}function yz(e){function t(b,y){if(e){var j=b.deletions;j===null?(b.deletions=[y],b.flags|=16):j.push(y)}}function r(b,y){if(!e)return null;for(;y!==null;)t(b,y),y=y.sibling;return null}function n(b,y){for(b=new Map;y!==null;)y.key!==null?b.set(y.key,y):b.set(y.index,y),y=y.sibling;return b}function a(b,y){return b=Lc(b,y),b.index=0,b.sibling=null,b}function i(b,y,j){return b.index=j,e?(j=b.alternate,j!==null?(j=j.index,j<y?(b.flags|=2,y):j):(b.flags|=2,y)):(b.flags|=1048576,y)}function o(b){return e&&b.alternate===null&&(b.flags|=2),b}function l(b,y,j,w){return y===null||y.tag!==6?(y=uS(j,b.mode,w),y.return=b,y):(y=a(y,j),y.return=b,y)}function c(b,y,j,w){var N=j.type;return N===lf?u(b,y,j.props.children,w,j.key):y!==null&&(y.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===lc&&NM(N)===y.type)?(w=a(y,j.props),w.ref=np(b,y,j),w.return=b,w):(w=Cb(j.type,j.key,j.props,null,b.mode,w),w.ref=np(b,y,j),w.return=b,w)}function d(b,y,j,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==j.containerInfo||y.stateNode.implementation!==j.implementation?(y=fS(j,b.mode,w),y.return=b,y):(y=a(y,j.children||[]),y.return=b,y)}function u(b,y,j,w,N){return y===null||y.tag!==7?(y=Qd(j,b.mode,w,N),y.return=b,y):(y=a(y,j),y.return=b,y)}function f(b,y,j){if(typeof y=="string"&&y!==""||typeof y=="number")return y=uS(""+y,b.mode,j),y.return=b,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case my:return j=Cb(y.type,y.key,y.props,null,b.mode,j),j.ref=np(b,null,y),j.return=b,j;case of:return y=fS(y,b.mode,j),y.return=b,y;case lc:var w=y._init;return f(b,w(y._payload),j)}if(Fp(y)||Xm(y))return y=Qd(y,b.mode,j,null),y.return=b,y;ky(b,y)}return null}function h(b,y,j,w){var N=y!==null?y.key:null;if(typeof j=="string"&&j!==""||typeof j=="number")return N!==null?null:l(b,y,""+j,w);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case my:return j.key===N?c(b,y,j,w):null;case of:return j.key===N?d(b,y,j,w):null;case lc:return N=j._init,h(b,y,N(j._payload),w)}if(Fp(j)||Xm(j))return N!==null?null:u(b,y,j,w,null);ky(b,j)}return null}function m(b,y,j,w,N){if(typeof w=="string"&&w!==""||typeof w=="number")return b=b.get(j)||null,l(y,b,""+w,N);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case my:return b=b.get(w.key===null?j:w.key)||null,c(y,b,w,N);case of:return b=b.get(w.key===null?j:w.key)||null,d(y,b,w,N);case lc:var S=w._init;return m(b,y,j,S(w._payload),N)}if(Fp(w)||Xm(w))return b=b.get(j)||null,u(y,b,w,N,null);ky(y,w)}return null}function g(b,y,j,w){for(var N=null,S=null,k=y,T=y=0,C=null;k!==null&&T<j.length;T++){k.index>T?(C=k,k=null):C=k.sibling;var E=h(b,k,j[T],w);if(E===null){k===null&&(k=C);break}e&&k&&E.alternate===null&&t(b,k),y=i(E,y,T),S===null?N=E:S.sibling=E,S=E,k=C}if(T===j.length)return r(b,k),rn&&wd(b,T),N;if(k===null){for(;T<j.length;T++)k=f(b,j[T],w),k!==null&&(y=i(k,y,T),S===null?N=k:S.sibling=k,S=k);return rn&&wd(b,T),N}for(k=n(b,k);T<j.length;T++)C=m(k,b,T,j[T],w),C!==null&&(e&&C.alternate!==null&&k.delete(C.key===null?T:C.key),y=i(C,y,T),S===null?N=C:S.sibling=C,S=C);return e&&k.forEach(function(P){return t(b,P)}),rn&&wd(b,T),N}function x(b,y,j,w){var N=Xm(j);if(typeof N!="function")throw Error(De(150));if(j=N.call(j),j==null)throw Error(De(151));for(var S=N=null,k=y,T=y=0,C=null,E=j.next();k!==null&&!E.done;T++,E=j.next()){k.index>T?(C=k,k=null):C=k.sibling;var P=h(b,k,E.value,w);if(P===null){k===null&&(k=C);break}e&&k&&P.alternate===null&&t(b,k),y=i(P,y,T),S===null?N=P:S.sibling=P,S=P,k=C}if(E.done)return r(b,k),rn&&wd(b,T),N;if(k===null){for(;!E.done;T++,E=j.next())E=f(b,E.value,w),E!==null&&(y=i(E,y,T),S===null?N=E:S.sibling=E,S=E);return rn&&wd(b,T),N}for(k=n(b,k);!E.done;T++,E=j.next())E=m(k,b,T,E.value,w),E!==null&&(e&&E.alternate!==null&&k.delete(E.key===null?T:E.key),y=i(E,y,T),S===null?N=E:S.sibling=E,S=E);return e&&k.forEach(function(_){return t(b,_)}),rn&&wd(b,T),N}function v(b,y,j,w){if(typeof j=="object"&&j!==null&&j.type===lf&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case my:e:{for(var N=j.key,S=y;S!==null;){if(S.key===N){if(N=j.type,N===lf){if(S.tag===7){r(b,S.sibling),y=a(S,j.props.children),y.return=b,b=y;break e}}else if(S.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===lc&&NM(N)===S.type){r(b,S.sibling),y=a(S,j.props),y.ref=np(b,S,j),y.return=b,b=y;break e}r(b,S);break}else t(b,S);S=S.sibling}j.type===lf?(y=Qd(j.props.children,b.mode,w,j.key),y.return=b,b=y):(w=Cb(j.type,j.key,j.props,null,b.mode,w),w.ref=np(b,y,j),w.return=b,b=w)}return o(b);case of:e:{for(S=j.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===j.containerInfo&&y.stateNode.implementation===j.implementation){r(b,y.sibling),y=a(y,j.children||[]),y.return=b,b=y;break e}else{r(b,y);break}else t(b,y);y=y.sibling}y=fS(j,b.mode,w),y.return=b,b=y}return o(b);case lc:return S=j._init,v(b,y,S(j._payload),w)}if(Fp(j))return g(b,y,j,w);if(Xm(j))return x(b,y,j,w);ky(b,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,y!==null&&y.tag===6?(r(b,y.sibling),y=a(y,j),y.return=b,b=y):(r(b,y),y=uS(j,b.mode,w),y.return=b,b=y),o(b)):r(b,y)}return v}var hh=yz(!0),bz=yz(!1),d0=id(null),u0=null,gf=null,KP=null;function QP(){KP=gf=u0=null}function ZP(e){var t=d0.current;Xr(d0),e._currentValue=t}function vC(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Mf(e,t){u0=e,KP=gf=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ha=!0),e.firstContext=null)}function di(e){var t=e._currentValue;if(KP!==e)if(e={context:e,memoizedValue:t,next:null},gf===null){if(u0===null)throw Error(De(308));gf=e,u0.dependencies={lanes:0,firstContext:e}}else gf=gf.next=e;return t}var Ad=null;function XP(e){Ad===null?Ad=[e]:Ad.push(e)}function jz(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,XP(t)):(r.next=a.next,a.next=r),t.interleaved=r,Ol(e,n)}function Ol(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var cc=!1;function JP(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wz(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 gl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ic(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,pr&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,Ol(e,r)}return a=n.interleaved,a===null?(t.next=t,XP(n)):(t.next=a.next,a.next=t),n.interleaved=t,Ol(e,r)}function bb(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,LP(e,r)}}function SM(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?a=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function f0(e,t,r,n){var a=e.updateQueue;cc=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,l=a.shared.pending;if(l!==null){a.shared.pending=null;var c=l,d=c.next;c.next=null,o===null?i=d:o.next=d,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==o&&(l===null?u.firstBaseUpdate=d:l.next=d,u.lastBaseUpdate=c))}if(i!==null){var f=a.baseState;o=0,u=d=c=null,l=i;do{var h=l.lane,m=l.eventTime;if((n&h)===h){u!==null&&(u=u.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,x=l;switch(h=t,m=r,x.tag){case 1:if(g=x.payload,typeof g=="function"){f=g.call(m,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=x.payload,h=typeof g=="function"?g.call(m,f,h):g,h==null)break e;f=pn({},f,h);break e;case 2:cc=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=a.effects,h===null?a.effects=[l]:h.push(l))}else m={eventTime:m,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(d=u=m,c=f):u=u.next=m,o|=h;if(l=l.next,l===null){if(l=a.shared.pending,l===null)break;h=l,l=h.next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}}while(!0);if(u===null&&(c=f),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=u,t=a.shared.interleaved,t!==null){a=t;do o|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);uu|=o,e.lanes=o,e.memoizedState=f}}function kM(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],a=n.callback;if(a!==null){if(n.callback=null,n=r,typeof a!="function")throw Error(De(191,a));a.call(n)}}}var cv={},Po=id(cv),Og=id(cv),Ag=id(cv);function Dd(e){if(e===cv)throw Error(De(174));return e}function eE(e,t){switch(Wr(Ag,t),Wr(Og,e),Wr(Po,cv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Xk(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Xk(t,e)}Xr(Po),Wr(Po,t)}function mh(){Xr(Po),Xr(Og),Xr(Ag)}function Nz(e){Dd(Ag.current);var t=Dd(Po.current),r=Xk(t,e.type);t!==r&&(Wr(Og,e),Wr(Po,r))}function tE(e){Og.current===e&&(Xr(Po),Xr(Og))}var dn=id(0);function h0(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 aS=[];function rE(){for(var e=0;e<aS.length;e++)aS[e]._workInProgressVersionPrimary=null;aS.length=0}var jb=zl.ReactCurrentDispatcher,iS=zl.ReactCurrentBatchConfig,du=0,mn=null,qn=null,rs=null,m0=!1,rg=!1,Dg=0,Rse=0;function bs(){throw Error(De(321))}function nE(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!zi(e[r],t[r]))return!1;return!0}function sE(e,t,r,n,a,i){if(du=i,mn=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,jb.current=e===null||e.memoizedState===null?Bse:Use,e=r(n,a),rg){i=0;do{if(rg=!1,Dg=0,25<=i)throw Error(De(301));i+=1,rs=qn=null,t.updateQueue=null,jb.current=zse,e=r(n,a)}while(rg)}if(jb.current=p0,t=qn!==null&&qn.next!==null,du=0,rs=qn=mn=null,m0=!1,t)throw Error(De(300));return e}function aE(){var e=Dg!==0;return Dg=0,e}function ro(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rs===null?mn.memoizedState=rs=e:rs=rs.next=e,rs}function ui(){if(qn===null){var e=mn.alternate;e=e!==null?e.memoizedState:null}else e=qn.next;var t=rs===null?mn.memoizedState:rs.next;if(t!==null)rs=t,qn=e;else{if(e===null)throw Error(De(310));qn=e,e={memoizedState:qn.memoizedState,baseState:qn.baseState,baseQueue:qn.baseQueue,queue:qn.queue,next:null},rs===null?mn.memoizedState=rs=e:rs=rs.next=e}return rs}function Mg(e,t){return typeof t=="function"?t(e):t}function oS(e){var t=ui(),r=t.queue;if(r===null)throw Error(De(311));r.lastRenderedReducer=e;var n=qn,a=n.baseQueue,i=r.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}n.baseQueue=a=i,r.pending=null}if(a!==null){i=a.next,n=n.baseState;var l=o=null,c=null,d=i;do{var u=d.lane;if((du&u)===u)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var f={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(l=c=f,o=n):c=c.next=f,mn.lanes|=u,uu|=u}d=d.next}while(d!==null&&d!==i);c===null?o=n:c.next=l,zi(n,t.memoizedState)||(ha=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){a=e;do i=a.lane,mn.lanes|=i,uu|=i,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function lS(e){var t=ui(),r=t.queue;if(r===null)throw Error(De(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,i=t.memoizedState;if(a!==null){r.pending=null;var o=a=a.next;do i=e(i,o.action),o=o.next;while(o!==a);zi(i,t.memoizedState)||(ha=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function Sz(){}function kz(e,t){var r=mn,n=ui(),a=t(),i=!zi(n.memoizedState,a);if(i&&(n.memoizedState=a,ha=!0),n=n.queue,iE(_z.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||rs!==null&&rs.memoizedState.tag&1){if(r.flags|=2048,Ig(9,Tz.bind(null,r,n,a,t),void 0,null),ss===null)throw Error(De(349));du&30||Cz(r,t,a)}return a}function Cz(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=mn.updateQueue,t===null?(t={lastEffect:null,stores:null},mn.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Tz(e,t,r,n){t.value=r,t.getSnapshot=n,Pz(t)&&Ez(e)}function _z(e,t,r){return r(function(){Pz(t)&&Ez(e)})}function Pz(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!zi(e,r)}catch{return!0}}function Ez(e){var t=Ol(e,1);t!==null&&$i(t,e,1,-1)}function CM(e){var t=ro();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Mg,lastRenderedState:e},t.queue=e,e=e.dispatch=Fse.bind(null,mn,e),[t.memoizedState,e]}function Ig(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=mn.updateQueue,t===null?(t={lastEffect:null,stores:null},mn.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function Oz(){return ui().memoizedState}function wb(e,t,r,n){var a=ro();mn.flags|=e,a.memoizedState=Ig(1|t,r,void 0,n===void 0?null:n)}function Mw(e,t,r,n){var a=ui();n=n===void 0?null:n;var i=void 0;if(qn!==null){var o=qn.memoizedState;if(i=o.destroy,n!==null&&nE(n,o.deps)){a.memoizedState=Ig(t,r,i,n);return}}mn.flags|=e,a.memoizedState=Ig(1|t,r,i,n)}function TM(e,t){return wb(8390656,8,e,t)}function iE(e,t){return Mw(2048,8,e,t)}function Az(e,t){return Mw(4,2,e,t)}function Dz(e,t){return Mw(4,4,e,t)}function Mz(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 Iz(e,t,r){return r=r!=null?r.concat([e]):null,Mw(4,4,Mz.bind(null,t,e),r)}function oE(){}function Rz(e,t){var r=ui();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&nE(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function $z(e,t){var r=ui();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&nE(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Lz(e,t,r){return du&21?(zi(r,t)||(r=WU(),mn.lanes|=r,uu|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ha=!0),e.memoizedState=r)}function $se(e,t){var r=Er;Er=r!==0&&4>r?r:4,e(!0);var n=iS.transition;iS.transition={};try{e(!1),t()}finally{Er=r,iS.transition=n}}function Fz(){return ui().memoizedState}function Lse(e,t,r){var n=$c(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Bz(e))Uz(t,r);else if(r=jz(e,t,r,n),r!==null){var a=Js();$i(r,e,n,a),zz(r,t,n)}}function Fse(e,t,r){var n=$c(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Bz(e))Uz(t,a);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,r);if(a.hasEagerState=!0,a.eagerState=l,zi(l,o)){var c=t.interleaved;c===null?(a.next=a,XP(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}r=jz(e,t,a,n),r!==null&&(a=Js(),$i(r,e,n,a),zz(r,t,n))}}function Bz(e){var t=e.alternate;return e===mn||t!==null&&t===mn}function Uz(e,t){rg=m0=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function zz(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,LP(e,r)}}var p0={readContext:di,useCallback:bs,useContext:bs,useEffect:bs,useImperativeHandle:bs,useInsertionEffect:bs,useLayoutEffect:bs,useMemo:bs,useReducer:bs,useRef
vendor: 1,902 bytes, line 38
38:bs,useState:bs,useDebugValue:bs,useDeferredValue:bs,useTransition:bs,useMutableSource:bs,useSyncExternalStore:bs,useId:bs,unstable_isNewReconciler:!1},Bse={readContext:di,useCallback:function(e,t){return ro().memoizedState=[e,t===void 0?null:t],e},useContext:di,useEffect:TM,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,wb(4194308,4,Mz.bind(null,t,e),r)},useLayoutEffect:function(e,t){return wb(4194308,4,e,t)},useInsertionEffect:function(e,t){return wb(4,2,e,t)},useMemo:function(e,t){var r=ro();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ro();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Lse.bind(null,mn,e),[n.memoizedState,e]},useRef:function(e){var t=ro();return e={current:e},t.memoizedState=e},useState:CM,useDebugValue:oE,useDeferredValue:function(e){return ro().memoizedState=e},useTransition:function(){var e=CM(!1),t=e[0];return e=$se.bind(null,e[1]),ro().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=mn,a=ro();if(rn){if(r===void 0)throw Error(De(407));r=r()}else{if(r=t(),ss===null)throw Error(De(349));du&30||Cz(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,TM(_z.bind(null,n,i,e),[e]),n.flags|=2048,Ig(9,Tz.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=ro(),t=ss.identifierPrefix;if(rn){var r=cl,n=ll;r=(n&~(1<<32-Ri(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Dg++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Rse++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Use={readContext:di,useCallback:Rz,useContext:di,useEffect:iE,useImperativeHandle:Iz,useInsertionEffect:Az,useLayoutEffect:Dz,useMemo:$z,useReducer:oS,useRef:Oz,useState:function(){return oS(Mg)}
vendor: 6,379 bytes, lines 38-40
38,useDebugValue:oE,useDeferredValue:function(e){var t=ui();return Lz(t,qn.memoizedState,e)},useTransition:function(){var e=oS(Mg)[0],t=ui().memoizedState;return[e,t]},useMutableSource:Sz,useSyncExternalStore:kz,useId:Fz,unstable_isNewReconciler:!1},zse={readContext:di,useCallback:Rz,useContext:di,useEffect:iE,useImperativeHandle:Iz,useInsertionEffect:Az,useLayoutEffect:Dz,useMemo:$z,useReducer:lS,useRef:Oz,useState:function(){return lS(Mg)},useDebugValue:oE,useDeferredValue:function(e){var t=ui();return qn===null?t.memoizedState=e:Lz(t,qn.memoizedState,e)},useTransition:function(){var e=lS(Mg)[0],t=ui().memoizedState;return[e,t]},useMutableSource:Sz,useSyncExternalStore:kz,useId:Fz,unstable_isNewReconciler:!1};function ji(e,t){if(e&&e.defaultProps){t=pn({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function yC(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:pn({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Iw={isMounted:function(e){return(e=e._reactInternals)?Du(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Js(),a=$c(e),i=gl(n,a);i.payload=t,r!=null&&(i.callback=r),t=Ic(e,i,a),t!==null&&($i(t,e,a,n),bb(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Js(),a=$c(e),i=gl(n,a);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Ic(e,i,a),t!==null&&($i(t,e,a,n),bb(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Js(),n=$c(e),a=gl(r,n);a.tag=2,t!=null&&(a.callback=t),t=Ic(e,a,n),t!==null&&($i(t,e,n,r),bb(t,e,n))}};function _M(e,t,r,n,a,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,o):t.prototype&&t.prototype.isPureReactComponent?!Tg(r,n)||!Tg(a,i):!0}function Wz(e,t,r){var n=!1,a=Hc,i=t.contextType;return typeof i=="object"&&i!==null?i=di(i):(a=va(t)?lu:Os.current,n=t.contextTypes,i=(n=n!=null)?uh(e,a):Hc),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Iw,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function PM(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Iw.enqueueReplaceState(t,t.state,null)}function bC(e,t,r,n){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},JP(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=di(i):(i=va(t)?lu:Os.current,a.context=uh(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(yC(e,t,i,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Iw.enqueueReplaceState(a,a.state,null),f0(e,r,a,n),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function ph(e,t){try{var r="",n=t;do r+=gne(n),n=n.return;while(n);var a=r}catch(i){a=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:e,source:t,stack:a,digest:null}}function cS(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function jC(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Wse=typeof WeakMap=="function"?WeakMap:Map;function Vz(e,t,r){r=gl(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){x0||(x0=!0,OC=n),jC(e,t)},r}function Hz(e,t,r){r=gl(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var a=t.value;r.payload=function(){return n(a)},r.callback=function(){jC(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){jC(e,t),typeof n!="function"&&(Rc===null?Rc=new Set([this]):Rc.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function EM(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Wse;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(a.add(r),e=nae.bind(null,e,t,r),t.then(e,e))}function OM(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 AM(e,t,r,n,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=gl(-1,1),t.tag=2,Ic(r,t,1))),r.lanes|=1),e)}var Vse=zl.ReactCurrentOwner,ha=!1;function Us(e,t,r,n){t.child=e===null?bz(t,null,r,n):hh(t,e.child,r,n)}function DM(e,t,r,n,a){r=r.render;var i=t.ref;return Mf(t,a),n=sE(e,t,r,n,i,a),r=aE(),e!==null&&!ha?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Al(e,t,a)):(rn&&r&&qP(t),t.flags|=1,Us(e,t,n,a),t.child)}function MM(e,t,r,n,a){if(e===null){var i=r.type;return typeof i=="function"&&!pE(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,qz(e,t,i,n,a)):(e=Cb(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Tg,r(o,n)&&e.ref===t.ref)return Al(e,t,a)}return t.flags|=1,e=Lc(i,n),e.ref=t.ref,e.return=t,t.child=e}function qz(e,t,r,n,a){if(e!==null){var i=e.memoizedProps;if(Tg(i,n)&&e.ref===t.ref)if(ha=!1,t.pendingProps=n=i,(e.lanes&a)!==0)e.flags&131072&&(ha=!0);else return t.lanes=e.lanes,Al(e,t,a)}return wC(e,t,r,n,a)}function Yz(e,t,r){var n=t.pendingProps,a=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wr(vf,Ca),Ca|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Wr(vf,Ca),Ca|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Wr(vf,Ca),Ca|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Wr(vf,Ca),Ca|=n;return Us(e,t,a,r),t.child}function Gz(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 4,713 bytes, line 40
40function wC(e,t,r,n,a){var i=va(r)?lu:Os.current;return i=uh(t,i),Mf(t,a),r=sE(e,t,r,n,i,a),n=aE(),e!==null&&!ha?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,Al(e,t,a)):(rn&&n&&qP(t),t.flags|=1,Us(e,t,r,a),t.child)}function IM(e,t,r,n,a){if(va(r)){var i=!0;o0(t)}else i=!1;if(Mf(t,a),t.stateNode===null)Nb(e,t),Wz(t,r,n),bC(t,r,n,a),n=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,d=r.contextType;typeof d=="object"&&d!==null?d=di(d):(d=va(r)?lu:Os.current,d=uh(t,d));var u=r.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||c!==d)&&PM(t,o,n,d),cc=!1;var h=t.memoizedState;o.state=h,f0(t,n,o,a),c=t.memoizedState,l!==n||h!==c||xa.current||cc?(typeof u=="function"&&(yC(t,r,u,n),c=t.memoizedState),(l=cc||_M(t,r,l,n,h,c,d))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),o.props=n,o.state=c,o.context=d,n=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,wz(e,t),l=t.memoizedProps,d=t.type===t.elementType?l:ji(t.type,l),o.props=d,f=t.pendingProps,h=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=di(c):(c=va(r)?lu:Os.current,c=uh(t,c));var m=r.getDerivedStateFromProps;(u=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||h!==c)&&PM(t,o,n,c),cc=!1,h=t.memoizedState,o.state=h,f0(t,n,o,a);var g=t.memoizedState;l!==f||h!==g||xa.current||cc?(typeof m=="function"&&(yC(t,r,m,n),g=t.memoizedState),(d=cc||_M(t,r,d,n,h,g,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,g,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,g,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),o.props=n,o.state=g,o.context=c,n=d):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return NC(e,t,r,n,i,a)}function NC(e,t,r,n,a,i){Gz(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return a&&bM(t,r,!1),Al(e,t,i);n=t.stateNode,Vse.current=t;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=hh(t,e.child,null,i),t.child=hh(t,null,l,i)):Us(e,t,l,i),t.memoizedState=n.state,a&&bM(t,r,!0),t.child}function Kz(e){var t=e.stateNode;t.pendingContext?yM(e,t.pendingContext,t.pendingContext!==t.context):t.context&&yM(e,t.context,!1),eE(e,t.containerInfo)}function RM(e,t,r,n,a){return fh(),GP(a),t.flags|=256,Us(e,t,r,n),t.child}var SC={dehydrated:null,treeContext:null,retryLane:0};function kC(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qz(e,t,r){var n=t.pendingProps,a=dn.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(a&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Wr(dn,a&1),e===null)return xC(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=n.children,e=n.fallback,i?(n=t.mode,i=t.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Lw(o,n,0,null),e=Qd(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=kC(r),t.memoizedState=SC,e):lE(t,o));if(a=e.memoizedState,a!==null&&(l=a.dehydrated,l!==null))return Hse(e,t,o,n,l,a,r);if(i){i=n.fallback,o=t.mode,a=e.child,l=a.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&t.child!==a?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=Lc(a,c),n.subtreeFlags=a.subtreeFlags&14680064),l!==null?i=Lc(l,i):(i=Qd(i,o,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,o=e.child.memoizedState,o=o===null?kC(r):{base
vendor: 8,927 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~r,t.memoizedState=SC,n}return i=e.child,e=i.sibling,n=Lc(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function lE(e,t){return t=Lw({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cy(e,t,r,n){return n!==null&&GP(n),hh(t,e.child,null,r),e=lE(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Hse(e,t,r,n,a,i,o){if(r)return t.flags&256?(t.flags&=-257,n=cS(Error(De(422))),Cy(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,a=t.mode,n=Lw({mode:"visible",children:n.children},a,0,null),i=Qd(i,a,o,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&hh(t,e.child,null,o),t.child.memoizedState=kC(o),t.memoizedState=SC,i);if(!(t.mode&1))return Cy(e,t,o,null);if(a.data==="$!"){if(n=a.nextSibling&&a.nextSibling.dataset,n)var l=n.dgst;return n=l,i=Error(De(419)),n=cS(i,n,void 0),Cy(e,t,o,n)}if(l=(o&e.childLanes)!==0,ha||l){if(n=ss,n!==null){switch(o&-o){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(n.suspendedLanes|o)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,Ol(e,a),$i(n,e,a,-1))}return mE(),n=cS(Error(De(421))),Cy(e,t,o,n)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=sae.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,Ma=Mc(a.nextSibling),Ia=t,rn=!0,Ti=null,e!==null&&(ti[ri++]=ll,ti[ri++]=cl,ti[ri++]=cu,ll=e.id,cl=e.overflow,cu=t),t=lE(t,n.children),t.flags|=4096,t)}function $M(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),vC(e.return,t,r)}function dS(e,t,r,n,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=a)}function Zz(e,t,r){var n=t.pendingProps,a=n.revealOrder,i=n.tail;if(Us(e,t,n.children,r),n=dn.current,n&2)n=n&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&&$M(e,r,t);else if(e.tag===19)$M(e,r,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}n&=1}if(Wr(dn,n),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&h0(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),dS(t,!1,a,r,i);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&h0(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}dS(t,!0,r,null,i);break;case"together":dS(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Nb(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Al(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),uu|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(De(153));if(t.child!==null){for(e=t.child,r=Lc(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Lc(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function qse(e,t,r){switch(t.tag){case 3:Kz(t),fh();break;case 5:Nz(t);break;case 1:va(t.type)&&o0(t);break;case 4:eE(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,a=t.memoizedProps.value;Wr(d0,n._currentValue),n._currentValue=a;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Wr(dn,dn.current&1),t.flags|=128,null):r&t.child.childLanes?Qz(e,t,r):(Wr(dn,dn.current&1),e=Al(e,t,r),e!==null?e.sibling:null);Wr(dn,dn.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Zz(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Wr(dn,dn.current),n)break;return null;case 22:case 23:return t.lanes=0,Yz(e,t,r)}return Al(e,t,r)}var Xz,CC,Jz,e9;Xz=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};CC=function(){};Jz=function(e,t,r,n){var a=e.memoizedProps;if(a!==n){e=t.stateNode,Dd(Po.current);var i=null;switch(r){case"input":a=Gk(e,a),n=Gk(e,n),i=[];break;case"select":a=pn({},a,{value:void 0}),n=pn({},n,{value:void 0}),i=[];break;case"textarea":a=Zk(e,a),n=Zk(e,n),i=[];break;default:typeof a.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=a0)}Jk(r,n);var o;r=null;for(d in a)if(!n.hasOwnProperty(d)&&a.hasOwnProperty(d)&&a[d]!=null)if(d==="style"){var l=a[d];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(bg.hasOwnProperty(d)?i||(i=[]):(i=i||[]).push(d,null));for(d in n){var c=n[d];if(l=a!=null?a[d]:void 0,n.hasOwnProperty(d)&&c!==l&&(c!=null||l!=null))if(d==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(i||(i=[]),i.push(d,r)),r=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(bg.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&Gr("scroll",e),i||l===c||(i=[])):(i=i||[]).push(d,c))}r&&(i=i||[]).push("style",r);var d=i;(t.updateQueue=d)&&(t.flags|=4)}};e9=function(e,t,r,n){r!==n&&(t.flags|=4)};function sp(e,t){if(!rn)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function js(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&14680064,n|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Yse(e,t,r){var n=t.pendingProps;switch(YP(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return js(t),null;case 1:return va(t.type)&&i0(),js(t),null;case 3:return n=t.stateNode,mh(),Xr(xa),Xr(Os),rE(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Sy(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ti!==null&&(MC(Ti),Ti=null))),CC(e,t),js(t),null;case 5:tE(t);var a=Dd(Ag.current);if(r=t.type,e!==null&&t.stateNode!=null)Jz(e,t,r,n,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(De(166));return js(t),null}if(e=Dd(Po.current),Sy(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[fo]=t,n[Eg]=i,e=(t.mode&1)!==0,r){case"dialog":Gr("cancel",n),Gr("close",n);break;case"iframe":case"object":case"embed":Gr("load",n);break;case"video":case"audio":for(a=0;a<Up.length;a++)Gr(Up[a],n);break;case"source":Gr("error",n);break;case"img":case"image":case"link":Gr("error",n),Gr("load",n);break;case"details":Gr("toggle",n);break;case"input":qD(n,i),Gr("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Gr("invalid",n);break;case"textarea":GD(n,i),Gr("invalid",n)}Jk(r,i),a=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?n.textContent!==l&&(i.suppressHydrationWarning!==!0&&Ny(n.textContent,l,e),a=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Ny(n.textContent,l,e),a=["children",""+l]):bg.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Gr("scroll",n)}switch(r){case"input":py(n),YD(n,i,!0);break;case"textarea":py(n),KD(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=a0)}n=a,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=_U(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[fo]=t,e[Eg]=n,Xz(e,t,!1,!1),t.stateNode=e;e:{switch(o=eC(r,n),r){case"dialog":Gr("cancel",e),Gr("close",e),a=n;break;case"iframe":case"object":case"embed":Gr("load",e),a=n;break;case"video":case"audio":for(a=0;a<Up.length;a++)Gr(Up[a],e);a=n;break;case"source":Gr("error",e),a=n;break;case"img":case"image":case"link":Gr("error",e),Gr("load",e),a=n;break;case"details":Gr("toggle",e),a=n;break;case"input":qD(e,n),a=Gk(e,n),Gr("invalid",e);break;case"option":a=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=pn({},n,{value:void 0}),Gr("invalid",e);break;case"textarea":GD(e,n),a=Zk(e,n),Gr("invalid",e);break;default:a=n}Jk(r,a),l=a;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?OU(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&PU(e,c)):i==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&jg(e,c):typeof c=="number"&&jg(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(bg.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Gr("scroll",e):c!=null&&AP(e,i,c,o))}switch(r){case"input":py(e),YD(e,n,!1);break;case"textarea":py(e),KD(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Vc(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Ef(e,!!n.multiple,i,!1):n.defaultValue!=null&&Ef(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=a0)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return js(t),null;case 6:if(e&&t.stateNode!=null)e9(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(De(166));if(r=Dd(Ag.current),Dd(Po.current),Sy(t)){if(n=t.stateNode,r=t.memoizedProps,n[fo]=t,(i=n.nodeValue!==r)&&(e=Ia,e!==null))switch(e.tag){case 3:Ny(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ny(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[fo]=t,t.stateNode=n}return js(t),null;case 13:if(Xr(dn),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(rn&&Ma!==null&&t.mode&1&&!(t.flags&128))vz(),fh(),t.flags|=98560,i=!1;else if(i=Sy(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(De(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(De(317));i[fo]=t}else fh(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;js(t),i=!1}else Ti!==null&&(MC(Ti),Ti=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||dn.current&1?Qn===0&&(Qn=3):mE())),t.updateQueue!==null&&(t.flags|=4),js(t),null);case 4:return mh(),CC(e,t),e===null&&_g(t.stateNode.containerInfo),js(t),null;case 10:return ZP(t.type._context),js(t),null;case 17:return va(t.type)&&i0(),js(t),null;case 19:if(Xr(dn),i=t.memoizedState,i===null)return js(t),null;if(n=(t.flags&128)!==0,o=i.rendering,o===null)if(n)sp(i,!1);else{if(Qn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=h0(e),o!==null){for(t.flags|=128,sp(i,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,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}),r=r.sibling;return Wr(dn,dn.current&1|2),t.child}e=e.sibling}i.tail!==null&&Tn()>gh&&(t.flags|=128,n=!0,sp(i,!1),t.lanes=4194304)}else{if(!n)if(e=h0(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),sp(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!rn)return js(t),null}else 2*Tn()-i.renderingStartTime>gh&&r!==1073741824&&(t.flags|=128,n=!0,sp(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Tn(),t.sibling=null,r=dn.current,Wr(dn,n?r&1|2:r&1),t):(js(t),null);case 22:case 23:return hE(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Ca&1073741824&&(js(t),t.subtreeFlags&6&&(t.flags|=8192)):js(t),null;case 24:return null;case 25:return null}throw Error(De(156,t.tag))}function Gse(e,t){switch(YP(t),t.tag){case 1:return va(t.type)&&i0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 27,009 bytes, line 40
40case 3:return mh(),Xr(xa),Xr(Os),rE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return tE(t),null;case 13:if(Xr(dn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(De(340));fh()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xr(dn),null;case 4:return mh(),null;case 10:return ZP(t.type._context),null;case 22:case 23:return hE(),null;case 24:return null;default:return null}}var Ty=!1,Cs=!1,Kse=typeof WeakSet=="function"?WeakSet:Set,nt=null;function xf(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){vn(e,t,n)}else r.current=null}function TC(e,t,r){try{r()}catch(n){vn(e,t,n)}}var LM=!1;function Qse(e,t){if(dC=r0,e=az(),HP(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,l=-1,c=-1,d=0,u=0,f=e,h=null;t:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(l=o+a),f!==i||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===r&&++d===a&&(l=o),h===i&&++u===n&&(c=o),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(uC={focusedElem:e,selectionRange:r},r0=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var x=g.memoizedProps,v=g.memoizedState,b=t.stateNode,y=b.getSnapshotBeforeUpdate(t.elementType===t.type?x:ji(t.type,x),v);b.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var j=t.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(De(163))}}catch(w){vn(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return g=LM,LM=!1,g}function ng(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&TC(t,r,i)}a=a.next}while(a!==n)}}function Rw(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function _C(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function t9(e){var t=e.alternate;t!==null&&(e.alternate=null,t9(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[fo],delete t[Eg],delete t[mC],delete t[Ase],delete t[Dse])),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 r9(e){return e.tag===5||e.tag===3||e.tag===4}function FM(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r9(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 PC(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=a0));else if(n!==4&&(e=e.child,e!==null))for(PC(e,t,r),e=e.sibling;e!==null;)PC(e,t,r),e=e.sibling}function EC(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(EC(e,t,r),e=e.sibling;e!==null;)EC(e,t,r),e=e.sibling}var us=null,Ni=!1;function ec(e,t,r){for(r=r.child;r!==null;)n9(e,t,r),r=r.sibling}function n9(e,t,r){if(_o&&typeof _o.onCommitFiberUnmount=="function")try{_o.onCommitFiberUnmount(_w,r)}catch{}switch(r.tag){case 5:Cs||xf(r,t);case 6:var n=us,a=Ni;us=null,ec(e,t,r),us=n,Ni=a,us!==null&&(Ni?(e=us,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):us.removeChild(r.stateNode));break;case 18:us!==null&&(Ni?(e=us,r=r.stateNode,e.nodeType===8?nS(e.parentNode,r):e.nodeType===1&&nS(e,r),kg(e)):nS(us,r.stateNode));break;case 4:n=us,a=Ni,us=r.stateNode.containerInfo,Ni=!0,ec(e,t,r),us=n,Ni=a;break;case 0:case 11:case 14:case 15:if(!Cs&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&TC(r,t,o),a=a.next}while(a!==n)}ec(e,t,r);break;case 1:if(!Cs&&(xf(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){vn(r,t,l)}ec(e,t,r);break;case 21:ec(e,t,r);break;case 22:r.mode&1?(Cs=(n=Cs)||r.memoizedState!==null,ec(e,t,r),Cs=n):ec(e,t,r);break;default:ec(e,t,r)}}function BM(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Kse),t.forEach(function(n){var a=aae.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function vi(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:us=l.stateNode,Ni=!1;break e;case 3:us=l.stateNode.containerInfo,Ni=!0;break e;case 4:us=l.stateNode.containerInfo,Ni=!0;break e}l=l.return}if(us===null)throw Error(De(160));n9(i,o,a),us=null,Ni=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(d){vn(a,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)s9(t,e),t=t.sibling}function s9(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vi(t,e),eo(e),n&4){try{ng(3,e,e.return),Rw(3,e)}catch(x){vn(e,e.return,x)}try{ng(5,e,e.return)}catch(x){vn(e,e.return,x)}}break;case 1:vi(t,e),eo(e),n&512&&r!==null&&xf(r,r.return);break;case 5:if(vi(t,e),eo(e),n&512&&r!==null&&xf(r,r.return),e.flags&32){var a=e.stateNode;try{jg(a,"")}catch(x){vn(e,e.return,x)}}if(n&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,o=r!==null?r.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&CU(a,i),eC(l,o);var d=eC(l,i);for(o=0;o<c.length;o+=2){var u=c[o],f=c[o+1];u==="style"?OU(a,f):u==="dangerouslySetInnerHTML"?PU(a,f):u==="children"?jg(a,f):AP(a,u,f,d)}switch(l){case"input":Kk(a,i);break;case"textarea":TU(a,i);break;case"select":var h=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Ef(a,!!i.multiple,m,!1):h!==!!i.multiple&&(i.defaultValue!=null?Ef(a,!!i.multiple,i.defaultValue,!0):Ef(a,!!i.multiple,i.multiple?[]:"",!1))}a[Eg]=i}catch(x){vn(e,e.return,x)}}break;case 6:if(vi(t,e),eo(e),n&4){if(e.stateNode===null)throw Error(De(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(x){vn(e,e.return,x)}}break;case 3:if(vi(t,e),eo(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{kg(t.containerInfo)}catch(x){vn(e,e.return,x)}break;case 4:vi(t,e),eo(e);break;case 13:vi(t,e),eo(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(uE=Tn())),n&4&&BM(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(Cs=(d=Cs)||u,vi(t,e),Cs=d):vi(t,e),eo(e),n&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!u&&e.mode&1)for(nt=e,u=e.child;u!==null;){for(f=nt=u;nt!==null;){switch(h=nt,m=h.child,h.tag){case 0:case 11:case 14:case 15:ng(4,h,h.return);break;case 1:xf(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(x){vn(n,r,x)}}break;case 5:xf(h,h.return);break;case 22:if(h.memoizedState!==null){zM(f);continue}}m!==null?(m.return=h,nt=m):zM(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{a=f.stateNode,d?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,c=f.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=EU("display",o))}catch(x){vn(e,e.return,x)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=d?"":f.memoizedProps}catch(x){vn(e,e.return,x)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:vi(t,e),eo(e),n&4&&BM(e);break;case 21:break;default:vi(t,e),eo(e)}}function eo(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(r9(r)){var n=r;break e}r=r.return}throw Error(De(160))}switch(n.tag){case 5:var a=n.stateNode;n.flags&32&&(jg(a,""),n.flags&=-33);var i=FM(e);EC(e,i,a);break;case 3:case 4:var o=n.stateNode.containerInfo,l=FM(e);PC(e,l,o);break;default:throw Error(De(161))}}catch(c){vn(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Zse(e,t,r){nt=e,a9(e)}function a9(e,t,r){for(var n=(e.mode&1)!==0;nt!==null;){var a=nt,i=a.child;if(a.tag===22&&n){var o=a.memoizedState!==null||Ty;if(!o){var l=a.alternate,c=l!==null&&l.memoizedState!==null||Cs;l=Ty;var d=Cs;if(Ty=o,(Cs=c)&&!d)for(nt=a;nt!==null;)o=nt,c=o.child,o.tag===22&&o.memoizedState!==null?WM(a):c!==null?(c.return=o,nt=c):WM(a);for(;i!==null;)nt=i,a9(i),i=i.sibling;nt=a,Ty=l,Cs=d}UM(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,nt=i):UM(e)}}function UM(e){for(;nt!==null;){var t=nt;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Cs||Rw(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Cs)if(r===null)n.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:ji(t.type,r.memoizedProps);n.componentDidUpdate(a,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&kM(t,i,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}kM(t,o,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var u=d.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&kg(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(De(163))}Cs||t.flags&512&&_C(t)}catch(h){vn(t,t.return,h)}}if(t===e){nt=null;break}if(r=t.sibling,r!==null){r.return=t.return,nt=r;break}nt=t.return}}function zM(e){for(;nt!==null;){var t=nt;if(t===e){nt=null;break}var r=t.sibling;if(r!==null){r.return=t.return,nt=r;break}nt=t.return}}function WM(e){for(;nt!==null;){var t=nt;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Rw(4,t)}catch(c){vn(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var a=t.return;try{n.componentDidMount()}catch(c){vn(t,a,c)}}var i=t.return;try{_C(t)}catch(c){vn(t,i,c)}break;case 5:var o=t.return;try{_C(t)}catch(c){vn(t,o,c)}}}catch(c){vn(t,t.return,c)}if(t===e){nt=null;break}var l=t.sibling;if(l!==null){l.return=t.return,nt=l;break}nt=t.return}}var Xse=Math.ceil,g0=zl.ReactCurrentDispatcher,cE=zl.ReactCurrentOwner,li=zl.ReactCurrentBatchConfig,pr=0,ss=null,Ln=null,ps=0,Ca=0,vf=id(0),Qn=0,Rg=null,uu=0,$w=0,dE=0,sg=null,fa=null,uE=0,gh=1/0,sl=null,x0=!1,OC=null,Rc=null,_y=!1,Tc=null,v0=0,ag=0,AC=null,Sb=-1,kb=0;function Js(){return pr&6?Tn():Sb!==-1?Sb:Sb=Tn()}function $c(e){return e.mode&1?pr&2&&ps!==0?ps&-ps:Ise.transition!==null?(kb===0&&(kb=WU()),kb):(e=Er,e!==0||(e=window.event,e=e===void 0?16:QU(e.type)),e):1}function $i(e,t,r,n){if(50<ag)throw ag=0,AC=null,Error(De(185));iv(e,r,n),(!(pr&2)||e!==ss)&&(e===ss&&(!(pr&2)&&($w|=r),Qn===4&&fc(e,ps)),ya(e,n),r===1&&pr===0&&!(t.mode&1)&&(gh=Tn()+500,Dw&&od()))}function ya(e,t){var r=e.callbackNode;Ine(e,t);var n=t0(e,e===ss?ps:0);if(n===0)r!==null&&XD(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&XD(r),t===1)e.tag===0?Mse(VM.bind(null,e)):pz(VM.bind(null,e)),Ese(function(){!(pr&6)&&od()}),r=null;else{switch(VU(n)){case 1:r=$P;break;case 4:r=UU;break;case 16:r=e0;break;case 536870912:r=zU;break;default:r=e0}r=h9(r,i9.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function i9(e,t){if(Sb=-1,kb=0,pr&6)throw Error(De(327));var r=e.callbackNode;if(If()&&e.callbackNode!==r)return null;var n=t0(e,e===ss?ps:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=y0(e,n);else{t=n;var a=pr;pr|=2;var i=l9();(ss!==e||ps!==t)&&(sl=null,gh=Tn()+500,Kd(e,t));do try{tae();break}catch(l){o9(e,l)}while(!0);QP(),g0.current=i,pr=a,Ln!==null?t=0:(ss=null,ps=0,t=Qn)}if(t!==0){if(t===2&&(a=aC(e),a!==0&&(n=a,t=DC(e,a))),t===1)throw r=Rg,Kd(e,0),fc(e,n),ya(e,Tn()),r;if(t===6)fc(e,n);else{if(a=e.current.alternate,!(n&30)&&!Jse(a)&&(t=y0(e,n),t===2&&(i=aC(e),i!==0&&(n=i,t=DC(e,i))),t===1))throw r=Rg,Kd(e,0),fc(e,n),ya(e,Tn()),r;switch(e.finishedWork=a,e.finishedLanes=n,t){case 0:case 1:throw Error(De(345));case 2:Nd(e,fa,sl);break;case 3:if(fc(e,n),(n&130023424)===n&&(t=uE+500-Tn(),10<t)){if(t0(e,0)!==0)break;if(a=e.suspendedLanes,(a&n)!==n){Js(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=hC(Nd.bind(null,e,fa,sl),t);break}Nd(e,fa,sl);break;case 4:if(fc(e,n),(n&4194240)===n)break;for(t=e.eventTimes,a=-1;0<n;){var o=31-Ri(n);i=1<<o,o=t[o],o>a&&(a=o),n&=~i}if(n=a,n=Tn()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Xse(n/1960))-n,10<n){e.timeoutHandle=hC(Nd.bind(null,e,fa,sl),n);break}Nd(e,fa,sl);break;case 5:Nd(e,fa,sl);break;default:throw Error(De(329))}}}return ya(e,Tn()),e.callbackNode===r?i9.bind(null,e):null}function DC(e,t){var r=sg;return e.current.memoizedState.isDehydrated&&(Kd(e,t).flags|=256),e=y0(e,t),e!==2&&(t=fa,fa=r,t!==null&&MC(t)),e}function MC(e){fa===null?fa=e:fa.push.apply(fa,e)}function Jse(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var a=r[n],i=a.getSnapshot;a=a.value;try{if(!zi(i(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 fc(e,t){for(t&=~dE,t&=~$w,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ri(t),n=1<<r;e[r]=-1,t&=~n}}function VM(e){if(pr&6)throw Error(De(327));If();var t=t0(e,0);if(!(t&1))return ya(e,Tn()),null;var r=y0(e,t);if(e.tag!==0&&r===2){var n=aC(e);n!==0&&(t=n,r=DC(e,n))}if(r===1)throw r=Rg,Kd(e,0),fc(e,t),ya(e,Tn()),r;if(r===6)throw Error(De(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nd(e,fa,sl),ya(e,Tn()),null}function fE(e,t){var r=pr;pr|=1;try{return e(t)}finally{pr=r,pr===0&&(gh=Tn()+500,Dw&&od())}}function fu(e){Tc!==null&&Tc.tag===0&&!(pr&6)&&If();var t=pr;pr|=1;var r=li.transition,n=Er;try{if(li.transition=null,Er=1,e)return e()}finally{Er=n,li.transition=r,pr=t,!(pr&6)&&od()}}function hE(){Ca=vf.current,Xr(vf)}function Kd(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Pse(r)),Ln!==null)for(r=Ln.return;r!==null;){var n=r;switch(YP(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&i0();break;case 3:mh(),Xr(xa),Xr(Os),rE();break;case 5:tE(n);break;case 4:mh();break;case 13:Xr(dn);break;case 19:Xr(dn);break;case 10:ZP(n.type._context);break;case 22:case 23:hE()}r=r.return}if(ss=e,Ln=e=Lc(e.current,null),ps=Ca=t,Qn=0,Rg=null,dE=$w=uu=0,fa=sg=null,Ad!==null){for(t=0;t<Ad.length;t++)if(r=Ad[t],n=r.interleaved,n!==null){r.interleaved=null;var a=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=a,n.next=o}r.pending=n}Ad=null}return e}function o9(e,t){do{var r=Ln;try{if(QP(),jb.current=p0,m0){for(var n=mn.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}m0=!1}if(du=0,rs=qn=mn=null,rg=!1,Dg=0,cE.current=null,r===null||r.return===null){Qn=1,Rg=t,Ln=null;break}e:{var i=e,o=r.return,l=r,c=t;if(t=ps,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,u=l,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var m=OM(o);if(m!==null){m.flags&=-257,AM(m,o,l,i,t),m.mode&1&&EM(i,d,t),t=m,c=d;var g=t.updateQueue;if(g===null){var x=new Set;x.add(c),t.updateQueue=x}else g.add(c);break e}else{if(!(t&1)){EM(i,d,t),mE();break e}c=Error(De(426))}}else if(rn&&l.mode&1){var v=OM(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),AM(v,o,l,i,t),GP(ph(c,l));break e}}i=c=ph(c,l),Qn!==4&&(Qn=2),sg===null?sg=[i]:sg.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var b=Vz(i,c,t);SM(i,b);break e;case 1:l=c;var y=i.type,j=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(Rc===null||!Rc.has(j)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=Hz(i,l,t);SM(i,w);break e}}i=i.return}while(i!==null)}d9(r)}catch(N){t=N,Ln===r&&r!==null&&(Ln=r=r.return);continue}break}while(!0)}function l9(){var e=g0.current;return g0.current=p0,e===null?p0:e}function mE(){(Qn===0||Qn===3||Qn===2)&&(Qn=4),ss===null||!(uu&268435455)&&!($w&268435455)||fc(ss,ps)}function y0(e,t){var r=pr;pr|=2;var n=l9();(ss!==e||ps!==t)&&(sl=null,Kd(e,t));do try{eae();break}catch(a){o9(e,a)}while(!0);if(QP(),pr=r,g0.current=n,Ln!==null)throw Error(De(261));return ss=null,ps=0,Qn}function eae(){for(;Ln!==null;)c9(Ln)}function tae(){for(;Ln!==null&&!Cne();)c9(Ln)}function c9(e){var t=f9(e.alternate,e,Ca);e.memoizedProps=e.pendingProps,t===null?d9(e):Ln=t,cE.current=null}function d9(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Gse(r,t),r!==null){r.flags&=32767,Ln=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qn=6,Ln=null;return}}else if(r=Yse(r,t,Ca),r!==null){Ln=r;return}if(t=t.sibling,t!==null){Ln=t;return}Ln=t=e}while(t!==null);Qn===0&&(Qn=5)}function Nd(e,t,r){var n=Er,a=li.transition;try{li.transition=null,Er=1,rae(e,t,r,n)}finally{li.transition=a,Er=n}return null}function rae(e,t,r,n){do If();while(Tc!==null);if(pr&6)throw Error(De(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(De(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(Rne(e,i),e===ss&&(Ln=ss=null,ps=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||_y||(_y=!0,h9(e0,function(){return If(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=li.transition,li.transition=null;var o=Er;Er=1;var l=pr;pr|=4,cE.current=null,Qse(e,r),s9(r,e),wse(uC),r0=!!dC,uC=dC=null,e.current=r,Zse(r),Tne(),pr=l,Er=o,li.transition=i}else e.current=r;if(_y&&(_y=!1,Tc=e,v0=a),i=e.pendingLanes,i===0&&(Rc=null),Ene(r.stateNode),ya(e,Tn()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],n(a.value,{componentStack:a.stack,digest:a.digest});if(x0)throw x0=!1,e=OC,OC=null,e;return v0&1&&e.tag!==0&&If(),i=e.pendingLanes,i&1?e===AC?ag++:(ag=0,AC=e):ag=0,od(),null}function If(){if(Tc!==null){var e=VU(v0),t=li.transition,r=Er;try{if(li.transition=null,Er=16>e?16:e,Tc===null)var n=!1;else{if(e=Tc,Tc=null,v0=0,pr&6)throw Error(De(331));var a=pr;for(pr|=4,nt=e.current;nt!==null;){var i=nt,o=i.child;if(nt.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var d=l[c];for(nt=d;nt!==null;){var u=nt;switch(u.tag){case 0:case 11:case 15:ng(8,u,i)}var f=u.child;if(f!==null)f.return=u,nt=f;else for(;nt!==null;){u=nt;var h=u.sibling,m=u.return;if(t9(u),u===d){nt=null;break}if(h!==null){h.return=m,nt=h;break}nt=m}}}var g=i.alternate;if(g!==null){var x=g.child;if(x!==null){g.child=null;do{var v=x.sibling;x.sibling=null,x=v}while(x!==null)}}nt=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,nt=o;else e:for(;nt!==null;){if(i=nt,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ng(9,i,i.return)}var b=i.sibling;if(b!==null){b.return=i.return,nt=b;break e}nt=i.return}}var y=e.current;for(nt=y;nt!==null;){o=nt;var j=o.child;if(o.subtreeFlags&2064&&j!==null)j.return=o,nt=j;else e:for(o=y;nt!==null;){if(l=nt,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Rw(9,l)}}catch(N){vn(l,l.return,N)}if(l===o){nt=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,nt=w;break e}nt=l.return}}if(pr=a,od(),_o&&typeof _o.onPostCommitFiberRoot=="function")try{_o.onPostCommitFiberRoot(_w,e)}catch{}n=!0}return n}finally{Er=r,li.transition=t}}return!1}function HM(e,t,r){t=ph(r,t),t=Vz(e,t,1),e=Ic(e,t,1),t=Js(),e!==null&&(iv(e,1,t),ya(e,t))}function vn(e,t,r){if(e.tag===3)HM(e,e,r);else for(;t!==null;){if(t.tag===3){HM(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Rc===null||!Rc.has(n))){e=ph(r,e),e=Hz(t,e,1),t=Ic(t,e,1),e=Js(),t!==null&&(iv(t,1,e),ya(t,e));break}}t=t.return}}function nae(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Js(),e.pingedLanes|=e.suspendedLanes&r,ss===e&&(ps&r)===r&&(Qn===4||Qn===3&&(ps&130023424)===ps&&500>Tn()-uE?Kd(e,0):dE|=r),ya(e,t)}function u9(e,t){t===0&&(e.mode&1?(t=vy,vy<<=1,!(vy&130023424)&&(vy=4194304)):t=1);var r=Js();e=Ol(e,t),e!==null&&(iv(e,t,r),ya(e,r))}function sae(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),u9(e,r)}function aae(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(De(314))}n!==null&&n.delete(t),u9(e,r)}var f9;f9=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||xa.current)ha=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ha=!1,qse(e,t,r);ha=!!(e.flags&131072)}else ha=!1,rn&&t.flags&1048576&&gz(t,c0,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Nb(e,t),e=t.pendingProps;var a=uh(t,Os.current);Mf(t,r),a=sE(null,t,n,e,a,r);var i=aE();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,va(n)?(i=!0,o0(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,JP(t),a.updater=Iw,t.stateNode=a,a._reactInternals=t,bC(t,n,e,r),t=NC(null,t,n,!0,i,r)):(t.tag=0,rn&&i&&qP(t),Us(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Nb(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=oae(n),e=ji(n,e),a){case 0:t=wC(null,t,n,e,r);break e;case 1:t=IM(null,t,n,e,r);break e;case 11:t=DM(null,t,n,e,r);break e;case 14:t=MM(null,t,n,ji(n.type,e),r);break e}throw Error(De(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ji(n,a),wC(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ji(n,a),IM(e,t,n,a,r);case 3:e:{if(Kz(t),e===null)throw Error(De(387));n=t.pendingProps,i=t.memoizedState,a=i.element,wz(e,t),f0(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=ph(Error(De(423)),t),t=RM(e,t,n,r,a);break e}else if(n!==a){a=ph(Error(De(424)),t),t=RM(e,t,n,r,a);break e}else for(Ma=Mc(t.stateNode.containerInfo.firstChild),Ia=t,rn=!0,Ti=null,r=bz(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(fh(),n===a){t=Al(e,t,r);break e}Us(e,t,n,r)}t=t.child}return t;case 5:return Nz(t),e===null&&xC(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,fC(n,a)?o=null:i!==null&&fC(n,i)&&(t.flags|=32),Gz(e,t),Us(e,t,o,r),t.child;case 6:return e===null&&xC(t),null;case 13:return Qz(e,t,r);case 4:return eE(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=hh(t,null,n,r):Us(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ji(n,a),DM(e,t,n,a,r);case 7:return Us(e,t,t.pendingProps,r),t.child;case 8:return Us(e,t,t.pendingProps.children,r),t.child;case 12:return Us(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,Wr(d0,n._currentValue),n._currentValue=o,i!==null)if(zi(i.value,o)){if(i.children===a.children&&!xa.current){t=Al(e,t,r);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===n){if(i.tag===1){c=gl(-1,r&-r),c.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var u=d.pending;u===null?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),vC(i.return,r,t),l.lanes|=r;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(De(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),vC(o,r,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}Us(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,Mf(t,r),a=di(a),n=n(a),t.flags|=1,Us(e,t,n,r),t.child;case 14:return n=t.type,a=ji(n,t.pendingProps),a=ji(n.type,a),MM(e,t,n,a,r);case 15:return qz(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ji(n,a),Nb(e,t),t.tag=1,va(n)?(e=!0,o0(t)):e=!1,Mf(t,r),Wz(t,n,a),bC(t,n,a,r),NC(null,t,n,!0,e,r);case 19:return Zz(e,t,r);case 22:return Yz(e,t,r)}throw Error(De(156,t.tag))};function h9(e,t){return BU(e,t)}function iae(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(e,t,r,n){return new iae(e,t,r,n)}function pE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oae(e){if(typeof e=="function")return pE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===MP)return 11;if(e===IP)return 14}return 2}function Lc(e,t){var r=e.alternate;return r===null?(r=ai(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.depen
vendor: 9,872 bytes, lines 40-48
40dencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Cb(e,t,r,n,a,i){var o=2;if(n=e,typeof e=="function")pE(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case lf:return Qd(r.children,a,i,t);case DP:o=8,a|=8;break;case Vk:return e=ai(12,r,t,a|2),e.elementType=Vk,e.lanes=i,e;case Hk:return e=ai(13,r,t,a),e.elementType=Hk,e.lanes=i,e;case qk:return e=ai(19,r,t,a),e.elementType=qk,e.lanes=i,e;case NU:return Lw(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jU:o=10;break e;case wU:o=9;break e;case MP:o=11;break e;case IP:o=14;break e;case lc:o=16,n=null;break e}throw Error(De(130,e==null?e:typeof e,""))}return t=ai(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function Qd(e,t,r,n){return e=ai(7,e,n,t),e.lanes=r,e}function Lw(e,t,r,n){return e=ai(22,e,n,t),e.elementType=NU,e.lanes=r,e.stateNode={isHidden:!1},e}function uS(e,t,r){return e=ai(6,e,null,t),e.lanes=r,e}function fS(e,t,r){return t=ai(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lae(e,t,r,n,a){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=q1(0),this.expirationTimes=q1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=q1(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function gE(e,t,r,n,a,i,o,l,c){return e=new lae(e,t,r,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ai(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},JP(i),e}function cae(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:of,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function m9(e){if(!e)return Hc;e=e._reactInternals;e:{if(Du(e)!==e||e.tag!==1)throw Error(De(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(va(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(De(171))}if(e.tag===1){var r=e.type;if(va(r))return mz(e,r,t)}return t}function p9(e,t,r,n,a,i,o,l,c){return e=gE(r,n,!0,e,a,i,o,l,c),e.context=m9(null),r=e.current,n=Js(),a=$c(r),i=gl(n,a),i.callback=t??null,Ic(r,i,a),e.current.lanes=a,iv(e,a,n),ya(e,n),e}function Fw(e,t,r,n){var a=t.current,i=Js(),o=$c(a);return r=m9(r),t.context===null?t.context=r:t.pendingContext=r,t=gl(i,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Ic(a,t,o),e!==null&&($i(e,a,o,i),bb(e,a,o)),o}function b0(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 qM(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function xE(e,t){qM(e,t),(e=e.alternate)&&qM(e,t)}function dae(){return null}var g9=typeof reportError=="function"?reportError:function(e){console.error(e)};function vE(e){this._internalRoot=e}Bw.prototype.render=vE.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(De(409));Fw(e,t,null,null)};Bw.prototype.unmount=vE.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fu(function(){Fw(null,e,null,null)}),t[El]=null}};function Bw(e){this._internalRoot=e}Bw.prototype.unstable_scheduleHydration=function(e){if(e){var t=YU();e={blockedOn:null,target:e,priority:t};for(var r=0;r<uc.length&&t!==0&&t<uc[r].priority;r++);uc.splice(r,0,e),r===0&&KU(e)}};function yE(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Uw(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function YM(){}function uae(e,t,r,n,a){if(a){if(typeof n=="function"){var i=n;n=function(){var d=b0(o);i.call(d)}}var o=p9(t,n,e,0,null,!1,!1,"",YM);return e._reactRootContainer=o,e[El]=o.current,_g(e.nodeType===8?e.parentNode:e),fu(),o}for(;a=e.lastChild;)e.removeChild(a);if(typeof n=="function"){var l=n;n=function(){var d=b0(c);l.call(d)}}var c=gE(e,0,!1,null,null,!1,!1,"",YM);return e._reactRootContainer=c,e[El]=c.current,_g(e.nodeType===8?e.parentNode:e),fu(function(){Fw(t,c,r,n)}),c}function zw(e,t,r,n,a){var i=r._reactRootContainer;if(i){var o=i;if(typeof a=="function"){var l=a;a=function(){var c=b0(o);l.call(c)}}Fw(t,o,e,a)}else o=uae(r,t,e,a,n);return b0(o)}HU=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Bp(t.pendingLanes);r!==0&&(LP(t,r|1),ya(t,Tn()),!(pr&6)&&(gh=Tn()+500,od()))}break;case 13:fu(function(){var n=Ol(e,1);if(n!==null){var a=Js();$i(n,e,1,a)}}),xE(e,1)}};FP=function(e){if(e.tag===13){var t=Ol(e,134217728);if(t!==null){var r=Js();$i(t,e,134217728,r)}xE(e,134217728)}};qU=function(e){if(e.tag===13){var t=$c(e),r=Ol(e,t);if(r!==null){var n=Js();$i(r,e,t,n)}xE(e,t)}};YU=function(){return Er};GU=function(e,t){var r=Er;try{return Er=e,t()}finally{Er=r}};rC=function(e,t,r){switch(t){case"input":if(Kk(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=Aw(n);if(!a)throw Error(De(90));kU(n),Kk(n,a)}}}break;case"textarea":TU(e,r);break;case"select":t=r.value,t!=null&&Ef(e,!!r.multiple,t,!1)}};MU=fE;IU=fu;var fae={usingClientEntryPoint:!1,Events:[lv,ff,Aw,AU,DU,fE]},ap={findFiberByHostInstance:Od,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hae={bundleType:ap.bundleType,version:ap.version,rendererPackageName:ap.rendererPackageName,rendererConfig:ap.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:zl.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=LU(e),e===null?null:e.stateNode},findFiberByHostInstance:ap.findFiberByHostInstance||dae,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 Py=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Py.isDisabled&&Py.supportsFiber)try{_w=Py.inject(hae),_o=Py}catch{}}Va.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fae;Va.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yE(t))throw Error(De(200));return cae(e,t,null,r)};Va.createRoot=function(e,t){if(!yE(e))throw Error(De(299));var r=!1,n="",a=g9;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=gE(e,1,!1,null,null,r,!1,n,a),e[El]=t.current,_g(e.nodeType===8?e.parentNode:e),new vE(t)};Va.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(De(188)):(e=Object.keys(e).join(","),Error(De(268,e)));return e=LU(t),e=e===null?null:e.stateNode,e};Va.flushSync=function(e){return fu(e)};Va.hydrate=function(e,t,r){if(!Uw(t))throw Error(De(200));return zw(null,e,t,!0,r)};Va.hydrateRoot=function(e,t,r){if(!yE(e))throw Error(De(405));var n=r!=null&&r.hydratedSources||null,a=!1,i="",o=g9;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=p9(t,null,e,1,r??null,a,!1,i,o),e[El]=t.current,_g(e),n)for(e=0;e<n.length;e++)r=n[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new Bw(t)};Va.render=function(e,t,r){if(!Uw(t))throw Error(De(200));return zw(null,e,t,!1,r)};Va.unmountComponentAtNode=function(e){if(!Uw(e))throw Error(De(40));return e._reactRootContainer?(fu(function(){zw(null,null,e,!1,function(){e._reactRootContainer=null,e[El]=null})}),!0):!1};Va.unstable_batchedUpdates=fE;Va.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Uw(r))throw Error(De(200));if(e==null||e._reactInternals===void 0)throw Error(De(38));return zw(e,t,r,!1,n)};Va.version="18.3.1-next-f1338f8080-20240426";function x9(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(x9)}catch(e){console.error(e)}}x9(),xU.exports=Va;var Li=xU.exports;const Rf=ur(Li);var v9,GM=Li;v9=GM.createRoot,GM.hydrateRoot;function mae(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var r,n,a,i,o=[],l="",c=e.split("/");for(c[0]||c.shift();a=c.shift();)r=a[0],r==="*"?(o.push(r),l+=a[1]==="?"?"(?:/(.*))?":"/(.*)"):r===":"?(n=a.indexOf("?",1),i=a.indexOf(".",1),o.push(a.substring(1,~n?n:~i?i:a.length)),l+=~n&&!~i?"(?:/([^/]+?))?":"/([^/]+?)",~i&&(l+=(~n?"?":"")+"\\"+a.substring(i))):l+="/"+a;return{keys:o,pattern:new RegExp("^"+l+(t?"(?=$|/)":"/?$"),"i")}}var y9={exports:{}},b9={};/** 41 * @license React 42 * use-sync-external-store-shim.production.min.js 43 * 44 * Copyright (c) Facebook, Inc. and its affiliates. 45 * 46 * This source code is licensed under the MIT license found in the 47 * LICENSE file in the root directory of this source tree. 48 */var xh=p;function pae(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}
48var gae=typeof Object.is=="function"?Object.is:pae,xae=xh.useState,vae=xh.useEffect,yae=xh.useLayoutEffect,bae=xh.useDebugValue;function jae(e,t){var r=t(),n=xae({inst:{value:r,getSnapshot:t}}),a=n[0].inst,i=n[1];return yae(function(){a.value=r,a.getSnapshot=t,hS(a)&&i({inst:a})},[e,r,t]),vae(function(){return hS(a)&&i({inst:a}),e(function(){hS(a)&&i({inst:a})})},[e]),bae(r),r}function hS(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!gae(e,r)}catch{return!0}}function wae(e,t){return t()}var Nae=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wae:jae;b9.useSyncExternalStore=xh.useSyncExternalStore!==void 0?xh.useSyncExternalStore:Nae;y9.exports=b9;var Sae=y9.exports;const kae=PP.useInsertionEffect,Cae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",j9=Cae?p.useLayoutEffect:p.useEffect,Tae=kae||j9,bE=e=>{const t=p.useRef([e,(...r)=>t[0](...r)]).current;return Tae(()=>{t[0]=e}),t[1]},_ae="popstate",jE="pushState",wE="replaceState",Pae="hashchange",KM=[_ae,jE,wE,Pae],Eae=e=>{for(const t of KM)addEventListener(t,e);return()=>{for(const t of KM)removeEventListener(t,e)}},w9=(e,t)=>Sae.useSyncExternalStore(Eae,e,t),Oae=()=>location.search,Aae=({ssrSearch:e=""}={})=>w9(Oae,()=>e),QM=()=>location.pathname,Dae=({ssrPath:e}={})=>w9(QM,e?()=>e:QM),Mae=(e,{replace:t=!1,state:r=null}={})=>history[t?wE:jE](r,"",e),Iae=(e={})=>[Dae(e),Mae],ZM=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[ZM]>"u"){for(const e of[jE,wE]){const t=history[e];history[e]=function(){const r=t.apply(this,arguments),n=new Event(e);return n.arguments=arguments,dispatchEvent(n),r}}Object.defineProperty(window,ZM,{value:!0})}const Rae=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",N9=(e="")=>e==="/"?"":e,$ae=(e,t)=>e[0]==="~"?e.slice(1):N9(t)+e,Lae=(e="",t)=>Rae(XM(N9(e)),XM(t)),XM=e=>{try{return decodeURI(e)}catch{return e}},S9={hook:Iae,searchHook:Aae,parser:mae,base:"",ssrPath:void 0,ssrSearch:void 0,hrefs:e=>e},k9=p.createContext(S9),pm=()=>p.useContext(k9),C9={},T9=p.createContext(C9),_9=()=>p.useContext(T9),Ww=e=>{const[t,r]=e.hook(e);return[Lae(e.base,t),bE((n,a)=>r($ae(n,e.base),a))]},Nn=()=>Ww(pm()),NE=(e,t,r,n)=>{const{pattern:a,keys:i}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",n),o=a.exec(r)||[],[l,...c]=o;return l!==void 0?[!0,(()=>{const d=i!==!1?Object.fromEntries(i.map((f,h)=>[f,c[h]])):o.groups;let u={...c};return d&&Object.assign(u,d),u})(),...n?[l]:[]]:[!1,null]},Fae=e=>NE(pm().parser,e,Nn()[0]),Bae=({children:e,...t})=>{var u,f;const r=pm(),n=t.hook?S9:r;let a=n;const[i,o]=((u=t.ssrPath)==null?void 0:u.split("?"))??[];o&&(t.ssrSearch=o,t.ssrPath=i),t.hrefs=t.hrefs??((f=t.hook)==null?void 0:f.hrefs);let l=p.useRef({}),c=l.current,d=c;for(let h in n){const m=h==="base"?n[h]+(t[h]||""):t[h]||n[h];c===d&&m!==d[h]&&(l.current=d={...d}),d[h]=m,m!==n[h]&&(a=d)}return p.createElement(k9.Provider,{value:a,children:e})},JM=({children:e,component:t},r)=>t?p.createElement(t,{params:r}):typeof e=="function"?e(r):e,Uae=e=>{let t=p.useRef(C9),r=t.current;for(const n in e)e[n]!==r[n]&&(r=e);return Object.keys(e).length===0&&(r=e),t.current=r},xt=({path:e,nest:t,match:r,...n})=>{const a=pm(),[i]=Ww(a),[o,l,c]=r??NE(a.parser,e,i,t),d=Uae({..._9(),...l});if(!o)return null;const u=c?p.createElement(Bae,{base:c},JM(n,d)):JM(n,d);return p.createElement(T9.Provider,{value:d,children:u})},Te=p.forwardRef((e,t)=>{const r=pm(),[n,a]=Ww(r),{to:i="",href:o=i,onClick:l,asChild:c,children:d,className:u,replace:f,state:h,...m}=e,g=bE(v=>{v.ctrlKey||v.metaKey||v.altKey||v.shiftKey||v.button!==0||(l==null||l(v),v.defaultPrevented||(v.preventDefault(),a(o,e)))}),x=r.hrefs(o[0]==="~"?o.slice(1):r.base+o,r);return c&&p.isValidElement(d)?p.cloneElement(d,{onClick:g,href:x}):p.createElement("a",{...m,onClick:g,href:x,className:u!=null&&u.call?u(n===o):u,children:d,ref:t})}),P9=e=>Array.isArray(e)?e.flatMap(t=>P9(t&&t.type===p.Fragment?t.props.children:t)):[e],zae=({children:e,location:t})=>{const r=pm(),[n]=Ww(r);for(const a of P9(e)){let i=0;if(p.isValidElement(a)&&(i=NE(r.parser,a.props.path,t||n,a.props.nest))[0])return p.cloneElement(a,{match:i})}return null},Wae=e=>{const{to:t,href:r=t}=e,[,n]=Nn(),a=bE(()=>n(t||r,e));return j9(()=>{a()},[]),null};var gm=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(){}},hu=typeof window>"u"||"Deno"in globalThis;function Qa(){}function Vae(e,t){return typeof e=="function"?e(t):e}function IC(e){return typeof e=="number"&&e>=0&&e!==1/0}function E9(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $f(e,t){return typeof e=="function"?e(t):e}function _i(e,t){return typeof e=="function"?e(t):e}function eI(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:i,queryKey:o,stale:l}=e;if(o){if(n){if(t.queryHash!==SE(o,t.options))return!1}else if(!$g(t.queryKey,o))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||i&&!i(t))}function tI(e,t){const{exact:r,status:n,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(mu(t.options.mutationKey)!==mu(i))return!1}else if(!$g(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function SE(e,t){return((t==null?void 0:t.queryKeyHashFn)||mu)(e)}function mu(e){return JSON.stringify(e,(t,r)=>RC(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function $g(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!$g(e[r],t[r])):!1}function O9(e,t){if(e===t)return e;const r=rI(e)&&rI(t);if(r||RC(e)&&RC(t)){const n=r?e:Object.keys(e),a=n.length,i=r?t:Object.keys(t),o=i.length,l=r?[]:{};let c=0;for(let d=0;d<o;d++){const u=r?d:i[d];(!r&&n.includes(u)||r)&&e[u]===void 0&&t[u]===void 0?(l[u]=void 0,c++):(l[u]=O9(e[u],t[u]),l[u]===e[u]&&e[u]!==void 0&&c++)}return a===o&&c===a?e:l}return t}function j0(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function rI(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function RC(e){if(!nI(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!nI(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function nI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hae(e){return new Promise(t=>{setTimeout(t,e)})}function $C(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?O9(e,t):t}function qae(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function Yae(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var kE=Symbol();function A9(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===kE?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var zd,xc,Zf,d5,Gae=(d5=class extends gm{constructor(){super();jt(this,zd);jt(this,xc);jt(this,Zf);et(this,Zf,t=>{if(!hu&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){Q(this,xc)||this.setEventListener(Q(this,Zf))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,xc))==null||t.call(this),et(this,xc,void 0))}setEventListener(t){var r;et(this,Zf,t),(r=Q(this,xc))==null||r.call(this),et(this,xc,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){Q(this,zd)!==t&&(et(this,zd,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 35,075 bytes, line 48
48this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof Q(this,zd)=="boolean"?Q(this,zd):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},zd=new WeakMap,xc=new WeakMap,Zf=new WeakMap,d5),CE=new Gae,Xf,vc,Jf,u5,Kae=(u5=class extends gm{constructor(){super();jt(this,Xf,!0);jt(this,vc);jt(this,Jf);et(this,Jf,t=>{if(!hu&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){Q(this,vc)||this.setEventListener(Q(this,Jf))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,vc))==null||t.call(this),et(this,vc,void 0))}setEventListener(t){var r;et(this,Jf,t),(r=Q(this,vc))==null||r.call(this),et(this,vc,t(this.setOnline.bind(this)))}setOnline(t){Q(this,Xf)!==t&&(et(this,Xf,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return Q(this,Xf)}},Xf=new WeakMap,vc=new WeakMap,Jf=new WeakMap,u5),w0=new Kae;function LC(){let e,t;const r=new Promise((a,i)=>{e=a,t=i});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}function Qae(e){return Math.min(1e3*2**e,3e4)}function D9(e){return(e??"online")==="online"?w0.isOnline():!0}var M9=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function mS(e){return e instanceof M9}function I9(e){let t=!1,r=0,n=!1,a;const i=LC(),o=x=>{var v;n||(h(new M9(x)),(v=e.abort)==null||v.call(e))},l=()=>{t=!0},c=()=>{t=!1},d=()=>CE.isFocused()&&(e.networkMode==="always"||w0.isOnline())&&e.canRun(),u=()=>D9(e.networkMode)&&e.canRun(),f=x=>{var v;n||(n=!0,(v=e.onSuccess)==null||v.call(e,x),a==null||a(),i.resolve(x))},h=x=>{var v;n||(n=!0,(v=e.onError)==null||v.call(e,x),a==null||a(),i.reject(x))},m=()=>new Promise(x=>{var v;a=b=>{(n||d())&&x(b)},(v=e.onPause)==null||v.call(e)}).then(()=>{var x;a=void 0,n||(x=e.onContinue)==null||x.call(e)}),g=()=>{if(n)return;let x;const v=r===0?e.initialPromise:void 0;try{x=v??e.fn()}catch(b){x=Promise.reject(b)}Promise.resolve(x).then(f).catch(b=>{var S;if(n)return;const y=e.retry??(hu?0:3),j=e.retryDelay??Qae,w=typeof j=="function"?j(r,b):j,N=y===!0||typeof y=="number"&&r<y||typeof y=="function"&&y(r,b);if(t||!N){h(b);return}r++,(S=e.onFail)==null||S.call(e,r,b),Hae(w).then(()=>d()?void 0:m()).then(()=>{t?h(b):g()})})};return{promise:i,cancel:o,continue:()=>(a==null||a(),i),cancelRetry:l,continueRetry:c,canStart:u,start:()=>(u()?g():m().then(g),i)}}function Zae(){let e=[],t=0,r=l=>{l()},n=l=>{l()},a=l=>setTimeout(l,0);const i=l=>{t?e.push(l):a(()=>{r(l)})},o=()=>{const l=e;e=[],l.length&&a(()=>{n(()=>{l.forEach(c=>{r(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=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{a=l}}}var Yn=Zae(),Wd,f5,R9=(f5=class{constructor(){jt(this,Wd)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),IC(this.gcTime)&&et(this,Wd,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hu?1/0:5*60*1e3))}clearGcTimeout(){Q(this,Wd)&&(clearTimeout(Q(this,Wd)),et(this,Wd,void 0))}},Wd=new WeakMap,f5),eh,th,Ka,Ns,tv,Vd,wi,el,h5,Xae=(h5=class extends R9{constructor(t){super();jt(this,wi);jt(this,eh);jt(this,th);jt(this,Ka);jt(this,Ns);jt(this,tv);jt(this,Vd);et(this,Vd,!1),et(this,tv,t.defaultOptions),this.setOptions(t.options),this.observers=[],et(this,Ka,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,et(this,eh,Jae(this.options)),this.state=t.state??Q(this,eh),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Q(this,Ns))==null?void 0:t.promise}setOptions(t){this.options={...Q(this,tv),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,Ka).remove(this)}setData(t,r){const n=$C(this.state.data,t,this.options);return Yt(this,wi,el).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Yt(this,wi,el).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,a;const r=(n=Q(this,Ns))==null?void 0:n.promise;return(a=Q(this,Ns))==null||a.cancel(t),r?r.then(Qa).catch(Qa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,eh))}isActive(){return this.observers.some(t=>_i(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===kE||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!E9(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=Q(this,Ns))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=Q(this,Ns))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Q(this,Ka).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(Q(this,Ns)&&(Q(this,Vd)?Q(this,Ns).cancel({revert:!0}):Q(this,Ns).cancelRetry()),this.scheduleGc()),Q(this,Ka).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Yt(this,wi,el).call(this,{type:"invalidate"})}fetch(t,r){var c,d,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(Q(this,Ns))return Q(this,Ns).continueRetry(),Q(this,Ns).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(et(this,Vd,!0),n.signal)})},i=()=>{const f=A9(this.options,r),h={queryKey:this.queryKey,meta:this.meta};return a(h),et(this,Vd,!1),this.options.persister?this.options.persister(f,h,this):f(h)},o={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};a(o),(c=this.options.behavior)==null||c.onFetch(o,this),et(this,th,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=o.fetchOptions)==null?void 0:d.meta))&&Yt(this,wi,el).call(this,{type:"fetch",meta:(u=o.fetchOptions)==null?void 0:u.meta});const l=f=>{var h,m,g,x;mS(f)&&f.silent||Yt(this,wi,el).call(this,{type:"error",error:f}),mS(f)||((m=(h=Q(this,Ka).config).onError)==null||m.call(h,f,this),(x=(g=Q(this,Ka).config).onSettled)==null||x.call(g,this.state.data,f,this)),this.scheduleGc()};return et(this,Ns,I9({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,m,g,x;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(v){l(v);return}(m=(h=Q(this,Ka).config).onSuccess)==null||m.call(h,f,this),(x=(g=Q(this,Ka).config).onSettled)==null||x.call(g,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Yt(this,wi,el).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Yt(this,wi,el).call(this,{type:"pause"})},onContinue:()=>{Yt(this,wi,el).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),Q(this,Ns).start()}},eh=new WeakMap,th=new WeakMap,Ka=new WeakMap,Ns=new WeakMap,tv=new WeakMap,Vd=new WeakMap,wi=new WeakSet,el=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...$9(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return mS(a)&&a.revert&&Q(this,th)?{...Q(this,th),fetchStatus:"idle"}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Yn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),Q(this,Ka).notify({query:this,type:"updated",action:t})})},h5);function $9(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:D9(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Jae(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var so,m5,eie=(m5=class extends gm{constructor(t={}){super();jt(this,so);this.config=t,et(this,so,new Map)}build(t,r,n){const a=r.queryKey,i=r.queryHash??SE(a,r);let o=this.get(i);return o||(o=new Xae({cache:this,queryKey:a,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){Q(this,so).has(t.queryHash)||(Q(this,so).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=Q(this,so).get(t.queryHash);r&&(t.destroy(),r===t&&Q(this,so).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Yn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Q(this,so).get(t)}getAll(){return[...Q(this,so).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>eI(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>eI(t,n)):r}notify(t){Yn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Yn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Yn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},so=new WeakMap,m5),ao,Fs,Hd,io,ic,p5,tie=(p5=class extends R9{constructor(t){super();jt(this,io);jt(this,ao);jt(this,Fs);jt(this,Hd);this.mutationId=t.mutationId,et(this,Fs,t.mutationCache),et(this,ao,[]),this.state=t.state||L9(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Q(this,ao).includes(t)||(Q(this,ao).push(t),this.clearGcTimeout(),Q(this,Fs).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){et(this,ao,Q(this,ao).filter(r=>r!==t)),this.scheduleGc(),Q(this,Fs).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Q(this,ao).length||(this.state.status==="pending"?this.scheduleGc():Q(this,Fs).remove(this))}continue(){var t;return((t=Q(this,Hd))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,i,o,l,c,d,u,f,h,m,g,x,v,b,y,j,w,N,S,k;et(this,Hd,I9({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(T,C)=>{Yt(this,io,ic).call(this,{type:"failed",failureCount:T,error:C})},onPause:()=>{Yt(this,io,ic).call(this,{type:"pause"})},onContinue:()=>{Yt(this,io,ic).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Q(this,Fs).canRun(this)}));const r=this.state.status==="pending",n=!Q(this,Hd).canStart();try{if(!r){Yt(this,io,ic).call(this,{type:"pending",variables:t,isPaused:n}),await((i=(a=Q(this,Fs).config).onMutate)==null?void 0:i.call(a,t,this));const C=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));C!==this.state.context&&Yt(this,io,ic).call(this,{type:"pending",context:C,variables:t,isPaused:n})}const T=await Q(this,Hd).start();return await((d=(c=Q(this,Fs).config).onSuccess)==null?void 0:d.call(c,T,t,this.state.context,this)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,T,t,this.state.context)),await((m=(h=Q(this,Fs).config).onSettled)==null?void 0:m.call(h,T,null,this.state.variables,this.state.context,this)),await((x=(g=this.options).onSettled)==null?void 0:x.call(g,T,null,t,this.state.context)),Yt(this,io,ic).call(this,{type:"success",data:T}),T}catch(T){try{throw await((b=(v=Q(this,Fs).config).onError)==null?void 0:b.call(v,T,t,this.state.context,this)),await((j=(y=this.options).onError)==null?void 0:j.call(y,T,t,this.state.context)),await((N=(w=Q(this,Fs).config).onSettled)==null?void 0:N.call(w,void 0,T,this.state.variables,this.state.context,this)),await((k=(S=this.options).onSettled)==null?void 0:k.call(S,void 0,T,t,this.state.context)),T}finally{Yt(this,io,ic).call(this,{type:"error",error:T})}}finally{Q(this,Fs).runNext(this)}}},ao=new WeakMap,Fs=new WeakMap,Hd=new WeakMap,io=new WeakSet,ic=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Yn.batch(()=>{Q(this,ao).forEach(n=>{n.onMutationUpdate(t)}),Q(this,Fs).notify({mutation:this,type:"updated",action:t})})},p5);function L9(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ka,rv,g5,rie=(g5=class extends gm{constructor(t={}){super();jt(this,ka);jt(this,rv);this.config=t,et(this,ka,new Map),et(this,rv,Date.now())}build(t,r,n){const a=new tie({mutationCache:this,mutationId:++fy(this,rv)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){const r=Ey(t),n=Q(this,ka).get(r)??[];n.push(t),Q(this,ka).set(r,n),this.notify({type:"added",mutation:t})}remove(t){var n;const r=Ey(t);if(Q(this,ka).has(r)){const a=(n=Q(this,ka).get(r))==null?void 0:n.filter(i=>i!==t);a&&(a.length===0?Q(this,ka).delete(r):Q(this,ka).set(r,a))}this.notify({type:"removed",mutation:t})}canRun(t){var n;const r=(n=Q(this,ka).get(Ey(t)))==null?void 0:n.find(a=>a.state.status==="pending");return!r||r===t}runNext(t){var n;const r=(n=Q(this,ka).get(Ey(t)))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}clear(){Yn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...Q(this,ka).values()].flat()}find(t){const r={exact:!0,...t};return this.getAll().find(n=>tI(r,n))}findAll(t={}){return this.getAll().filter(r=>tI(t,r))}notify(t){Yn.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Yn.batch(()=>Promise.all(t.map(r=>r.continue().catch(Qa))))}},ka=new WeakMap,rv=new WeakMap,g5);function Ey(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function sI(e){return{onFetch:(t,r)=>{var u,f,h,m,g;const n=t.options,a=(h=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let x=!1;const v=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},b=A9(t.options,t.fetchOptions),y=async(j,w,N)=>{if(x)return Promise.reject();if(w==null&&j.pages.length)return Promise.resolve(j);const S={queryKey:t.queryKey,pageParam:w,direction:N?"backward":"forward",meta:t.options.meta};v(S);const k=await b(S),{maxPages:T}=t.options,C=N?Yae:qae;return{pages:C(j.pages,k,T),pageParams:C(j.pageParams,w,T)}};if(a&&i.length){const j=a==="backward",w=j?nie:aI,N={pages:i,pageParams:o},S=w(n,N);l=await y(N,S,j)}else{const j=e??i.length;do{const w=c===0?o[0]??n.initialPageParam:aI(n,l);if(c>0&&w==null)break;l=await y(l,w),c++}while(c<j)}return l};t.options.persister?t.fetchFn=()=>{var x,v;return(v=(x=t.options).persister)==null?void 0:v.call(x,d,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function aI(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function nie(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var xn,yc,bc,rh,nh,jc,sh,ah,x5,sie=(x5=class{constructor(e={}){jt(this,xn);jt(this,yc);jt(this,bc);jt(this,rh);jt(this,nh);jt(this,jc);jt(this,sh);jt(this,ah);et(this,xn,e.queryCache||new eie),et(this,yc,e.mutationCache||new rie),et(this,bc,e.defaultOptions||{}),et(this,rh,new Map),et(this,nh,new Map),et(this,jc,0)}mount(){fy(this,jc)._++,Q(this,jc)===1&&(et(this,sh,CE.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,xn).onFocus())})),et(this,ah,w0.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,xn).onOnline())})))}unmount(){var e,t;fy(this,jc)._--,Q(this,jc)===0&&((e=Q(this,sh))==null||e.call(this),et(this,sh,void 0),(t=Q(this,ah))==null||t.call(this),et(this,ah,void 0))}isFetching(e){return Q(this,xn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Q(this,yc).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=Q(this,xn).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const r=this.defaultQueryOptions(e),n=Q(this,xn).build(this,r);return e.revalidateIfStale&&n.isStaleByTime($f(r.staleTime,n))&&this.prefetchQuery(r),Promise.resolve(t)}}getQueriesData(e){return Q(this,xn).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=Q(this,xn).get(n.queryHash),i=a==null?void 0:a.state.data,o=Vae(t,i);if(o!==void 0)return Q(this,xn).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return Yn.batch(()=>Q(this,xn).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=Q(this,xn).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=Q(this,xn);Yn.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=Q(this,xn),n={type:"active",...e};return Yn.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries(n,t)))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=Yn.batch(()=>Q(this,xn).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(Qa).catch(Qa)}invalidateQueries(e={},t={}){return Yn.batch(()=>{if(Q(this,xn).findAll(e).forEach(n=>{n.invalidate()}),e.refetchType==="none")return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e={},t){const r={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},n=Yn.batch(()=>Q(this,xn).findAll(e).filter(a=>!a.isDisabled()).map(a=>{let i=a.fetch(void 0,r);return r.throwOnError||(i=i.catch(Qa)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Qa)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=Q(this,xn).build(this,t);return r.isStaleByTime($f(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qa).catch(Qa)}fetchInfiniteQuery(e){return e.behavior=sI(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Qa).catch(Qa)}ensureInfiniteQueryData(e){return e.behavior=sI(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return w0.isOnline()?Q(this,yc).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,xn)}getMutationCache(){return Q(this,yc)}getDefaultOptions(){return Q(this,bc)}setDefaultOptions(e){et(this,bc,e)}setQueryDefaults(e,t){Q(this,rh).set(mu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Q(this,rh).values()];let r={};return t.forEach(n=>{$g(e,n.queryKey)&&(r={...r,...n.defaultOptions})}),r}setMutationDefaults(e,t){Q(this,nh).set(mu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Q(this,nh).values()];let r={};return t.forEach(n=>{$g(e,n.mutationKey)&&(r={...r,...n.defaultOptions})}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Q(this,bc).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=SE(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===kE&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Q(this,bc).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Q(this,xn).clear(),Q(this,yc).clear()}},xn=new WeakMap,yc=new WeakMap,bc=new WeakMap,rh=new WeakMap,nh=new WeakMap,jc=new WeakMap,sh=new WeakMap,ah=new WeakMap,x5),ca,ar,nv,Bs,qd,ih,wc,oo,sv,oh,lh,Yd,Gd,Nc,ch,Cr,zp,FC,BC,UC,zC,WC,VC,HC,F9,v5,aie=(v5=class extends gm{constructor(t,r){super();jt(this,Cr);jt(this,ca);jt(this,ar);jt(this,nv);jt(this,Bs);jt(this,qd);jt(this,ih);jt(this,wc);jt(this,oo);jt(this,sv);jt(this,oh);jt(this,lh);jt(this,Yd);jt(this,Gd);jt(this,Nc);jt(this,ch,new Set);this.options=r,et(this,ca,t),et(this,oo,null),et(this,wc,LC()),this.options.experimental_prefetchInRender||Q(this,wc).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Q(this,ar).addObserver(this),iI(Q(this,ar),this.options)?Yt(this,Cr,zp).call(this):this.updateResult(),Yt(this,Cr,zC).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qC(Q(this,ar),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qC(Q(this,ar),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Yt(this,Cr,WC).call(this),Yt(this,Cr,VC).call(this),Q(this,ar).removeObserver(this)}setOptions(t,r){const n=this.options,a=Q(this,ar);if(this.options=Q(this,ca).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _i(this.options.enabled,Q(this,ar))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Yt(this,Cr,HC).call(this),Q(this,ar).setOptions(this.options),n._defaulted&&!j0(this.options,n)&&Q(this,ca).getQueryCache().notify({type:"observerOptionsUpdated",query:Q(this,ar),observer:this});const i=this.hasListeners();i&&oI(Q(this,ar),a,this.options,n)&&Yt(this,Cr,zp).call(this),this.updateResult(r),i&&(Q(this,ar)!==a||_i(this.options.enabled,Q(this,ar))!==_i(n.enabled,Q(this,ar))||$f(this.options.staleTime,Q(this,ar))!==$f(n.staleTime,Q(this,ar)))&&Yt(this,Cr,FC).call(this);const o=Yt(this,Cr,BC).call(this);i&&(Q(this,ar)!==a||_i(this.options.enabled,Q(this,ar))!==_i(n.enabled,Q(this,ar))||o!==Q(this,Nc))&&Yt(this,Cr,UC).call(this,o)}getOptimisticResult(t){const r=Q(this,ca).getQueryCache().build(Q(this,ca),t),n=this.createResult(r,t);return oie(this,n)&&(et(this,Bs,n),et(this,ih,this.options),et(this,qd,Q(this,ar).state)),n}getCurrentResult(){return Q(this,Bs)}trackResult(t,r){const n={};return Object.keys(t).forEach(a=>{Object.defineProperty(n,a,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(a),r==null||r(a),t[a])})}),n}trackProp(t){Q(this,ch).add(t)}getCurrentQuery(){return Q(this,ar)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=Q(this,ca).defaultQueryOptions(t),n=Q(this,ca).getQueryCache().build(Q(this,ca),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Yt(this,Cr,zp).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Q(this,Bs)))}createResult(t,r){var T;const n=Q(this,ar),a=this.options,i=Q(this,Bs),o=Q(this,qd),l=Q(this,ih),d=t!==n?t.state:Q(this,nv),{state:u}=t;let f={...u},h=!1,m;if(r._optimisticResults){const C=this.hasListeners(),E=!C&&iI(t,r),P=C&&oI(t,n,r,a);(E||P)&&(f={...f,...$9(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:x,status:v}=f;if(r.select&&f.data!==void 0)if(i&&f.data===(o==null?void 0:o.data)&&r.select===Q(this,sv))m=Q(this,oh);else try{et(this,sv,r.select),m=r.select(f.data),m=$C(i==null?void 0:i.data,m,r),et(this,oh,m),et(this,oo,null)}catch(C){et(this,oo,C)}else m=f.data;if(r.placeholderData!==void 0&&m===void 0&&v==="pending"){let C;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData))C=i.data;else if(C=typeof r.placeholderData=="function"?r.placeholderData((T=Q(this,lh))==null?void 0:T.state.data,Q(this,lh)):r.placeholderData,r.select&&C!==void 0)try{C=r.select(C),et(this,oo,null)}catch(E){et(this,oo,E)}C!==void 0&&(v="success",m=$C(i==null?void 0:i.data,C,r),h=!0)}Q(this,oo)&&(g=Q(this,oo),m=Q(this,oh),x=Date.now(),v="error");const b=f.fetchStatus==="fetching",y=v==="pending",j=v==="error",w=y&&b,N=m!==void 0,k={status:v,fetchStatus:f.fetchStatus,isPending:y,isSuccess:v==="success",isError:j,isInitialLoading:w,isLoading:w,data:m,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:x,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>d.dataUpdateCount||f.errorUpdateCount>d.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:j&&!N,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:j&&N,isStale:TE(t,r),refetch:this.refetch,promise:Q(this,wc)};if(this.options.experimental_prefetchInRender){const C=_=>{k.status==="error"?_.reject(k.error):k.data!==void 0&&_.resolve(k.data)},E=()=>{const _=et(this,wc,k.promise=LC());C(_)},P=Q(this,wc);switch(P.status){case"pending":t.queryHash===n.queryHash&&C(P);break;case"fulfilled":(k.status==="error"||k.data!==P.value)&&E();break;case"rejected":(k.status!=="error"||k.error!==P.reason)&&E();break}}return k}updateResult(t){const r=Q(this,Bs),n=this.createResult(Q(this,ar),this.options);if(et(this,qd,Q(this,ar).state),et(this,ih,this.options),Q(this,qd).data!==void 0&&et(this,lh,Q(this,ar)),j0(n,r))return;et(this,Bs,n);const a={},i=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!Q(this,ch).size)return!0;const c=new Set(l??Q(this,ch));return this.options.throwOnError&&c.add("error"),Object.keys(Q(this,Bs)).some(d=>{const u=d;return Q(this,Bs)[u]!==r[u]&&c.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(a.listeners=!0),Yt(this,Cr,F9).call(this,{...a,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Yt(this,Cr,zC).call(this)}},ca=new WeakMap,ar=new WeakMap,nv=new WeakMap,Bs=new WeakMap,qd=new WeakMap,ih=new WeakMap,wc=new WeakMap,oo=new WeakMap,sv=new WeakMap,oh=new WeakMap,lh=new WeakMap,Yd=new WeakMap,Gd=new WeakMap,Nc=new WeakMap,ch=new WeakMap,Cr=new WeakSet,zp=function(t){Yt(this,Cr,HC).call(this);let r=Q(this,ar).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Qa)),r},FC=function(){Yt(this,Cr,WC).call(this);const t=$f(this.options.staleTime,Q(this,ar));if(hu||Q(this,Bs).isStale||!IC(t))return;const n=E9(Q(this,Bs).dataUpdatedAt,t)+1;et(this,Yd,setTimeout(()=>{Q(this,Bs).isStale||this.updateResult()},n))},BC=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Q(this,ar)):this.options.refetchInterval)??!1},UC=function(t){Yt(this,Cr,VC).call(this),et(this,Nc,t),!(hu||_i(this.options.enabled,Q(this,ar))===!1||!IC(Q(this,Nc))||Q(this,Nc)===0)&&et(this,Gd,setInterval(()=>{(this.options.refetchIntervalInBackground||CE.isFocused())&&Yt(this,Cr,zp).call(this)},Q(this,Nc)))},zC=function(){Yt(this,Cr,FC).call(this),Yt(this,Cr,UC).call(this,Yt(this,Cr,BC).call(this))},WC=function(){Q(this,Yd)&&(clearTimeout(Q(this,Yd)),et(this,Yd,void 0))},VC=function(){Q(this,Gd)&&(clearInterval(Q(this,Gd)),et(this,Gd,void 0))},HC=function(){const t=Q(this,ca).getQueryCache().build(Q(this,ca),this.options);if(t===Q(this,ar))return;const r=Q(this,ar);et(this,ar,t),et(this,nv,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},F9=function(t){Yn.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(Q(this,Bs))}),Q(this,ca).getQueryCache().notify({query:Q(this,ar),type:"observerResultsUpdated"})})},v5);function iie(e,t){return _i(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function iI(e,t){return iie(e,t)||e.state.data!==void 0&&qC(e,t,t.refetchOnMount)}function qC(e,t,r){if(_i(t.enabled,e)!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&TE(e,t)}return!1}function oI(e,t,r,n){return(e!==t||_i(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&TE(e,r)}function TE(e,t){return _i(t.enabled,e)!==!1&&e.isStaleByTime($f(t.staleTime,e))}function oie(e,t){return!j0(e.getCurrentResult(),t)}var Sc,kc,da,ol,_l,Tb,YC,y5,lie=(y5=class extends gm{constructor(r,n){super();jt(this,_l);jt(this,Sc);jt(this,kc);jt(this,da);jt(this,ol);et(this,Sc,r),this.setOptions(n),this.bindMethods(),Yt(this,_l,Tb).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var a;const n=this.options;this.options=Q(this,Sc).defaultMutationOptions(r),j0(this.options,n)||Q(this,Sc).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Q(this,da),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&mu(n.mutationKey)!==mu(this.options.mutationKey)?this.reset():((a=Q(this,da))==null?void 0:a.state.status)==="pending"&&Q(this,da).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=Q(this,da))==null||r.removeObserver(this)}onMutationUpdate(r){Yt(this,_l,Tb).call(this),Yt(this,_l,YC).call(this,r)}getCurrentResult(){return Q(this,kc)}reset(){var r;(r=Q(this,da))==null||r.removeObserver(this),et(this,da,void 0),Yt(this,_l,Tb).call(this),Yt(this,_l,YC).call(this)}mutate(r,n){var a;return et(this,ol,n),(a=Q(this,da))==null||a.removeObserver(this),et(this,da,Q(this,Sc).getMutationCache().build(Q(this,Sc),this.options)),Q(this,da).addObserver(this),Q(this,da).execute(r)}},Sc=new WeakMap,kc=new WeakMap,da=new WeakMap,ol=new WeakMap,_l=new WeakSet,Tb=function(){var n;const r=((n=Q(this,da))==null?void 0:n.state)??L9();et(this,kc,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},YC=function(r){Yn.batch(()=>{var n,a,i,o,l,c,d,u;if(Q(this,ol)&&this.hasListeners()){const f=Q(this,kc).variables,h=Q(this,kc).context;(r==null?void 0:r.type)==="success"?((a=(n=Q(this,ol)).onSuccess)==null||a.call(n,r.data,f,h),(o=(i=Q(this,ol)).onSettled)==null||o.call(i,r.data,null,f,h)):(r==null?void 0:r.type)==="error"&&((c=(l=Q(this,ol)).onError)==null||c.call(l,r.error,f,h),(u=(d=Q(this,ol)).onSettled)==null||u.call(d,void 0,r.error,f,h))}this.listeners.forEach(f=>{f(Q(this,kc))})})},y5),B9=p.createContext(void 0),ld=e=>{const t=p.useContext(B9);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},cie=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(B9.Provider,{value:e,children:t})),U9=p.createContext(!1),die=()=>p.useContext(U9);U9.Provider;function uie(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var fie=p.createContext(uie()),hie=()=>p.useContext(fie);function z9(e,t){return typeof e=="function"?e(...t):!!e}function GC(){}var mie=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},pie=e=>{p.useEffect(()=>{e.clearReset()},[e])},gie=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&z9(r,[e.error,n]),xie=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},vie=(e,t)=>e.isLoading&&e.isFetching&&!t,yie=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,lI=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function bie(e,t,r){var u,f,h,m,g;const n=ld(),a=die(),i=hie(),o=n.defaultQueryOptions(e);(f=(u=n.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||f.call(u,o),o._optimisticResults=a?"isRestoring":"optimistic",xie(o),mie(o,i),pie(i);const l=!n.getQueryCache().get(o.queryHash),[c]=p.useState(()=>new t(n,o)),d=c.getOptimisticResult(o);if(p.useSyncExternalStore(p.useCallback(x=>{const v=a?GC:c.subscribe(Yn.batchCalls(x));return c.updateResult(),v},[c,a]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setOptions(o,{listeners:!1})},[o,c]),yie(o,d))throw lI(o,c,i);if(gie({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:n.getQueryCache().get(o.queryHash)}))throw d.error;if((m=(h=n.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||m.call(h,o,d),o.experimental_prefetchInRender&&!hu&&vie(d,a)){const x=l?lI(o,c,i):(g=n.getQueryCache().get(o.queryHash))==null?void 0:g.promise;x==null||x.catch(GC).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?d:c.trackResult(d)}function ut(e,t){return bie(e,aie)}function dt(e,t){const r=ld(),[n]=p.useState(()=>new lie(r,e));p.useEffect(()=>{n.setOptions(e)},[n,e]);const a=p.useSyncExternalStore(p.useCallback(o=>n.subscribe(Yn.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=p.useCallback((o,l)=>{n.mutate(o,l).catch(GC)},[n]);if(a.error&&z9(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}async function W9(e){if(!e.ok){const t=await e.text()||e.statusText;
48try{const r=JSON.parse(t);if(r.message)throw new Error(r.message)}catch(r){if(r instanceof Error&&r.message!==t)throw r}throw new Error(`${e.status}: ${t}`)}}async function Ue(e,t,r){console.log(`[apiRequest] ${e} ${t} starting`);try{const n=await fetch(t,{method:e,headers:r?{"Content-Type":"application/json"}:{},body:r?JSON.stringify(r):void 0,credentials:"include"});if(console.log(`[apiRequest] ${e} ${t} response status:`,n.status),n.ok)console.log(`[apiRequest] ${e} ${t} successful`);else{console.error(`[apiRequest] ${e} ${t} error status:`,n.status);try{const i=await n.clone().text();console.error(`[apiRequest] ${e} ${t} error body:`,i)}catch(a){console.error(`[apiRequest] ${e} ${t} error body could not be read:`,a)}}return await W9(n),n}catch(n){throw console.error(`[apiRequest] ${e} ${t} exception:`,n),n}}const jie=({on401:e})=>async({queryKey:t})=>{console.log(`[queryFn] Fetching ${t[0]}`);try{const r=await fetch(t[0],{credentials:"include"});if(console.log(`[queryFn] ${t[0]} response status:`,r.status),r.status===401&&(console.warn(`[queryFn] ${t[0]} received unauthorized (401) response`),e==="returnNull"))return null;if(!r.ok)try{const i=await r.clone().text();console.error(`[queryFn] ${t[0]} error body:`,i)}catch(a){console.error(`[queryFn] ${t[0]} error body could not be read:`,a)}await W9(r);const n=await r.json();return console.log(`[queryFn] ${t[0]} data:`,n),n}catch(r){throw console.error(`[queryFn] ${t[0]} exception:`,r),r}},Wt=new sie({defaultOptions:{queries:{queryFn:jie({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:5*60*1e3,retry:!1},mutations:{retry:!1}}}),wie=1,Nie=1e6;let pS=0;function Sie(){return pS=(pS+1)%Number.MAX_SAFE_INTEGER,pS.toString()}const gS=new Map,cI=e=>{if(gS.has(e))return;const t=setTimeout(()=>{gS.delete(e),ig({type:"REMOVE_TOAST",toastId:e})},Nie);gS.set(e,t)},kie=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,wie)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?cI(r):e.toasts.forEach(n=>{cI(n.id)}),{...e,toasts:e.toasts.map(n=>
48n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},_b=[];let Pb={toasts:[]};function ig(e){Pb=kie(Pb,e),_b.forEach(t=>{t(Pb)})}function Hn({...e}){const t=Sie(),r=a=>ig({type:"UPDATE_TOAST",toast:{...a,id:t}}),n=()=>ig({type:"DISMISS_TOAST",toastId:t});return ig({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||n()}}}),{id:t,dismiss:n,update:r}}function Qt(){const[e,t]=p.useState(Pb);return p.useEffect(()=>(_b.push(t),()=>{const r=_b.indexOf(t);r>-1&&_b.splice(r,1)}),[e]),{...e,toast:Hn,dismiss:r=>ig({type:"DISMISS_TOAST",toastId:r})}}function $e(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Cie(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Vw(...e){return t=>e.forEach(r=>Cie(r,t))}function Ft(...e){return p.useCallback(Vw(...e),e)}function Tie(e,t=[]){let r=[];function n(i,o){const l=p.createContext(o),c=r.length;r=[...r,o];function d(f){const{scope:h,children:m,...g}=f,x=(h==null?void 0:h[e][c])||l,v=p.useMemo(()=>g,Object.values(g));return s.jsx(x.Provider,{value:v,children:m})}function u(f,h){const m=(h==null?void 0:h[e][c])||l,g=p.useContext(m);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return d.displayName=i+"Provider",[d,u]}const a=()=>{const i=r.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 a.scopeName=e,[n,_ie(a,...t)]}function _ie(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((l,{useScope:c,scopeName:d})=>{const f=c(i)[`__scope${d}`];return{...l,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var $o=p.forwardRef((e,t)=>{const{children:r,...n}=e,a=p.Children.toArray(r),i=a.find(Pie);if(i){const o=i.props.children,l=a.map(c=>c===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:c);return s.jsx(KC,{...n,ref:t,children:p.isValidElement(o)?p.cloneElement(o,void 0,l):null})}return s.jsx(KC,{...n,ref:t,children:r})});$o.displayName="Slot";var KC=p.forwardRef((e,t)=>{const{children:r,...n}=e;if(p.isValidElement(r)){const a=Oie(r);return p.cloneElement(r,{...Eie(n,r.props),ref:t?Vw(t,a):a})}return p.Children.count(r)>1?p.Children.only(null):null});KC.displayName="SlotClone";var V9=({children:e})=>s.jsx(s.Fragment,{children:e});function Pie(e){return p.isValidElement(e)&&e.type===V9}function Eie(e,t){const r={...t};for(const n in t){const a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...l)=>{i(...l),a(...l)}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function Oie(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function dv(e){const t=e+"CollectionProvider",[r,n]=Tie(t),[a,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:g,children:x}=m,v=O.useRef(null),b=O.useRef(new Map).current;return s.jsx(a,{scope:g,itemMap:b,collectionRef:v,children:x})};o.displayName=t;const l=e+"CollectionSlot",c=O.forwardRef((m,g)=>{const{scope:x,children:v}=m,b=i(l,x),y=Ft(g,b.collectionRef);return s.jsx($o,{ref:y,children:v})});c.displayName=l;const d=e+"CollectionItemSlot",u="data-radix-collection-item",f=O.forwardRef((m,g)=>{const{scope:x,children:v,...b}=m,y=O.useRef(null),j=Ft(g,y),w=i(d,x);return O.useEffect(()=>(w.itemMap.set(y,{ref:y,...b}),()=>void w.itemMap.delete(y))),s.jsx($o,{[u]:"",ref:j,children:v})});f.displayName=d;function h(m){const g=i(e+"CollectionConsumer",m);return O.useCallback(()=>{const v=g.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${u}]`));return Array.from(g.itemMap.values()).sort((w,N)=>b.indexOf(w.ref.current)-b.indexOf(N.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},h,n]}function Aie(e,t){const r=p.createContext(t),n=i=>{const{children:o,...l}=i,c=p.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:c,children:o})};n.displayName=e+"Provider";function a(i){const o=p.useContext(r);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,a]}function Is(e,t=[]){let r=[];function n(i,o){const l=p.createContext(o),c=r.length;r=[...r,o];const d=f=>{var b;const{scope:h,children:m,...g}=f,x=((b=h==null?void 0:h[e])==null?void 0:b[c])||l,v=p.useMemo(()=>g,Object.values(g));return s.jsx(x.Provider,{value:v,children:m})};d.displayName=i+"Provider";function u(f,h){var x;const m=((x=h==null?void 0:h[e])==null?void 0:x[c])||l,g=p.useContext(m);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[d,u]}const a=()=>{const i=r.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 a.scopeName=e,[n,Die(a,...t)]}function Die(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));
vendor: 4,590 bytes, line 48
48return function(i){const o=n.reduce((l,{useScope:c,scopeName:d})=>{const f=c(i)[`__scope${d}`];return{...l,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var Mie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ke=Mie.reduce((e,t)=>{const r=p.forwardRef((n,a)=>{const{asChild:i,...o}=n,l=i?$o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(l,{...o,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _E(e,t){e&&Li.flushSync(()=>e.dispatchEvent(t))}function nn(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function Iie(e,t=globalThis==null?void 0:globalThis.document){const r=nn(e);p.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Rie="DismissableLayer",QC="dismissableLayer.update",$ie="dismissableLayer.pointerDownOutside",Lie="dismissableLayer.focusOutside",dI,H9=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xm=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,d=p.useContext(H9),[u,f]=p.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=p.useState({}),g=Ft(t,k=>f(k)),x=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=x.indexOf(v),y=u?x.indexOf(u):-1,j=d.layersWithOutsidePointerEventsDisabled.size>0,w=y>=b,N=Bie(k=>{const T=k.target,C=[...d.branches].some(E=>E.contains(T));!w||C||(a==null||a(k),o==null||o(k),k.defaultPrevented||l==null||l())},h),S=Uie(k=>{const T=k.target;[...d.branches].some(E=>E.contains(T))||(i==null||i(k),o==null||o(k),k.defaultPrevented||l==null||l())},h);return Iie(k=>{y===d.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},h),p.useEffect(()=>{if(u)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(dI=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),uI(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=dI)}},[u,h,r,d]),p.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),uI())},[u,d]),p.useEffect(()=>{const k=()=>m({});return document.addEventListener(QC,k),()=>document.removeEventListener(QC,k)},[]),s.jsx(Ke.div,{...c,ref:g,style:{pointerEvents:j?w?"auto":"none":void 0,...e.style},onFocusCapture:$e(e.onFocusCapture,S.onFocusCapture),onBlurCapture:$e(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:$e(e.onPointerDownCapture,N.onPointerDownCapture)})});xm.displayName=Rie;var Fie="DismissableLayerBranch",q9=p.forwardRef((e,t)=>{const r=p.useContext(H9),n=p.useRef(null),a=Ft(t,n);return p.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),s.jsx(Ke.div,{...e,ref:a})});q9.displayName=Fie;function Bie(e,t=globalThis==null?void 0:globalThis.document){const r=nn(e),n=p.useRef(!1),a=p.useRef(()=>{});return p.useEffect(()=>{const i=l=>{if(l.target&&!n.current){let c=function(){Y9($ie,r,d,{discrete:!0})};const d={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);n.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Uie(e,t=globalThis==null?void 0:globalThis.document){const r=nn(e),n=p.useRef(!1);return p.useEffect(()=>{const a=i=>{i.target&&!n.current&&Y9(Lie,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function uI(){const e=new CustomEvent(QC);document.dispatchEvent(e)}function Y9(e,t,r,{discrete:n}){const a=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?_E(a,i):a.dispatchEvent(i)}var zie=xm,Wie=q9,Bn=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},Vie="Portal",vm=p.forwardRef((e,t)=>
48{var l;const{container:r,...n}=e,[a,i]=p.useState(!1);Bn(()=>i(!0),[]);const o=r||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Rf.createPortal(s.jsx(Ke.div,{...n,ref:t}),o):null});vm.displayName=Vie;function Hie(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var Jn=e=>{const{present:t,children:r}=e,n=qie(t),a=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),i=Ft(n.ref,Yie(a));return typeof r=="function"||n.isPresent?p.cloneElement(a,{ref:i}):null};Jn.displayName="Presence";function qie(e){const[t,r]=p.useState(),n=p.useRef({}),a=p.useRef(e),i=p.useRef("none"),o=e?"mounted":"unmounted",[l,c]=Hie(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const d=Oy(n.current);i.current=l==="mounted"?d:"none"},[l]),Bn(()=>{const d=n.current,u=a.current;if(u!==e){const h=i.current,m=Oy(d);e?c("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(u&&h!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),Bn(()=>{if(t){let d;const u=t.ownerDocument.defaultView??window,f=m=>{const x=Oy(n.current).includes(m.animationName);if(m.target===t&&x&&(c("ANIMATION_END"),!a.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(i.current=Oy(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(d=>{d&&(n.current=getComputedStyle(d)),r(d)},[])}}function Oy(e){return(e==null?void 0:e.animationName)||"none"}function Yie(e){var n,a;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function xs({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,a]=Gie({defaultProp:t,onChange:r}),i=e!==void 0,o=i?e:n,l=nn(r),c=p.useCallback(d=>{if(i){const f=typeof d=="function"?d(e):d;f!==e&&l(f)}else a(d)},[i,e,a,l]);return[o,c]}function Gie({defaultProp:e,onChange:t}){const r=p.useState(e),[n]=r,a=p.useRef(n),i=nn(t);return p.useEffect(()=>{a.current!==n&&(i(n),a.current=n)},[n,a,i]),r}var Kie="VisuallyHidden",Hw=p.forwardRef((e,t)=>s.jsx(Ke.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Hw.displayName=Kie;var PE="ToastProvider",[EE,Qie,Zie]=dv("Toast"),[G9,VQe]=Is("Toast",[Zie]),[Xie,qw]=G9(PE),K9=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:a="right",swipeThreshold:i=50,children:o}=e,[l,c]=p.useState(null),[d,u]=p.useState(0),f=p.useRef(!1),h=p.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${PE}\`. Expected non-empty \`string\`.`),s.jsx(EE.Provider,{scope:t,children:s.jsx(Xie,{scope:t,label:r,duration:n,swipeDirection:a,swipeThreshold:i,toastCount:d,viewport:l,onViewportChange:c,onToastAdd:p.useCallback(()=>u(m=>m+1),[]),onToastRemove:p.useCallback(()=>u(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:o})})};K9.displayName=PE;var Q9="ToastViewport",Jie=["F8"],ZC="toast.viewportPause",XC="toast.viewportResume",Z9=p.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Jie,label:a="Notifications ({hotkey})",...i}=e,o=qw(Q9,r),l=Qie(r),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),f=p.useRef(null),h=Ft(t,f,o.onViewportChange),m=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;p.useEffect(()=>{const v=b=>{var j;n.length!==0&&n.every(w=>b[w]||b.code===w)&&((j=f.current)==null||j.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]),p.useEffect(()=>{const v=c.current,b=f.current;if(g&&v&&b){const y=()=>
48{if(!o.isClosePausedRef.current){const S=new CustomEvent(ZC);b.dispatchEvent(S),o.isClosePausedRef.current=!0}},j=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(XC);b.dispatchEvent(S),o.isClosePausedRef.current=!1}},w=S=>{!v.contains(S.relatedTarget)&&j()},N=()=>{v.contains(document.activeElement)||j()};return v.addEventListener("focusin",y),v.addEventListener("focusout",w),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",N),window.addEventListener("blur",y),window.addEventListener("focus",j),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",w),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",N),window.removeEventListener("blur",y),window.removeEventListener("focus",j)}}},[g,o.isClosePausedRef]);const x=p.useCallback(({tabbingDirection:v})=>{const y=l().map(j=>{const w=j.ref.current,N=[w,...foe(w)];return v==="forwards"?N:N.reverse()});return(v==="forwards"?y.reverse():y).flat()},[l]);return p.useEffect(()=>{const v=f.current;if(v){const b=y=>{var N,S,k;const j=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!j){const T=document.activeElement,C=y.shiftKey;if(y.target===v&&C){(N=d.current)==null||N.focus();return}const _=x({tabbingDirection:C?"backwards":"forwards"}),I=_.findIndex(F=>F===T);xS(_.slice(I+1))?y.preventDefault():C?(S=d.current)==null||S.focus():(k=u.current)==null||k.focus()}};return v.addEventListener("keydown",b),()=>v.removeEventListener("keydown",b)}},[l,x]),s.jsxs(Wie,{ref:c,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&s.jsx(JC,{ref:d,onFocusFromOutsideViewport:()=>{const v=x({tabbingDirection:"forwards"});xS(v)}}),s.jsx(EE.Slot,{scope:r,children:s.jsx(Ke.ol,{tabIndex:-1,...i,ref:h})}),g&&s.jsx(JC,{ref:u,onFocusFromOutsideViewport:()=>{const v=x({tabbingDirection:"backwards"});xS(v)}})]})});Z9.displayName=Q9;var X9="ToastFocusProxy",JC=p.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...a}=e,i=qw(X9,r);return s.jsx(Hw,{"aria-hidden":!0,tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:o=>{var d;const l=o.relatedTarget;!((d=i.viewport)!=null&&d.contains(l))&&n()}})});JC.displayName=X9;var Yw="Toast",eoe="toast.swipeStart",toe="toast.swipeMove",roe="toast.swipeCancel",noe="toast.swipeEnd",J9=p.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:a,onOpenChange:i,...o}=e,[l=!0,c]=xs({prop:n,defaultProp:a,onChange:i});return s.jsx(Jn,{present:r||l,children:s.jsx(ioe,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:nn(e.onPause),onResume:nn(e.onResume),onSwipeStart:$e(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:$e(e.onSwipeMove,d=>{const{x:u,y:f}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:$e(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:$e(e.onSwipeEnd,d=>{const{x:u,y:f}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});J9.displayName=Yw;var[soe,aoe]=G9(Yw,{onClose(){}}),ioe=p.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:a,open:i,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:d,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:m,...g}=e,x=qw(Yw,r),[v,b]=p.useState(null),y=Ft(t,F=>b(F)),j=p.useRef(null),w=p.useRef(null),N=a||x.duration,S=p.useRef(0),k=p.useRef(N),T=p.useRef(0),{onToastAdd:C,onToastRemove:E}=x,P=nn(()=>{var H;(v==null?void 0:v.contains(document.activeElement))&&((H=x.viewport)==null||H.focus()),o()}),_=p.useCallback(F=>
vendor: 4,548 bytes, line 48
48{!F||F===1/0||(window.clearTimeout(T.current),S.current=new Date().getTime(),T.current=window.setTimeout(P,F))},[P]);p.useEffect(()=>{const F=x.viewport;if(F){const H=()=>{_(k.current),d==null||d()},W=()=>{const z=new Date().getTime()-S.current;k.current=k.current-z,window.clearTimeout(T.current),c==null||c()};return F.addEventListener(ZC,W),F.addEventListener(XC,H),()=>{F.removeEventListener(ZC,W),F.removeEventListener(XC,H)}}},[x.viewport,N,c,d,_]),p.useEffect(()=>{i&&!x.isClosePausedRef.current&&_(N)},[i,N,x.isClosePausedRef,_]),p.useEffect(()=>(C(),()=>E()),[C,E]);const I=p.useMemo(()=>v?iW(v):null,[v]);return x.viewport?s.jsxs(s.Fragment,{children:[I&&s.jsx(ooe,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:I}),s.jsx(soe,{scope:r,onClose:P,children:Li.createPortal(s.jsx(EE.ItemSlot,{scope:r,children:s.jsx(zie,{asChild:!0,onEscapeKeyDown:$e(l,()=>{x.isFocusedToastEscapeKeyDownRef.current||P(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(Ke.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":x.swipeDirection,...g,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:$e(e.onKeyDown,F=>{F.key==="Escape"&&(l==null||l(F.nativeEvent),F.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,P()))}),onPointerDown:$e(e.onPointerDown,F=>{F.button===0&&(j.current={x:F.clientX,y:F.clientY})}),onPointerMove:$e(e.onPointerMove,F=>{if(!j.current)return;const H=F.clientX-j.current.x,W=F.clientY-j.current.y,z=!!w.current,R=["left","right"].includes(x.swipeDirection),q=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,V=R?q(0,H):0,se=R?0:q(0,W),oe=F.pointerType==="touch"?10:2,_e={x:V,y:se},U={originalEvent:F,delta:_e};z?(w.current=_e,Ay(toe,f,U,{discrete:!1})):fI(_e,x.swipeDirection,oe)?(w.current=_e,Ay(eoe,u,U,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(H)>oe||Math.abs(W)>oe)&&(j.current=null)}),onPointerUp:$e(e.onPointerUp,F=>{const H=w.current,W=F.target;if(W.hasPointerCapture(F.pointerId)&&W.releasePointerCapture(F.pointerId),w.current=null,j.current=null,H){const z=F.currentTarget,R={originalEvent:F,delta:H};fI(H,x.swipeDirection,x.swipeThreshold)?Ay(noe,m,R,{discrete:!0}):Ay(roe,h,R,{discrete:!0}),z.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),ooe=e=>{const{__scopeToast:t,children:r,...n}=e,a=qw(Yw,t),[i,o]=p.useState(!1),[l,c]=p.useState(!1);return doe(()=>o(!0)),p.useEffect(()=>{const d=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(d)},[]),l?null:s.jsx(vm,{asChild:!0,children:s.jsx(Hw,{...n,children:i&&s.jsxs(s.Fragment,{children:[a.label," ",r]})})})},loe="ToastTitle",eW=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return s.jsx(Ke.div,{...n,ref:t})});eW.displayName=loe;var coe="ToastDescription",tW=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return s.jsx(Ke.div,{...n,ref:t})});tW.displayName=coe;var rW="ToastAction",nW=p.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?s.jsx(aW,{altText:r,asChild:!0,children:s.jsx(OE,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${rW}\`. Expected non-empty \`string\`.`),null)});nW.displayName=rW;var sW="ToastClose",OE=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,a=aoe(sW,r);return s.jsx(aW,{asChild:!0,children:s.jsx(Ke.button,{type:"button",...n,ref:t,onClick:$e(e.onClick,a.onClose)})})});OE.displayName=sW;var aW=p.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...a}=e;return s.jsx(Ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...a,ref:t})});function iW(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),uoe(n)){const a=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!a)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...iW(n))}}),t}function Ay(e,t,r,{discrete:n}){const a=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?_E(a,i):a.dispatchEvent(i)}var fI=(e,t,r=0)=>{const n=Math.abs(e.x),a=Math.abs(e.y),i=n>a;return t==="left"||t==="right"?i&&n>r:!i&&a>r};function doe(e=()=>{}){const t=nn(e);Bn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}
vendor: 4,892 bytes, lines 48-93
48function uoe(e){return e.nodeType===e.ELEMENT_NODE}function foe(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function xS(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var hoe=K9,oW=Z9,lW=J9,cW=eW,dW=tW,uW=nW,fW=OE;function hW(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=hW(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function moe(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=hW(e))&&(n&&(n+=" "),n+=t);return n}const hI=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,mI=moe,Mu=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return mI(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(d=>{const u=r==null?void 0:r[d],f=i==null?void 0:i[d];if(u===null)return null;const h=hI(u)||hI(f);return a[d][h]}),l=r&&Object.entries(r).reduce((d,u)=>{let[f,h]=u;return h===void 0||(d[f]=h),d},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((d,u)=>{let{class:f,className:h,...m}=u;return Object.entries(m).every(g=>{let[x,v]=g;return Array.isArray(v)?v.includes({...i,...l}[x]):{...i,...l}[x]===v})?[...d,f,h]:d},[]);return mI(e,o,c,r==null?void 0:r.class,r==null?void 0:r.className)};/** 49 * @license lucide-react v0.453.0 - ISC 50 * 51 * This source code is licensed under the ISC license. 52 * See the LICENSE file in the root directory of this source tree. 53 */const poe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mW=(...e)=>e.filter((t,r,n)=>!!t&&n.indexOf(t)===r).join(" ");/** 54 * @license lucide-react v0.453.0 - ISC 55 * 56 * This source code is licensed under the ISC license. 57 * See the LICENSE file in the root directory of this source tree. 58 */var goe={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"};/** 59 * @license lucide-react v0.453.0 - ISC 60 * 61 * This source code is licensed under the ISC license. 62 * See the LICENSE file in the root directory of this source tree. 63 */const xoe=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:o,...l},c)=>p.createElement("svg",{ref:c,...goe,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:mW("lucide",a),...l},[...o.map(([d,u])=>p.createElement(d,u)),...Array.isArray(i)?i:[i]]));/** 64 * @license lucide-react v0.453.0 - ISC 65 * 66 * This source code is licensed under the ISC license. 67 * See the LICENSE file in the root directory of this source tree. 68 */const Pe=(e,t)=>{const r=p.forwardRef(({className:n,...a},i)=>p.createElement(xoe,{ref:i,iconNode:t,className:mW(`lucide-${poe(e)}`,n),...a}));return r.displayName=`${e}`,r};/** 69 * @license lucide-react v0.453.0 - ISC 70 * 71 * This source code is licensed under the ISC license. 72 * See the LICENSE file in the root directory of this source tree. 73 */const voe=Pe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 74 * @license lucide-react v0.453.0 - ISC 75 * 76 * This source code is licensed under the ISC license. 77 * See the LICENSE file in the root directory of this source tree. 78 */const Gw=Pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 79 * @license lucide-react v0.453.0 - ISC 80 * 81 * This source code is licensed under the ISC license. 82 * See the LICENSE file in the root directory of this source tree. 83 */const AE=Pe("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 84 * @license lucide-react v0.453.0 - ISC 85 * 86 * This source code is licensed under the ISC license. 87 * See the LICENSE file in the root directory of this source tree. 88 */const Si=Pe("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"}]]);/** 89 * @license lucide-react v0.453.0 - ISC 90 * 91 * This source code is licensed under the ISC license. 92 * See the LICENSE file in the root directory of this source tree. 93 */const yoe=Pe("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
93],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 94 * @license lucide-react v0.453.0 - ISC 95 * 96 * This source code is licensed under the ISC license. 97 * See the LICENSE file in the root directory of this source tree. 98 */const Eo=Pe("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/** 99 * @license lucide-react v0.453.0 - ISC 100 * 101 * This source code is licensed under the ISC license. 102 * See the LICENSE file in the root directory of this source tree. 103 */const Lg=Pe("CalendarCheck",[["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:"m9 16 2 2 4-4",key:"19s6y9"}]]);/** 104 * @license lucide-react v0.453.0 - ISC 105 * 106 * This source code is licensed under the ISC license. 107 * See the LICENSE file in the root directory of this source tree. 108 */const Ei=Pe("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"}]]);/** 109 * @license lucide-react v0.453.0 - ISC 110 * 111 * This source code is licensed under the ISC license. 112 * See the LICENSE file in the root directory of this source tree. 113 */const N0=Pe("CalendarOff",[["path",{d:"M4.2 4.2A2 2 0 0 0 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 1.82-1.18",key:"16swn3"}],["path",{d:"M21 15.5V6a2 2 0 0 0-2-2H9.5",key:"yhw86o"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h7",key:"1wap6i"}],["path",{d:"M21 10h-5.5",key:"quycpq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 114 * @license lucide-react v0.453.0 - ISC 115 * 116 * This source code is licensed under the ISC license. 117 * See the LICENSE file in the root directory of this source tree. 118 */const boe=Pe("CalendarX",[["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:"m14 14-4 4",key:"rymu2i"}],["path",{d:"m10 14 4 4",key:"3sz06r"}]]);/** 119 * @license lucide-react v0.453.0 - ISC 120 * 121 * This source code is licensed under the ISC license. 122 * See the LICENSE file in the root directory of this source tree. 123 */const Gt=Pe("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"}]]);/** 124 * @license lucide-react v0.453.0 - ISC 125 * 126 * This source code is licensed under the ISC license. 127 * See the LICENSE file in the root directory of this source tree. 128 */const qc=Pe("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 129 * @license lucide-react v0.453.0 - ISC 130 * 131 * This source code is licensed under the ISC license. 132 * See the LICENSE file in the root directory of this source tree. 133 */const joe=Pe("ChartNoAxesColumnIncreasing",[["line",{x1:"12",x2:"12",y1:"20",y2:"10",key:"1vz5eb"}],["line",{x1:"18",x2:"18",y1:"20",y2:"4",key:"cun8e5"}
133],["line",{x1:"6",x2:"6",y1:"20",y2:"16",key:"hq0ia6"}]]);/** 134 * @license lucide-react v0.453.0 - ISC 135 * 136 * This source code is licensed under the ISC license. 137 * See the LICENSE file in the root directory of this source tree. 138 */const un=Pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 139 * @license lucide-react v0.453.0 - ISC 140 * 141 * This source code is licensed under the ISC license. 142 * See the LICENSE file in the root directory of this source tree. 143 */const Dl=Pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 144 * @license lucide-react v0.453.0 - ISC 145 * 146 * This source code is licensed under the ISC license. 147 * See the LICENSE file in the root directory of this source tree. 148 */const as=Pe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 149 * @license lucide-react v0.453.0 - ISC 150 * 151 * This source code is licensed under the ISC license. 152 * See the LICENSE file in the root directory of this source tree. 153 */const Wi=Pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 154 * @license lucide-react v0.453.0 - ISC 155 * 156 * This source code is licensed under the ISC license. 157 * See the LICENSE file in the root directory of this source tree. 158 */const vh=Pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 159 * @license lucide-react v0.453.0 - ISC 160 * 161 * This source code is licensed under the ISC license. 162 * See the LICENSE file in the root directory of this source tree. 163 */const woe=Pe("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/** 164 * @license lucide-react v0.453.0 - ISC 165 * 166 * This source code is licensed under the ISC license. 167 * See the LICENSE file in the root directory of this source tree. 168 */const sn=Pe("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"}]]);/** 169 * @license lucide-react v0.453.0 - ISC 170 * 171 * This source code is licensed under the ISC license. 172 * See the LICENSE file in the root directory of this source tree. 173 */const Zd=Pe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 174 * @license lucide-react v0.453.0 - ISC 175 * 176 * This source code is licensed under the ISC license. 177 * See the LICENSE file in the root directory of this source tree. 178 */const Aa=Pe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 179 * @license lucide-react v0.453.0 - ISC 180 * 181 * This source code is licensed under the ISC license. 182 * See the LICENSE file in the root directory of this source tree. 183 */const Kw=Pe("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"}]]);/** 184 * @license lucide-react v0.453.0 - ISC 185 * 186 * This source code is licensed under the ISC license. 187 * See the LICENSE file in the root directory of this source tree. 188 */const S0=Pe("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** 189 * @license lucide-react v0.453.0 - ISC 190 * 191 * This source code is licensed under the ISC license. 192 * See the LICENSE file in the root directory of this source tree. 193 */const xl=Pe("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 194 * @license lucide-react v0.453.0 - ISC 195 * 196 * This source code is licensed under the ISC license. 197 * See the LICENSE file in the root directory of this source tree. 198 */const pW=Pe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 199 * @license lucide-react v0.453.0 - ISC 200 * 201 * This source code is licensed under the ISC license. 202 * See the LICENSE file in the root directory of this source tree. 203 */const Noe=Pe("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"}]]);/** 204 * @license lucide-react v0.453.0 - ISC 205 * 206 * This source code is licensed under the ISC license. 207 * See the LICENSE file in the root directory of this source tree. 208 */const Soe=Pe("ClockAlert",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["path",{d:"M16 21.16a10 10 0 1 1 5-13.516",key:"cxo92l"}],["path",{d:"M20 11.5v6",key:"2ei3xq"}],["path",{d:"M20 21.5h.01",key:"1r2dzp"}]]);/** 209 * @license lucide-react v0.453.0 - ISC 210 * 211 * This source code is licensed under the ISC license. 212 * See the LICENSE file in the root directory of this source tree. 213 */const dr=Pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 214 * @license lucide-react v0.453.0 - ISC 215 * 216 * This source code is licensed under the ISC license. 217 * See the LICENSE file in the root directory of this source tree. 218 */const gW=Pe("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** 219 * @license lucide-react v0.453.0 - ISC 220 * 221 * This source code is licensed under the ISC license. 222 * See the LICENSE file in the root directory of this source tree.
223 */const ea=Pe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 224 * @license lucide-react v0.453.0 - ISC 225 * 226 * This source code is licensed under the ISC license. 227 * See the LICENSE file in the root directory of this source tree. 228 */const xW=Pe("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 229 * @license lucide-react v0.453.0 - ISC 230 * 231 * This source code is licensed under the ISC license. 232 * See the LICENSE file in the root directory of this source tree. 233 */const koe=Pe("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 234 * @license lucide-react v0.453.0 - ISC 235 * 236 * This source code is licensed under the ISC license. 237 * See the LICENSE file in the root directory of this source tree. 238 */const Coe=Pe("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"}]]);/** 239 * @license lucide-react v0.453.0 - ISC 240 * 241 * This source code is licensed under the ISC license. 242 * See the LICENSE file in the root directory of this source tree. 243 */const Toe=Pe("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** 244 * @license lucide-react v0.453.0 - ISC 245 * 246 * This source code is licensed under the ISC license. 247 * See the LICENSE file in the root directory of this source tree. 248 */const Zr=Pe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 249 * @license lucide-react v0.453.0 - ISC 250 * 251 * This source code is licensed under the ISC license. 252 * See the LICENSE file in the root directory of this source tree. 253 */const vW=Pe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 254 * @license lucide-react v0.453.0 - ISC 255 * 256 * This source code is licensed under the ISC license. 257 * See the LICENSE file in the root directory of this source tree. 258 */const _oe=Pe("FileJson",[["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 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/** 259 * @license lucide-react v0.453.0 - ISC 260 * 261 * This source code is licensed under the ISC license. 262 * See the LICENSE file in the root directory of this source tree. 263 */const yf=Pe("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"}]]);/** 264 * @license lucide-react v0.453.0 - ISC 265 * 266 * This source code is licensed under the ISC license. 267 * See the LICENSE file in the root directory of this source tree. 268 */const DE=Pe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** 269 * @license lucide-react v0.453.0 - ISC 270 * 271 * This source code is licensed under the ISC license. 272 * See the LICENSE file in the root directory of this source tree. 273 */const pI=Pe("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/** 274 * @license lucide-react v0.453.0 - ISC 275 * 276 * This source code is licensed under the ISC license. 277 * See the LICENSE file in the root directory of this source tree. 278 */const Poe=Pe("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 279 * @license lucide-react v0.453.0 - ISC 280 * 281 * This source code is licensed under the ISC license. 282 * See the LICENSE file in the root directory of this source tree. 283 */const yh=Pe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/** 284 * @license lucide-react v0.453.0 - ISC 285 * 286 * This source code is licensed under the ISC license. 287 * See the LICENSE file in the root directory of this source tree. 288 */const Yc=Pe("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 289 * @license lucide-react v0.453.0 - ISC 290 * 291 * This source code is licensed under the ISC license. 292 * See the LICENSE file in the root directory of this source tree. 293 */const ME=Pe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** 294 * @license lucide-react v0.453.0 - ISC 295 * 296 * This source code is licensed under the ISC license. 297 * See the LICENSE file in the root directory of this source tree. 298 */const Eoe=Pe("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** 299 * @license lucide-react v0.453.0 - ISC 300 * 301 * This source code is licensed under the ISC license. 302 * See the LICENSE file in the root directory of this source tree. 303 */const IE=Pe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 304 * @license lucide-react v0.453.0 - ISC 305 * 306 * This source code is licensed under the ISC license. 307 * See the LICENSE file in the root directory of this source tree. 308 */const vS=Pe("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"}]]);/** 309 * @license lucide-react v0.453.0 - ISC 310 * 311 * This source code is licensed under the ISC license. 312 * See the LICENSE file in the root directory of this source tree. 313 */const eT=Pe("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** 314 * @license lucide-react v0.453.0 - ISC 315 * 316 * This source code is licensed under the ISC license. 317 * See the LICENSE file in the root directory of this source tree. 318 */const Ooe=Pe("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** 319 * @license lucide-react v0.453.0 - ISC 320 * 321 * This source code is licensed under the ISC license. 322 * See the LICENSE file in the root directory of this source tree. 323 */const Aoe=Pe("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/** 324 * @license lucide-react v0.453.0 - ISC 325 * 326 * This source code is licensed under the ISC license. 327 * See the LICENSE file in the root directory of this source tree. 328 */const Doe=Pe("Link2Off",[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** 329 * @license lucide-react v0.453.0 - ISC 330 * 331 * This source code is licensed under the ISC license. 332 * See the LICENSE file in the root directory of this source tree.
333 */const Lf=Pe("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** 334 * @license lucide-react v0.453.0 - ISC 335 * 336 * This source code is licensed under the ISC license. 337 * See the LICENSE file in the root directory of this source tree. 338 */const Ra=Pe("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** 339 * @license lucide-react v0.453.0 - ISC 340 * 341 * This source code is licensed under the ISC license. 342 * See the LICENSE file in the root directory of this source tree. 343 */const Moe=Pe("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"}]]);/** 344 * @license lucide-react v0.453.0 - ISC 345 * 346 * This source code is licensed under the ISC license. 347 * See the LICENSE file in the root directory of this source tree. 348 */const Fg=Pe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 349 * @license lucide-react v0.453.0 - ISC 350 * 351 * This source code is licensed under the ISC license. 352 * See the LICENSE file in the root directory of this source tree. 353 */const Ioe=Pe("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 354 * @license lucide-react v0.453.0 - ISC 355 * 356 * This source code is licensed under the ISC license. 357 * See the LICENSE file in the root directory of this source tree. 358 */const yW=Pe("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"}]]);/** 359 * @license lucide-react v0.453.0 - ISC 360 * 361 * This source code is licensed under the ISC license. 362 * See the LICENSE file in the root directory of this source tree. 363 */const Roe=Pe("MailCheck",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);/** 364 * @license lucide-react v0.453.0 - ISC 365 * 366 * This source code is licensed under the ISC license. 367 * See the LICENSE file in the root directory of this source tree. 368 */const Gc=Pe("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"}]]);/** 369 * @license lucide-react v0.453.0 - ISC 370 * 371 * This source code is licensed under the ISC license. 372 * See the LICENSE file in the root directory of this source tree. 373 */const Oo=Pe("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"}]]);/** 374 * @license lucide-react v0.453.0 - ISC 375 * 376 * This source code is licensed under the ISC license. 377 * See the LICENSE file in the root directory of this source tree. 378 */const bW=Pe("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"}]]);/** 379 * @license lucide-react v0.453.0 - ISC 380 * 381 * This source code is licensed under the ISC license. 382 * See the LICENSE file in the root directory of this source tree. 383 */const yS=Pe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 384 * @license lucide-react v0.453.0 - ISC 385 * 386 * This source code is licensed under the ISC license. 387 * See the LICENSE file in the root directory of this source tree. 388 */const Xd=Pe("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"}]]);/** 389 * @license lucide-react v0.453.0 - ISC 390 * 391 * This source code is licensed under the ISC license. 392 * See the LICENSE file in the root directory of this source tree. 393 */const jW=Pe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 394 * @license lucide-react v0.453.0 - ISC 395 * 396 * This source code is licensed under the ISC license. 397 * See the LICENSE file in the root directory of this source tree. 398 */const $oe=Pe("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** 399 * @license lucide-react v0.453.0 - ISC 400 * 401 * This source code is licensed under the ISC license. 402 * See the LICENSE file in the root directory of this source tree. 403 */const Loe=Pe("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** 404 * @license lucide-react v0.453.0 - ISC 405 * 406 * This source code is licensed under the ISC license. 407 * See the LICENSE file in the root directory of this source tree. 408 */const Foe=Pe("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/** 409 * @license lucide-react v0.453.0 - ISC 410 * 411 * This source code is licensed under the ISC license. 412 * See the LICENSE file in the root directory of this source tree. 413 */const vl=Pe("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 414 * @license lucide-react v0.453.0 - ISC 415 * 416 * This source code is licensed under the ISC license. 417 * See the LICENSE file in the root directory of this source tree. 418 */const wW=Pe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 419 * @license lucide-react v0.453.0 - ISC 420 * 421 * This source code is licensed under the ISC license. 422 * See the LICENSE file in the root directory of this source tree. 423 */const k0=Pe("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}
423],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/** 424 * @license lucide-react v0.453.0 - ISC 425 * 426 * This source code is licensed under the ISC license. 427 * See the LICENSE file in the root directory of this source tree. 428 */const Sr=Pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 429 * @license lucide-react v0.453.0 - ISC 430 * 431 * This source code is licensed under the ISC license. 432 * See the LICENSE file in the root directory of this source tree. 433 */const Boe=Pe("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/** 434 * @license lucide-react v0.453.0 - ISC 435 * 436 * This source code is licensed under the ISC license. 437 * See the LICENSE file in the root directory of this source tree. 438 */const Uoe=Pe("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/** 439 * @license lucide-react v0.453.0 - ISC 440 * 441 * This source code is licensed under the ISC license. 442 * See the LICENSE file in the root directory of this source tree. 443 */const Bg=Pe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 444 * @license lucide-react v0.453.0 - ISC 445 * 446 * This source code is licensed under the ISC license. 447 * See the LICENSE file in the root directory of this source tree. 448 */const RE=Pe("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** 449 * @license lucide-react v0.453.0 - ISC 450 * 451 * This source code is licensed under the ISC license. 452 * See the LICENSE file in the root directory of this source tree. 453 */const zoe=Pe("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 454 * @license lucide-react v0.453.0 - ISC 455 * 456 * This source code is licensed under the ISC license. 457 * See the LICENSE file in the root directory of this source tree. 458 */const jo=Pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 459 * @license lucide-react v0.453.0 - ISC 460 * 461 * This source code is licensed under the ISC license. 462 * See the LICENSE file in the root directory of this source tree. 463 */const Woe=Pe("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** 464 * @license lucide-react v0.453.0 - ISC 465 * 466 * This source code is licensed under the ISC license. 467 * See the LICENSE file in the root directory of this source tree. 468 */const ym=Pe("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"}]]);/** 469 * @license lucide-react v0.453.0 - ISC 470 * 471 * This source code is licensed under the ISC license. 472 * See the LICENSE file in the root directory of this source tree. 473 */const $E=Pe("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 474 * @license lucide-react v0.453.0 - ISC 475 * 476 * This source code is licensed under the ISC license. 477 * See the LICENSE file in the root directory of this source tree. 478 */const NW=Pe("ShieldCheck",[["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
478y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 479 * @license lucide-react v0.453.0 - ISC 480 * 481 * This source code is licensed under the ISC license. 482 * See the LICENSE file in the root directory of this source tree. 483 */const LE=Pe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 484 * @license lucide-react v0.453.0 - ISC 485 * 486 * This source code is licensed under the ISC license. 487 * See the LICENSE file in the root directory of this source tree. 488 */const Voe=Pe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 489 * @license lucide-react v0.453.0 - ISC 490 * 491 * This source code is licensed under the ISC license. 492 * See the LICENSE file in the root directory of this source tree. 493 */const FE=Pe("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"}]]);/** 494 * @license lucide-react v0.453.0 - ISC 495 * 496 * This source code is licensed under the ISC license. 497 * See the LICENSE file in the root directory of this source tree. 498 */const SW=Pe("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** 499 * @license lucide-react v0.453.0 - ISC 500 * 501 * This source code is licensed under the ISC license. 502 * See the LICENSE file in the root directory of this source tree. 503 */const Pr=Pe("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"}]]);/** 504 * @license lucide-react v0.453.0 - ISC 505 * 506 * This source code is licensed under the ISC license. 507 * See the LICENSE file in the root directory of this source tree. 508 */const gI=Pe("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/** 509 * @license lucide-react v0.453.0 - ISC 510 * 511 * This source code is licensed under the ISC license. 512 * See the LICENSE file in the root directory of this source tree. 513 */const tT=Pe("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 514 * @license lucide-react v0.453.0 - ISC 515 * 516 * This source code is licensed under the ISC license. 517 * See the LICENSE file in the root directory of this source tree. 518 */const C0=Pe("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"}]]);/** 519 * @license lucide-react v0.453.0 - ISC 520 * 521 * This source code is licensed under the ISC license. 522 * See the LICENSE file in the root directory of this source tree. 523 */const Hoe=Pe("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** 524 * @license lucide-react v0.453.0 - ISC 525 * 526 * This source code is licensed under the ISC license. 527 * See the LICENSE file in the root directory of this source tree. 528 */const bh=Pe("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 529 * @license lucide-react v0.453.0 - ISC 530 * 531 * This source code is licensed under the ISC license. 532 * See the LICENSE file in the root directory of this source tree. 533 */const yl=Pe("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"}]]);/** 534 * @license lucide-react v0.453.0 - ISC 535 * 536 * This source code is licensed under the ISC license. 537 * See the LICENSE file in the root directory of this source tree. 538 */const kW=Pe("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);/** 539 * @license lucide-react v0.453.0 - ISC 540 * 541 * This source code is licensed under the ISC license. 542 * See the LICENSE file in the root directory of this source tree. 543 */const ir=Pe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 544 * @license lucide-react v0.453.0 - ISC 545 * 546 * This source code is licensed under the ISC license. 547 * See the LICENSE file in the root directory of this source tree. 548 */const ma=Pe("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** 549 * @license lucide-react v0.453.0 - ISC 550 * 551 * This source code is licensed under the ISC license. 552 * See the LICENSE file in the root directory of this source tree. 553 */const jh=Pe("Vote",[["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}],["path",{d:"M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z",key:"1ezoue"}],["path",{d:"M22 19H2",key:"nuriw5"}]]);/** 554 * @license lucide-react v0.453.0 - ISC 555 * 556 * This source code is licensed under the ISC license. 557 * See the LICENSE file in the root directory of this source tree. 558 */const rT=Pe("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/** 559 * @license lucide-react v0.453.0 - ISC 560 * 561 * This source code is licensed under the ISC license. 562 * See the LICENSE file in the root directory of this source tree.
vendor: 13,504 bytes, lines 563-573
563 */const og=Pe("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/** 564 * @license lucide-react v0.453.0 - ISC 565 * 566 * This source code is licensed under the ISC license. 567 * See the LICENSE file in the root directory of this source tree. 568 */const Vn=Pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 569 * @license lucide-react v0.453.0 - ISC 570 * 571 * This source code is licensed under the ISC license. 572 * See the LICENSE file in the root directory of this source tree. 573 */const wh=Pe("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"}]]);function CW(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=CW(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ht(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=CW(e))&&(n&&(n+=" "),n+=t);return n}const BE="-",qoe=e=>{const t=Goe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const l=o.split(BE);return l[0]===""&&l.length!==1&&l.shift(),TW(l,t)||Yoe(o)},getConflictingClassGroupIds:(o,l)=>{const c=r[o]||[];return l&&n[o]?[...c,...n[o]]:c}}},TW=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?TW(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(BE);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},xI=/^\[(.+)\]$/,Yoe=e=>{if(xI.test(e)){const t=xI.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Goe=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return Qoe(Object.entries(e.classGroups),r).forEach(([i,o])=>{nT(o,n,i,t)}),n},nT=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:vI(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(Koe(a)){nT(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,o])=>{nT(o,vI(t,i),r,n)})})},vI=(e,t)=>{let r=e;return t.split(BE).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Koe=e=>e.isThemeGetter,Qoe=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,l])=>[t+o,l])):i);return[r,a]}):e,Zoe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,o)=>{r.set(i,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return a(i,o),o},set(i,o){r.has(i)?r.set(i,o):a(i,o)}}},_W="!",Xoe=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,o=l=>{const c=[];let d=0,u=0,f;for(let v=0;v<l.length;v++){let b=l[v];if(d===0){if(b===a&&(n||l.slice(v,v+i)===t)){c.push(l.slice(u,v)),u=v+i;continue}if(b==="/"){f=v;continue}}b==="["?d++:b==="]"&&d--}const h=c.length===0?l:l.substring(u),m=h.startsWith(_W),g=m?h.substring(1):h,x=f&&f>u?f-u:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:x}};return r?l=>r({className:l,parseClassName:o}):o},Joe=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},ele=e=>({cache:Zoe(e.cacheSize),parseClassName:Xoe(e),...qoe(e)}),tle=/\s+/,rle=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(tle);let l="";for(let c=o.length-1;c>=0;c-=1){const d=o[c],{modifiers:u,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}=r(d);let g=!!m,x=n(g?h.substring(0,m):h);if(!x){if(!g){l=d+(l.length>0?" "+l:l);continue}if(x=n(h),!x){l=d+(l.length>0?" "+l:l);continue}g=!1}const v=Joe(u).join(":"),b=f?v+_W:v,y=b+x;if(i.includes(y))continue;i.push(y);const j=a(x,g);for(let w=0;w<j.length;++w){const N=j[w];i.push(b+N)}l=d+(l.length>0?" "+l:l)}return l};function nle(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=PW(t))&&(n&&(n+=" "),n+=r);return n}const PW=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=PW(e[n]))&&(r&&(r+=" "),r+=t);return r};function sle(e,...t){let r,n,a,i=o;function o(c){const d=t.reduce((u,f)=>f(u),e());return r=ele(d),n=r.cache.get,a=r.cache.set,i=l,l(c)}function l(c){const d=n(c);if(d)return d;const u=rle(c,r);return a(c,u),u}return function(){return i(nle.apply(null,arguments))}}const Yr=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},EW=/^\[(?:([a-z-]+):)?(.+)\]$/i,ale=/^\d+\/\d+$/,ile=new Set(["px","full","screen"]),ole=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lle=/\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$/,cle=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,dle=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ule=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qo=e=>Ff(e)||ile.has(e)||ale.test(e),tc=e=>bm(e,"length",yle),Ff=e=>!!e&&!Number.isNaN(Number(e)),bS=e=>bm(e,"number",Ff),ip=e=>!!e&&Number.isInteger(Number(e)),fle=e=>e.endsWith("%")&&Ff(e.slice(0,-1)),qt=e=>EW.test(e),rc=e=>ole.test(e),hle=new Set(["length","size","percentage"]),mle=e=>bm(e,hle,OW),ple=e=>bm(e,"position",OW),gle=new Set(["image","url"]),xle=e=>bm(e,gle,jle),vle=e=>bm(e,"",ble),op=()=>!0,bm=(e,t,r)=>{const n=EW.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},yle=e=>lle.test(e)&&!cle.test(e),OW=()=>!1,ble=e=>dle.test(e),jle=e=>ule.test(e),wle=()=>{const e=Yr("colors"),t=Yr("spacing"),r=Yr("blur"),n=Yr("brightness"),a=Yr("borderColor"),i=Yr("borderRadius"),o=Yr("borderSpacing"),l=Yr("borderWidth"),c=Yr("contrast"),d=Yr("grayscale"),u=Yr("hueRotate"),f=Yr("invert"),h=Yr("gap"),m=Yr("gradientColorStops"),g=Yr("gradientColorStopPositions"),x=Yr("inset"),v=Yr("margin"),b=Yr("opacity"),y=Yr("padding"),j=Yr("saturate"),w=Yr("scale"),N=Yr("sepia"),S=Yr("skew"),k=Yr("space"),T=Yr("translate"),C=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",qt,t],_=()=>[qt,t],I=()=>["",Qo,tc],F=()=>["auto",Ff,qt],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",qt],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[Ff,qt];return{cacheSize:500,separator:":",theme:{colors:[op],spacing:[Qo,tc],blur:["none","",rc,qt],brightness:se(),borderColor:[e],borderRadius:["none","","full",rc,qt],borderSpacing:_(),borderWidth:I(),contrast:se(),grayscale:q(),hueRotate:se(),invert:q(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[fle,tc],inset:P(),margin:P(),opacity:se(),padding:_(),saturate:se(),scale:se(),sepia:q(),skew:se(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",qt]}],container:["container"],columns:[{columns:[rc]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:[...H(),qt]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ip,qt]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qt]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",ip,qt]}],"grid-cols":[{"grid-cols":[op]}],"col-start-end":[{col:["auto",{span:["full",ip,qt]},qt]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[op]}],"row-start-end":[{row:["auto",{span:[ip,qt]},qt]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qt,t]}],"min-w":[{"min-w":[qt,t,"min","max","fit"]}],"max-w":[{"max-w":[qt,t,"none","full","min","max","fit","prose",{screen:[rc]},rc]}],h:[{h:[qt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",rc,tc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",bS]}],"font-family":[{font:[op]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qt]}],"line-clamp":[{"line-clamp":["none",Ff,bS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Qo,qt]}],"list-image":[{"list-image":["none",qt]}],"list-style-type":[{list:["none","disc","decimal",qt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Qo,tc]}],"underline-offset":[{"underline-offset":["auto",Qo,qt]}],"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:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qt]}],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",qt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),ple]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",mle]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},xle]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}
vendor: 5,183 bytes, line 573
573],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"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":[b]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:W()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[Qo,qt]}],"outline-w":[{outline:[Qo,tc]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Qo,tc]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",rc,vle]}],"shadow-color":[{shadow:[op]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",rc,qt]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[j]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"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",qt]}],duration:[{duration:se()}],ease:[{ease:["linear","in","out","in-out",qt]}],delay:[{delay:se()}],animate:[{animate:["none","spin","ping","pulse","bounce",qt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[ip,qt]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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"]}
573],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",qt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Qo,tc,bS]}],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"]}}},Nle=sle(wle);function Oe(...e){return Nle(ht(e))}function T0(e){if(!e)return"?";const t=e.trim().split(/\s+/);return t.length===1?e.charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}const Sle=hoe,AW=p.forwardRef(({className:e,...t},r)=>s.jsx(oW,{ref:r,className:Oe("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}));AW.displayName=oW.displayName;const kle=Mu("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"}}),DW=p.forwardRef(({className:e,variant:t,...r},n)=>s.jsx(lW,{ref:n,className:Oe(kle({variant:t}),e),...r}));DW.displayName=lW.displayName;const Cle=p.forwardRef(({className:e,...t},r)=>s.jsx(uW,{ref:r,className:Oe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Cle.displayName=uW.displayName;const MW=p.forwardRef(({className:e,...t},r)=>s.jsx(fW,{ref:r,className:Oe("absolute right-2 top-2 rounded-md p-1 text-foreground
573/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(Vn,{className:"h-4 w-4"})}));MW.displayName=fW.displayName;const IW=p.forwardRef(({className:e,...t},r)=>s.jsx(cW,{ref:r,className:Oe("text-sm font-semibold",e),...t}));IW.displayName=cW.displayName;const RW=p.forwardRef(({className:e,...t},r)=>s.jsx(dW,{ref:r,className:Oe("text-sm opacity-90",e),...t}));RW.displayName=dW.displayName;function Tle(){const{toasts:e}=Qt();return s.jsxs(Sle,{children:[e.map(function({id:t,title:r,description:n,action:a,...i}){return s.jsxs(DW,{...i,children:[s.jsxs("div",{className:"grid gap-1",children:[r&&s.jsx(IW,{children:r}),n&&s.jsx(RW,{children:n})]}),a,s.jsx(MW,{})]},t)}),s.jsx(AW,{})]})}const ke=Symbol.for("drizzle:entityKind");function $n(e,t){if(!e||typeof e!="object")return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,ke))throw new Error(`Class "${t.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let r=Object.getPrototypeOf(e).constructor;if(r)for(;r;){if(ke in r&&r[ke]===t[ke])return!0;r=Object.getPrototypeOf(r)}return!1}var b5;b5=ke;class Nh{constructor(t,r){$(this,"name");$(this,"keyAsName");$(this,"primary");$(this,"notNull");$(this,"default");$(this,"defaultFn");$(this,"onUpdateFn");$(this,"hasDefault");$(this,"isUnique");$(this,"uniqueName");$(this,"uniqueType");$(this,"dataType");$(this,"columnType");$(this,"enumValues");$(this,"generated");$(this,"generatedIdentity");$(this,"config");this.table=t,this.config=r,this.name=r.name,this.keyAsName=r.keyAsName,this.notNull=r.notNull,this.default=r.default,this.defaultFn=r.defaultFn,this.onUpdateFn=r.onUpdateFn,this.hasDefault=r.hasDefault,this.primary=r.primaryKey,this.isUnique=r.isUnique,this.uniqueName=r.uniqueName,this.uniqueType=r.uniqueType,this.dataType=r.dataType,this.columnType=r.columnType,this.generated=r.generated,this.generatedIdentity=r.generatedIdentity}mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}$(Nh,b5,"Column");var j5;j5=ke;class $W{constructor(t,r,n){$(this,"config");$(this,"$default",this.$defaultFn);$(this,"$onUpdate",this.$onUpdateFn);this.config={name:t,keyAsName:t==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:r,columnType:n,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(t){return this.config.default=t,this.config.hasDefault=!0,this}$defaultFn(t){return this.config.defaultFn=t,this.config.hasDefault=!0,this}$onUpdateFn(t){return this.config.onUpdateFn=t,this.config.hasDefault=!0,this}primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(t){this.config.name===""&&(this.config.name=t)}}$($W,j5,"ColumnBuilder");const Bf=Symbol.for("drizzle:Name");var w5;w5=ke;class LW{constructor(t,r){$(this,"reference");$(this,"_onUpdate","no action");$(this,"_onDelete","no action");this.reference=()=>{const{name:n,columns:a,foreignColumns:i}=t();return{name:n,columns:a,foreignTable:i[0].table,foreignColumns:i}},r&&(this._onUpdate=r.onUpdate,this._onDelete=r.onDelete)}onUpdate(t){return this._onUpdate=t===void 0?"no action":t,this}onDelete(t){return this._onDelete=t===void 0?"no action":t,this}build(t){return new FW(t,this)}}$(LW,w5,"PgForeignKeyBuilder");var N5;N5=ke;class FW{constructor(t,r){$(this,"reference");$(this,"onUpdate");$(this,"onDelete");this.table=t,this.reference=r.reference,this.onUpdate=r._onUpdate,this.onDelete=r._onDelete}getName(){const{name:t,columns:r,foreignColumns:n}=this.reference(),a=r.map(l=>l.name),i=n.map(l=>l.name),o=[this.table[Bf],...a,n[0].table[Bf],...i];return t??`${o.join("_")}_fk`}}$(FW,N5,"PgForeignKey");function _le(e,...t){return e(...t)}function Ple(e,t){return`${e[Bf]}_${t.join("_")}_unique`}function yI(e,t,r){for(let n=t;n<e.length;n++){const a=e[n];if(a==="\\"){n++;continue}if(a==='"')return[e.slice(t,n).replace(/\\/g,""),n+1];if(!r&&(a===","||a==="}"))return[e.slice(t,n).replace(/\\/g,""),n]}return[e.slice(t).replace(/\\/g,""),e.length]}function BW(e,t=0){const r=[];let n=t,a=!1;for(;n<e.length;){const i=e[n];if(i===","){(a||n===t)&&r.push(""),a=!0,n++;continue}if(a=!1,i==="\\"){n+=2;continue}if(i==='"'){const[c,d]=yI(e,n+1,!0);r.push(c),n=d;continue}if(i==="}")return[r,n+1];if(i==="{"){const[c,d]=BW(e,n+1);
573r.push(c),n=d;continue}const[o,l]=yI(e,n,!1);r.push(o),n=l}return[r,n]}function Ele(e){const[t]=BW(e,1);return t}function UW(e){return`{${e.map(t=>Array.isArray(t)?UW(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var S5,k5;class fr extends(k5=$W,S5=ke,k5){constructor(){super(...arguments);$(this,"foreignKeyConfigs",[])}array(r){return new WW(this.config.name,this,r)}references(r,n={}){return this.foreignKeyConfigs.push({ref:r,actions:n}),this}unique(r,n){return this.config.isUnique=!0,this.config.uniqueName=r,this.config.uniqueType=n==null?void 0:n.nulls,this}generatedAlwaysAs(r){return this.config.generated={as:r,type:"always",mode:"stored"},this}buildForeignKeys(r,n){return this.foreignKeyConfigs.map(({ref:a,actions:i})=>_le((o,l)=>{const c=new LW(()=>{const d=o();return{columns:[r],foreignColumns:[d]}});return l.onUpdate&&c.onUpdate(l.onUpdate),l.onDelete&&c.onDelete(l.onDelete),c.build(n)},a,i))}buildExtraConfigColumn(r){return new zW(r,this.config)}}$(fr,S5,"PgColumnBuilder");var C5,T5;class Ht extends(T5=Nh,C5=ke,T5){constructor(t,r){r.uniqueName||(r.uniqueName=Ple(t,[r.name])),super(t,r),this.table=t}}$(Ht,C5,"PgColumn");var _5,P5;class zW extends(P5=Ht,_5=ke,P5){constructor(){super(...arguments);$(this,"indexConfig",{order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass});$(this,"defaultConfig",{order:"asc",nulls:"last",opClass:void 0})}getSQLType(){return this.getSQLType()}asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(r){return this.indexConfig.opClass=r,this}}$(zW,_5,"ExtraConfigColumn");var E5;E5=ke;class Eb{constructor(t,r,n,a){$(this,"name");$(this,"keyAsName");$(this,"type");$(this,"indexConfig");this.name=t,this.keyAsName=r,this.type=n,this.indexConfig=a}}$(Eb,E5,"IndexedColumn");var O5,A5;class WW extends(A5=fr,O5=ke,A5){constructor(t,r,n){super(t,"array","PgArray"),this.config.baseBuilder=r,this.config.size=n}build(t){const r=this.config.baseBuilder.build(t);return new sT(t,this.config,r)}}$(WW,O5,"PgArrayBuilder");var D5,M5;const Cw=class Cw extends(M5=Ht,D5=ke,M5){constructor(r,n,a,i){super(r,n);$(this,"size");this.baseColumn=a,this.range=i,this.size=n.size}getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size=="number"?this.size:""}]`}mapFromDriverValue(r){return typeof r=="string"&&(r=Ele(r)),r.map(n=>this.baseColumn.mapFromDriverValue(n))}mapToDriverValue(r,n=!1){const a=r.map(i=>i===null?null:$n(this.baseColumn,Cw)?this.baseColumn.mapToDriverValue(i,!0):this.baseColumn.mapToDriverValue(i));return n?a:UW(a)}};$(Cw,D5,"PgArray");let sT=Cw;const bI=Symbol.for("drizzle:isPgEnum");function Ole(e){return!!e&&typeof e=="function"&&bI in e&&e[bI]===!0}var I5;I5=ke;class UE{constructor(t,r,n,a=!1){this._={brand:"Subquery",sql:t,selectedFields:r,alias:n,isWith:a}}}$(UE,I5,"Subquery");const Ale={startActiveSpan(e,t){return t()}},Uf=Symbol.for("drizzle:ViewBaseConfig"),jS=Symbol.for("drizzle:Schema"),jI=Symbol.for("drizzle:Columns"),wI=Symbol.for("drizzle:ExtraConfigColumns"),wS=Symbol.for("drizzle:OriginalName"),NS=Symbol.for("drizzle:BaseName"),_0=Symbol.for("drizzle:IsAlias"),NI=Symbol.for("drizzle:ExtraConfigBuilder"),VW=Symbol.for("drizzle:IsDrizzleTable");var R5,$5,L5,F5,B5,U5,z5,W5,V5,H5,mb;let Pa=(H5=ke,V5=Bf,W5=wS,z5=jS,U5=jI,B5=wI,F5=NS,L5=_0,$5=VW,R5=NI,mb=class{constructor(t,r,n){$(this,V5);$(this,W5);$(this,z5);$(this,U5);$(this,B5);$(this,F5);$(this,L5,!1);$(this,$5,!0);$(this,R5);this[Bf]=this[wS]=t,this[jS]=r,this[NS]=n}},$(mb,H5,"Table"),$(mb,"Symbol",{Name:Bf,Schema:jS,OriginalName:wS,Columns:jI,ExtraConfigColumns:wI,BaseName:NS,IsAlias:_0,ExtraConfigBuilder:NI}),mb);function HW(e){return typeof e=="object"&&e!==null&&VW in e}function Dle(e){return e!=null&&typeof e.getSQL=="function"}function Mle(e){var r;const t={sql:"",params:[]};for(const n of e)t.sql+=n.sql,t.params.push(...n.params),(r=n.typings)!=null&&r.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var q5;q5=ke;class Za{constructor(t){$(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new wn([this])}}$(Za,q5,"StringChunk");var Y5;Y5=ke;const Ed=class Ed{constructor(t){$(this,"decoder",qW);$(this,"shouldInlineParams",!1);this.queryChunks=t}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Ale.startActiveSpan("drizzle.buildSQL",r=>{const n=this.buildQueryFromSourceParams(this.queryChunks,t);return r==null||r.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(t,r){const n=Object.assign({},r,{inlineParams:r.inlineParams||this.shouldInlineParams,paramStartIndex:r.paramStartIndex||{value:0}}),{casing:a,escapeName:i,escapeParam:o,prepareTyping:l,inlineParams:c,paramStartIndex:d}=n;return Mle(t.map(u=>{var f;if($n(u,Za))return{sql:u.value.join(""),params:[]};if($n(u,P0))return{sql:i(u.value),params:[]};if(u===void 0)return{sql:"",params:[]};if(Array.isArray(u)){const h=[new Za("(")];for(const[m,g]of u.entries())h.push(g),m<u.length-1&&h.push(new Za(", "));return h.push(new Za(")")),this.buildQueryFromSourceParams(h,n)}if($n(u,Ed))return this.buildQueryFromSourceParams(u.queryChunks,{...n,inlineParams:c||u.shouldInlineParams});if($n(u,Pa)){const h=u[Pa.Symbol.Schema],m=u[Pa.Symbol.Name];return{sql:h===void 0||u[_0]?i(m):i(h)+"."+i(m),params:[]}}if($n(u,Nh)){const h=a.getColumnCasing(u);if(r.invokeSource==="indexes")return{sql:i(h),params:[]};const m=u.table[Pa.Symbol.Schema];return{sql:u.table[_0]||m===void 0?i(u.table[Pa.Symbol.Name])+"."+i(h):i(m)+"."+i(u.table[Pa.Symbol.Name])+"."+i(h),params:[]}}if($n(u,KW)){const h=u[Uf].schema,m=u[Uf].name;return{sql:h===void 0||u[Uf].isAlias?i(m):i(h)+"."+i(m),params:[]}}if($n(u,zE)){if($n(u.value,O0))return{sql:o(d.value++,u),params:[u],typings:["none"]};const h=u.value===null?null:u.encoder.mapToDriverValue(u.value);if($n(h,Ed))return this.buildQueryFromSourceParams([h],n);if(c)return{sql:this.mapInlineParam(h,n),params:[]};let m=["none"];return l&&(m=[l(u.encoder)]),{sql:o(d.value++,h),params:[h],typings:m}}return $n(u,O0)?{sql:o(d.value++,u),params:[u],typings:["none"]}:$n(u,Ed.Aliased)&&u.fieldAlias!==void 0?{sql:i(u.fieldAlias),params:[]}:$n(u,UE)?u._.isWith?{sql:i(u._.alias),params:[]}:this.buildQueryFromSourceParams([new Za("("),u._.sql,new Za(") "),new P0(u._.alias)],n):Ole(u)?u.schema?{sql:i(u.schema)+"."+i(u.enumName),params:[]}:{sql:i(u.enumName),params:[]}:Dle(u)?(f=u.shouldOmitSQLParens)!=null&&f.call(u)?this.buildQueryFromSourceParams([u.getSQL()],n):this.buildQueryFromSourceParams([new Za("("),u.getSQL(),new Za(")")],n):c?{sql:this.mapInlineParam(u,n),params:[]}:{sql:o(d.value++,u),params:[u],typings:["none"]}}))}mapInlineParam(t,{escapeString:r}){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return t.toString();if(typeof t=="string")return r(t);if(typeof t=="object"){const n=t.toString();return r(n==="[object Object]"?JSON.stringify(t):n)}throw new Error("Unexpected param value: "+t)}getSQL(){return this}as(t){return t===void 0?this:new Ed.Aliased(this,t)}mapWith(t){return this.decoder=typeof t=="function"?{mapFromDriverValue:t}:t,this}inlineParams(){return this.shouldInlineParams=!0,this}if(t){return t?this:void 0}};$(Ed,Y5,"SQL");let wn=Ed;var G5;G5=ke;class P0{constructor(t){$(this,"brand");this.value=t}getSQL(){return new wn([this])}}
573$(P0,G5,"Name");const qW={mapFromDriverValue:e=>e},YW={mapToDriverValue:e=>e};({...qW,...YW});var K5;K5=ke;class zE{constructor(t,r=YW){$(this,"brand");this.value=t,this.encoder=r}getSQL(){return new wn([this])}}$(zE,K5,"Param");function E0(e,...t){const r=[];(t.length>0||e.length>0&&e[0]!=="")&&r.push(new Za(e[0]));for(const[n,a]of t.entries())r.push(a,new Za(e[n+1]));return new wn(r)}(e=>{function t(){return new wn([])}e.empty=t;function r(c){return new wn(c)}e.fromList=r;function n(c){return new wn([new Za(c)])}e.raw=n;function a(c,d){const u=[];for(const[f,h]of c.entries())f>0&&d!==void 0&&u.push(d),u.push(h);return new wn(u)}e.join=a;function i(c){return new P0(c)}e.identifier=i;function o(c){return new O0(c)}e.placeholder=o;function l(c,d){return new zE(c,d)}e.param=l})(E0||(E0={}));(e=>{var r;r=ke;const n=class n{constructor(i,o){$(this,"isSelectionField",!1);this.sql=i,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new n(this.sql,this.fieldAlias)}};$(n,r,"SQL.Aliased");let t=n;e.Aliased=t})(wn||(wn={}));var Q5;Q5=ke;class O0{constructor(t){this.name=t}getSQL(){return new wn([this])}}$(O0,Q5,"Placeholder");const GW=Symbol.for("drizzle:IsDrizzleView");var Z5,X5,J5;J5=ke,X5=Uf,Z5=GW;class KW{constructor({name:t,schema:r,selectedFields:n,query:a}){$(this,X5);$(this,Z5,!0);this[Uf]={name:t,originalName:t,schema:r,selectedFields:n,query:a,isExisting:!a,isAlias:!1}}getSQL(){return new wn([this])}}$(KW,J5,"View");function Ile(e){return typeof e=="object"&&e!==null&&GW in e}Nh.prototype.getSQL=function(){return new wn([this])};Pa.prototype.getSQL=function(){return new wn([this])};UE.prototype.getSQL=function(){return new wn([this])};function Rle(e){return e[Pa.Symbol.Columns]}function $le(e){return e[Uf].selectedFields}function is(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}var e6,t6;class uv extends(t6=fr,e6=ke,t6){generatedAlwaysAsIdentity(t){if(t){const{name:r,...n}=t;this.config.generatedIdentity={type:"always",sequenceName:r,sequenceOptions:n}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(t){if(t){const{name:r,...n}=t;this.config.generatedIdentity={type:"byDefault",sequenceName:r,sequenceOptions:n}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}}
573$(uv,e6,"PgIntColumnBaseBuilder");var r6,n6;class QW extends(n6=uv,r6=ke,n6){constructor(t){super(t,"number","PgBigInt53")}build(t){return new ZW(t,this.config)}}$(QW,r6,"PgBigInt53Builder");var s6,a6;class ZW extends(a6=Ht,s6=ke,a6){getSQLType(){return"bigint"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}}$(ZW,s6,"PgBigInt53");var i6,o6;class XW extends(o6=uv,i6=ke,o6){constructor(t){super(t,"bigint","PgBigInt64")}build(t){return new JW(t,this.config)}}$(XW,i6,"PgBigInt64Builder");var l6,c6;class JW extends(c6=Ht,l6=ke,c6){getSQLType(){return"bigint"}mapFromDriverValue(t){return BigInt(t)}}$(JW,l6,"PgBigInt64");function Lle(e,t){const{name:r,config:n}=is(e,t);return n.mode==="number"?new QW(r):new XW(r)}var d6,u6;class eV extends(u6=fr,d6=ke,u6){constructor(t){super(t,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new tV(t,this.config)}}$(eV,d6,"PgBigSerial53Builder");var f6,h6;class tV extends(h6=Ht,f6=ke,h6){getSQLType(){return"bigserial"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}}
573$(tV,f6,"PgBigSerial53");var m6,p6;class rV extends(p6=fr,m6=ke,p6){constructor(t){super(t,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(t){return new nV(t,this.config)}}$(rV,m6,"PgBigSerial64Builder");var g6,x6;class nV extends(x6=Ht,g6=ke,x6){getSQLType(){return"bigserial"}mapFromDriverValue(t){return BigInt(t)}}$(nV,g6,"PgBigSerial64");function Fle(e,t){const{name:r,config:n}=is(e,t);return n.mode==="number"?new eV(r):new rV(r)}var v6,y6;class sV extends(y6=fr,v6=ke,y6){constructor(t){super(t,"boolean","PgBoolean")}build(t){return new aV(t,this.config)}}$(sV,v6,"PgBooleanBuilder");var b6,j6;class aV extends(j6=Ht,b6=ke,j6){getSQLType(){return"boolean"}}$(aV,b6,"PgBoolean");function _t(e){return new sV(e??"")}var w6,N6;class iV extends(N6=fr,w6=ke,N6){constructor(t,r){super(t,"string","PgChar"),this.config.length=r.length,this.config.enumValues=r.enum}build(t){return new oV(t,this.config)}}$(iV,w6,"PgCharBuilder");var S6,k6;class oV extends(k6=Ht,S6=ke,k6){constructor(){super(...arguments);$(this,"length",this.config.length);$(this,"enumValues",this.config.enumValues)}getSQLType(){return this.length===void 0?"char":`char(${this.length})`}}$(oV,S6,"PgChar");
573function Ble(e,t={}){const{name:r,config:n}=is(e,t);return new iV(r,n)}var C6,T6;class lV extends(T6=fr,C6=ke,T6){constructor(t){super(t,"string","PgCidr")}build(t){return new cV(t,this.config)}}$(lV,C6,"PgCidrBuilder");var _6,P6;class cV extends(P6=Ht,_6=ke,P6){getSQLType(){return"cidr"}}$(cV,_6,"PgCidr");function Ule(e){return new lV(e??"")}var E6,O6;class dV extends(O6=fr,E6=ke,O6){constructor(t,r,n){super(t,"custom","PgCustomColumn"),this.config.fieldConfig=r,this.config.customTypeParams=n}build(t){return new uV(t,this.config)}}$(dV,E6,"PgCustomColumnBuilder");var A6,D6;class uV extends(D6=Ht,A6=ke,D6){constructor(r,n){super(r,n);$(this,"sqlName");$(this,"mapTo");$(this,"mapFrom");this.sqlName=n.customTypeParams.dataType(n.fieldConfig),this.mapTo=n.customTypeParams.toDriver,this.mapFrom=n.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(r){return typeof this.mapFrom=="function"?this.mapFrom(r):r}mapToDriverValue(r){return typeof this.mapTo=="function"?this.mapTo(r):r}}$(uV,A6,"PgCustomColumn");function zle(e){return(t,r)=>{const{name:n,config:a}=is(t,r);return new dV(n,a,e)}}var M6,I6;class jm extends(I6=fr,M6=ke,I6){defaultNow(){return this.default(E0`now()`)}}$(jm,M6,"PgDateColumnBaseBuilder");var R6,$6;class fV extends($6=jm,R6=ke,$6){constructor(t){super(t,"date","PgDate")}build(t){return new hV(t,this.config)}}$(fV,R6,"PgDateBuilder");var L6,F6;class hV extends(F6=Ht,L6=ke,F6){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}$(hV,L6,"PgDate");var B6,U6;class mV extends(U6=jm,B6=ke,U6){constructor(t){super(t,"string","PgDateString")}build(t){return new pV(t,this.config)}}$(mV,B6,"PgDateStringBuilder");var z6,W6;class pV extends(W6=Ht,z6=ke,W6){getSQLType(){return"date"}}$(pV,z6,"PgDateString");function aT(e,t){const{name:r,config:n}=is(e,t);return(n==null?void 0:n.mode)==="date"?new fV(r):new mV(r)}var V6,H6;class gV extends(H6=fr,V6=ke,H6){constructor(t){super(t,"number","PgDoublePrecision")}build(t){return new xV(t,this.config)}}$(gV,V6,"PgDoublePrecisionBuilder");var q6,Y6;class xV extends(Y6=Ht,q6=ke,Y6){getSQLType(){return"double precision"}mapFromDriverValue(t){return typeof t=="string"?Number.parseFloat(t):t}}$(xV,q6,"PgDoublePrecision");function Wle(e){return new gV(e??"")}var G6,K6;class vV extends(K6=fr,G6=ke,K6){constructor(t){super(t,"string","PgInet")}build(t){return new yV(t,this.config)}}$(vV,G6,"PgInetBuilder");var Q6,Z6;class yV extends(Z6=Ht,Q6=ke,Z6){getSQLType(){return"inet"}}$(yV,Q6,"PgInet");function Vle(e){return new vV(e??"")}var X6,J6;class bV extends(J6=uv,X6=ke,J6){constructor(t){super(t,"number","PgInteger")}build(t){return new jV(t,this.config)}}$(bV,X6,"PgIntegerBuilder");var eB,tB;class jV extends(tB=Ht,eB=ke,tB){getSQLType(){return"integer"}mapFromDriverValue(t){return typeof t=="string"?Number.parseInt(t):t}}$(jV,eB,"PgInteger");function Se(e){return new bV(e??"")}var rB,nB;class wV extends(nB=fr,rB=ke,nB){constructor(t,r){super(t,"string","PgInterval"),this.config.intervalConfig=r}build(t){return new NV(t,this.config)}}$(wV,rB,"PgIntervalBuilder");var sB,aB;class NV extends(aB=Ht,sB=ke,aB){constructor(){super(...arguments);$(this,"fields",this.config.intervalConfig.fields);$(this,"precision",this.config.intervalConfig.precision)}getSQLType(){const r=this.fields?` ${this.fields}`:"",n=this.precision?`(${this.precision})`:"";return`interval${r}${n}`}}$(NV,sB,"PgInterval");function Hle(e,t={}){const{name:r,config:n}=is(e,t);return new wV(r,n)}var iB,oB;class SV extends(oB=fr,iB=ke,oB){constructor(t){super(t,"json","PgJson")}build(t){return new kV(t,this.config)}}$(SV,iB,"PgJsonBuilder");var lB,cB;class kV extends(cB=Ht,lB=ke,cB){constructor(t,r){super(t,r)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}$(kV,lB,"PgJson");function CV(e){return new SV(e??"")}var dB,uB;class TV extends(uB=fr,dB=ke,uB){constructor(t){super(t,"json","PgJsonb")}build(t){return new _V(t,this.config)}}$(TV,dB,"PgJsonbBuilder");var fB,hB;class _V extends(hB=Ht,fB=ke,hB){constructor(t,r){super(t,r)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}$(_V,fB,"PgJsonb");function nr(e){return new TV(e??"")}var mB,pB;class PV extends(pB=fr,mB=ke,pB){constructor(t){super(t,"array","PgLine")}build(t){return new EV(t,this.config)}}
573$(PV,mB,"PgLineBuilder");var gB,xB;class EV extends(xB=Ht,gB=ke,xB){getSQLType(){return"line"}mapFromDriverValue(t){const[r,n,a]=t.slice(1,-1).split(",");return[Number.parseFloat(r),Number.parseFloat(n),Number.parseFloat(a)]}mapToDriverValue(t){return`{${t[0]},${t[1]},${t[2]}}`}}$(EV,gB,"PgLine");var vB,yB;class OV extends(yB=fr,vB=ke,yB){constructor(t){super(t,"json","PgLineABC")}build(t){return new AV(t,this.config)}}$(OV,vB,"PgLineABCBuilder");var bB,jB;class AV extends(jB=Ht,bB=ke,jB){getSQLType(){return"line"}mapFromDriverValue(t){const[r,n,a]=t.slice(1,-1).split(",");return{a:Number.parseFloat(r),b:Number.parseFloat(n),c:Number.parseFloat(a)}}mapToDriverValue(t){return`{${t.a},${t.b},${t.c}}`}}$(AV,bB,"PgLineABC");function qle(e,t){const{name:r,config:n}=is(e,t);return!(n!=null&&n.mode)||n.mode==="tuple"?new PV(r):new OV(r)}var wB,NB;class DV extends(NB=fr,wB=ke,NB){constructor(t){super(t,"string","PgMacaddr")}build(t){return new MV(t,this.config)}}$(DV,wB,"PgMacaddrBuilder");var SB,kB;class MV extends(kB=Ht,SB=ke,kB){getSQLType(){return"macaddr"}}$(MV,SB,"PgMacaddr");function Yle(e){return new DV(e??"")}var CB,TB;class IV extends(TB=fr,CB=ke,TB){constructor(t){super(t,"string","PgMacaddr8")}build(t){return new RV(t,this.config)}}$(IV,CB,"PgMacaddr8Builder");var _B,PB;class RV extends(PB=Ht,_B=ke,PB){getSQLType(){return"macaddr8"}}$(RV,_B,"PgMacaddr8");function Gle(e){return new IV(e??"")}var EB,OB;class $V extends(OB=fr,EB=ke,OB){constructor(t,r,n){super(t,"string","PgNumeric"),this.config.precision=r,this.config.scale=n}build(t){return new LV(t,this.config)}}$($V,EB,"PgNumericBuilder");var AB,DB;class LV extends(DB=Ht,AB=ke,DB){constructor(r,n){super(r,n);$(this,"precision");$(this,"scale");this.precision=n.precision,this.scale=n.scale}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}$(LV,AB,"PgNumeric");function Kle(e,t){const{name:r,config:n}=is(e,t);return new $V(r,n==null?void 0:n.precision,n==null?void 0:n.scale)}var MB,IB;class FV extends(IB=fr,MB=ke,IB){constructor(t){super(t,"array","PgPointTuple")}build(t){return new BV(t,this.config)}}$(FV,MB,"PgPointTupleBuilder");var RB,$B;class BV extends($B=Ht,RB=ke,$B){getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){const[r,n]=t.slice(1,-1).split(",");return[Number.parseFloat(r),Number.parseFloat(n)]}return[t.x,t.y]}mapToDriverValue(t){return`(${t[0]},${t[1]})`}}$(BV,RB,"PgPointTuple");var LB,FB;class UV extends(FB=fr,LB=ke,FB){constructor(t){super(t,"json","PgPointObject")}build(t){return new zV(t,this.config)}}$(UV,LB,"PgPointObjectBuilder");var BB,UB;class zV extends(UB=Ht,BB=ke,UB){getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){const[r,n]=t.slice(1,-1).split(",");return{x:Number.parseFloat(r),y:Number.parseFloat(n)}}return t}mapToDriverValue(t){return`(${t.x},${t.y})`}}$(zV,BB,"PgPointObject");function Qle(e,t){const{name:r,config:n}=is(e,t);return!(n!=null&&n.mode)||n.mode==="tuple"?new FV(r):new UV(r)}function Zle(e){const t=[];for(let r=0;r<e.length;r+=2)t.push(Number.parseInt(e.slice(r,r+2),16));return new Uint8Array(t)}function SI(e,t){const r=new ArrayBuffer(8),n=new DataView(r);for(let a=0;a<8;a++)n.setUint8(a,e[t+a]);return n.getFloat64(0,!0)}function WV(e){const t=Zle(e);let r=0;const n=t[r];r+=1;const a=new DataView(t.buffer),i=a.getUint32(r,n===1);if(r+=4,i&536870912&&(a.getUint32(r,n===1),r+=4),(i&65535)===1){const o=SI(t,r);r+=8;const l=SI(t,r);return r+=8,[o,l]}throw new Error("Unsupported geometry type")}var zB,WB;class VV extends(WB=fr,zB=ke,WB){constructor(t){super(t,"array","PgGeometry")}build(t){return new HV(t,this.config)}}$(VV,zB,"PgGeometryBuilder");var VB,HB;class HV extends(HB=Ht,VB=ke,HB){getSQLType(){return"geometry(point)"}mapFromDriverValue(t){return WV(t)}mapToDriverValue(t){return`point(${t[0]} ${t[1]})`}}$(HV,VB,"PgGeometry");var qB,YB;class qV extends(YB=fr,qB=ke,YB){constructor(t){super(t,"json","PgGeometryObject")}build(t){return new YV(t,this.config)}}$(qV,qB,"PgGeometryObjectBuilder");var GB,KB;class YV extends(KB=Ht,GB=ke,KB){getSQLType(){return"geometry(point)"}mapFromDriverValue(t){const r=WV(t);return{x:r[0],y:r[1]}}mapToDriverValue(t){return`point(${t.x} ${t.y})`}}$(YV,GB,"PgGeometryObject");function Xle(e,t){const{name:r,config:n}=is(e,t);return!(n!=null&&n.mode)||n.mode==="tuple"?new VV(r):new qV(r)}var QB,ZB;class GV extends(ZB=fr,QB=ke,ZB){constructor(t,r){super(t,"number","PgReal"),this.config.length=r}build(t){return new KV(t,this.config)}}$(GV,QB,"PgRealBuilder");var XB,JB;class KV extends(JB=Ht,XB=ke,JB){constructor(r,n){super(r,n);$(this,"mapFromDriverValue",r=>typeof r=="string"?Number.parseFloat(r):r)}getSQLType(){return"real"}}$(KV,XB,"PgReal");function Ob(e){return new GV(e??"")}var e8,t8;class QV extends(t8=fr,e8=ke,t8){constructor(t){super(t,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new ZV(t,this.config)}}$(QV,e8,"PgSerialBuilder");var r8,n8;
573class ZV extends(n8=Ht,r8=ke,n8){getSQLType(){return"serial"}}$(ZV,r8,"PgSerial");function Zt(e){return new QV(e??"")}var s8,a8;class XV extends(a8=uv,s8=ke,a8){constructor(t){super(t,"number","PgSmallInt")}build(t){return new JV(t,this.config)}}$(XV,s8,"PgSmallIntBuilder");var i8,o8;class JV extends(o8=Ht,i8=ke,o8){constructor(){super(...arguments);$(this,"mapFromDriverValue",r=>typeof r=="string"?Number(r):r)}getSQLType(){return"smallint"}}$(JV,i8,"PgSmallInt");function Jle(e){return new XV(e??"")}var l8,c8;class e7 extends(c8=fr,l8=ke,c8){constructor(t){super(t,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new t7(t,this.config)}}$(e7,l8,"PgSmallSerialBuilder");var d8,u8;class t7 extends(u8=Ht,d8=ke,u8){getSQLType(){return"smallserial"}}$(t7,d8,"PgSmallSerial");function ece(e){return new e7(e??"")}var f8,h8;class r7 extends(h8=fr,f8=ke,h8){constructor(t,r){super(t,"string","PgText"),this.config.enumValues=r.enum}build(t){return new n7(t,this.config)}}$(r7,f8,"PgTextBuilder");var m8,p8;class n7 extends(p8=Ht,m8=ke,p8){constructor(){super(...arguments);$(this,"enumValues",this.config.enumValues)}getSQLType(){return"text"}}$(n7,m8,"PgText");function re(e,t={}){const{name:r,config:n}=is(e,t);return new r7(r,n)}var g8,x8;class s7 extends(x8=jm,g8=ke,x8){constructor(t,r,n){super(t,"string","PgTime"),this.withTimezone=r,this.precision=n,this.config.withTimezone=r,this.config.precision=n}build(t){return new a7(t,this.config)}}$(s7,g8,"PgTimeBuilder");var v8,y8;class a7 extends(y8=Ht,v8=ke,y8){constructor(r,n){super(r,n);$(this,"withTimezone");$(this,"precision");this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(a7,v8,"PgTime");function tce(e,t={}){const{name:r,config:n}=is(e,t);return new s7(r,n.withTimezone??!1,n.precision)}var b8,j8;class i7 extends(j8=jm,b8=ke,j8){constructor(t,r,n){super(t,"date","PgTimestamp"),this.config.withTimezone=r,this.config.precision=n}build(t){return new o7(t,this.config)}}$(i7,b8,"PgTimestampBuilder");var w8,N8;class o7 extends(N8=Ht,w8=ke,N8){constructor(r,n){super(r,n);$(this,"withTimezone");$(this,"precision");$(this,"mapFromDriverValue",r=>new Date(this.withTimezone?r:r+"+0000"));$(this,"mapToDriverValue",r=>r.toISOString());this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(o7,w8,"PgTimestamp");var S8,k8;class l7 extends(k8=jm,S8=ke,k8){constructor(t,r,n){super(t,"string","PgTimestampString"),this.config.withTimezone=r,this.config.precision=n}build(t){return new c7(t,this.config)}}$(l7,S8,"PgTimestampStringBuilder");var C8,T8;class c7 extends(T8=Ht,C8=ke,T8){constructor(r,n){super(r,n);$(this,"withTimezone");$(this,"precision");this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(c7,C8,"PgTimestampString");function qe(e,t={}){const{name:r,config:n}=is(e,t);return(n==null?void 0:n.mode)==="string"?new l7(r,n.withTimezone??!1,n.precision):new i7(r,(n==null?void 0:n.withTimezone)??!1,n==null?void 0:n.precision)}var _8,P8;class d7 extends(P8=fr,_8=ke,P8){constructor(t){super(t,"string","PgUUID")}defaultRandom(){return this.default(E0`gen_random_uuid()`)}build(t){return new u7(t,this.config)}}$(d7,_8,"PgUUIDBuilder");var E8,O8;class u7 extends(O8=Ht,E8=ke,O8){getSQLType(){return"uuid"}}$(u7,E8,"PgUUID");function rce(e){return new d7(e??"")}var A8,D8;class f7 extends(D8=fr,A8=ke,D8){constructor(t,r){super(t,"string","PgVarchar"),this.config.length=r.length,this.config.enumValues=r.enum}build(t){return new h7(t,this.config)}}$(f7,A8,"PgVarcharBuilder");var M8,I8;class h7 extends(I8=Ht,M8=ke,I8){constructor(){super(...arguments);$(this,"length",this.config.length);$(this,"enumValues",this.config.enumValues)}getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}}$(h7,M8,"PgVarchar");function m7(e,t={}){const{name:r,config:n}=is(e,t);return new f7(r,n)}var R8,$8;class p7 extends($8=fr,R8=ke,$8){constructor(t,r){super(t,"string","PgBinaryVector"),this.config.dimensions=r.dimensions}build(t){return new g7(t,this.config)}}$(p7,R8,"PgBinaryVectorBuilder");var L8,F8;class g7 extends(F8=Ht,L8=ke,F8){constructor(){super(...arguments);$(this,"dimensions",this.config.dimensions)}getSQLType(){return`bit(${this.dimensions})`}}
573$(g7,L8,"PgBinaryVector");function nce(e,t){const{name:r,config:n}=is(e,t);return new p7(r,n)}var B8,U8;class x7 extends(U8=fr,B8=ke,U8){constructor(t,r){super(t,"array","PgHalfVector"),this.config.dimensions=r.dimensions}build(t){return new v7(t,this.config)}}$(x7,B8,"PgHalfVectorBuilder");var z8,W8;class v7 extends(W8=Ht,z8=ke,W8){constructor(){super(...arguments);$(this,"dimensions",this.config.dimensions)}getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(r){return JSON.stringify(r)}mapFromDriverValue(r){return r.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}}$(v7,z8,"PgHalfVector");function sce(e,t){const{name:r,config:n}=is(e,t);return new x7(r,n)}var V8,H8;class y7 extends(H8=fr,V8=ke,H8){constructor(t,r){super(t,"string","PgSparseVector"),this.config.dimensions=r.dimensions}build(t){return new b7(t,this.config)}}$(y7,V8,"PgSparseVectorBuilder");var q8,Y8;class b7 extends(Y8=Ht,q8=ke,Y8){constructor(){super(...arguments);$(this,"dimensions",this.config.dimensions)}getSQLType(){return`sparsevec(${this.dimensions})`}}$(b7,q8,"PgSparseVector");function ace(e,t){const{name:r,config:n}=is(e,t);return new y7(r,n)}var G8,K8;class j7 extends(K8=fr,G8=ke,K8){constructor(t,r){super(t,"array","PgVector"),this.config.dimensions=r.dimensions}build(t){return new w7(t,this.config)}}$(j7,G8,"PgVectorBuilder");var Q8,Z8;class w7 extends(Z8=Ht,Q8=ke,Z8){constructor(){super(...arguments);$(this,"dimensions",this.config.dimensions)}getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(r){return JSON.stringify(r)}mapFromDriverValue(r){return r.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}}$(w7,Q8,"PgVector");function ice(e,t){const{name:r,config:n}=is(e,t);return new j7(r,n)}function oce(){return{bigint:Lle,bigserial:Fle,boolean:_t,char:Ble,cidr:Ule,customType:zle,date:aT,doublePrecision:Wle,inet:Vle,integer:Se,interval:Hle,json:CV,jsonb:nr,line:qle,macaddr:Yle,macaddr8:Gle,numeric:Kle,point:Qle,geometry:Xle,real:Ob,serial:Zt,smallint:Jle,smallserial:ece,text:re,time:tce,timestamp:qe,uuid:rce,varchar:m7,bit:nce,halfvec:sce,sparsevec:ace,vector:ice}}const iT=Symbol.for("drizzle:PgInlineForeignKeys"),kI=Symbol.for("drizzle:EnableRLS");var X8,J8,eU,tU,rU;class lg extends(rU=Pa,tU=ke,eU=iT,J8=kI,X8=Pa.Symbol.ExtraConfigBuilder,rU){constructor(){super(...arguments);$(this,eU,[]);$(this,J8,!1);$(this,X8)}}$(lg,tU,"PgTable"),$(lg,"Symbol",Object.assign({},Pa.Symbol,{InlineForeignKeys:iT,EnableRLS:kI}));function lce(e,t,r,n,a=e){const i=new lg(e,n,a),o=typeof t=="function"?t(oce()):t,l=Object.fromEntries(Object.entries(o).map(([u,f])=>{const h=f;h.setName(u);const m=h.build(i);return i[iT].push(...h.buildForeignKeys(m,i)),[u,m]})),c=Object.fromEntries(Object.entries(o).map(([u,f])=>{const h=f;h.setName(u);const m=h.buildExtraConfigColumn(i);return[u,m]})),d=Object.assign(i,l);return d[Pa.Symbol.Columns]=l,d[Pa.Symbol.ExtraConfigColumns]=c,r&&(d[lg.Symbol.ExtraConfigBuilder]=r),Object.assign(d,{enableRLS:()=>(d[lg.Symbol.EnableRLS]=!0,d)})}const Xt=(e,t,r)=>lce(e,t,r,void 0);var nU;nU=ke;class N7{constructor(t,r){this.unique=t,this.name=r}on(...t){return new Ab(t.map(r=>{if($n(r,wn))return r;r=r;const n=new Eb(r.name,!!r.keyAsName,r.columnType,r.indexConfig);return r.indexConfig=JSON.parse(JSON.stringify(r.defaultConfig)),n}),this.unique,!1,this.name)}onOnly(...t){return new Ab(t.map(r=>{if($n(r,wn))return r;r=r;const n=new Eb(r.name,!!r.keyAsName,r.columnType,r.indexConfig);return r.indexConfig=r.defaultConfig,n}),this.unique,!0,this.name)}using(t,...r){return new Ab(r.map(n=>{if($n(n,wn))return n;n=n;const a=new Eb(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=JSON.parse(JSON.stringify(n.defaultConfig)),a}),this.unique,!0,this.name,t)}}$(N7,nU,"PgIndexBuilderOn");var sU;sU=ke;class Ab{constructor(t,r,n,a,i="btree"){$(this,"config");this.config={name:a,columns:t,unique:r,only:n,method:i}}concurrently(){return this.config.concurrently=!0,this}with(t){return this.config.with=t,this}where(t){return this.config.where=t,this}build(t){return new S7(this.config,t)}}$(Ab,sU,"PgIndexBuilder");var aU;aU=ke;class S7{constructor(t,r){$(this,"config");this.config={...t,table:r}}}$(S7,aU,"PgIndex");function cce(e){return new N7(!0,e)}var cr;(function(e){e.assertEqual=a=>a;function t(a){}e.assertIs=t;function r(a){throw new Error}e.assertNever=r,e.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(l=>typeof a[a[l]]!="number"),o={};for(const l of i)o[l]=a[l];return e.objectValues(o)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},e.find=(a,i)=>{for(const o of a)if(i(o))return o}
vendor: 7,118 bytes, line 573
573,e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(cr||(cr={}));var oT;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(oT||(oT={}));const tt=cr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),hc=e=>{switch(typeof e){case"undefined":return tt.undefined;case"string":return tt.string;case"number":return isNaN(e)?tt.nan:tt.number;case"boolean":return tt.boolean;case"function":return tt.function;case"bigint":return tt.bigint;case"symbol":return tt.symbol;case"object":return Array.isArray(e)?tt.array:e===null?tt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?tt.promise:typeof Map<"u"&&e instanceof Map?tt.map:typeof Set<"u"&&e instanceof Set?tt.set:typeof Date<"u"&&e instanceof Date?tt.date:tt.object;default:return tt.unknown}},Ie=cr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),dce=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class $a extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(i){return i.message},n={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let l=n,c=0;for(;c<o.path.length;){const d=o.path[c];c===o.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(r(o))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}};return a(this),n}static assert(t){if(!(t instanceof $a))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,cr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(t(a))):n.push(t(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}$a.create=e=>new $a(e);const Sh=(e,t)=>{let r;switch(e.code){case Ie.invalid_type:e.received===tt.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ie.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,cr.jsonStringifyReplacer)}`;break;case Ie.unrecognized_keys:r=`Unrecognized key(s) in object: ${cr.joinValues(e.keys,", ")}`;break;case Ie.invalid_union:r="Invalid input";break;case Ie.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${cr.joinValues(e.options)}`;break;case Ie.invalid_enum_value:r=`Invalid enum value. Expected ${cr.joinValues(e.options)}, received '${e.received}'`;break;case Ie.invalid_arguments:r="Invalid function arguments";break;case Ie.invalid_return_type:r="Invalid function return type";break;case Ie.invalid_date:r="Invalid date";break;case Ie.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:cr.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ie.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Ie.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Ie.custom:r="Invalid input";break;case Ie.invalid_intersection_types:r="Intersection results could not be merged";break;case Ie.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ie.not_finite:r="Number must be finite";break;default:r=t.defaultError,cr.assertNever(e)}return{message:r}};let k7=Sh;function uce(e){k7=e}function A0(){return k7}const D0=e=>{const{data:t,path:r,errorMaps:n,issueData:a}=e,i=[...r,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let l="";const c=n.filter(d=>!!d).slice().reverse();for(const d of c)l=d(o,{data:t,defaultError:l}).message;return{...a,path:i,message:l}},fce=[];function Ge(e,t){const r=A0(),n=D0({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Sh?void 0:Sh].filter(a=>!!a)});e.common.issues.push(n)}class As{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const a of r){if(a.status==="aborted")return It;a.status==="dirty"&&t.dirty(),n.push(a.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const a of r){const i=await a.key,o=await a.value;n.push({key:i,value:o})}return As.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const a of r){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return It;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}}const It=Object.freeze({status:"aborted"}),bf=e=>({status:"dirty",value:e}),ra=e=>
vendor: 4,211 bytes, line 573
573({status:"valid",value:e}),lT=e=>e.status==="aborted",cT=e=>e.status==="dirty",Ug=e=>e.status==="valid",zg=e=>typeof Promise<"u"&&e instanceof Promise;function M0(e,t,r,n){if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function C7(e,t,r,n,a){if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var mt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(mt||(mt={}));var Wp,Vp;class Lo{constructor(t,r,n,a){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const CI=(e,t)=>{if(Ug(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new $a(e.common.issues);return this._error=r,this._error}}};function Vt(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:a}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(o,l)=>{var c,d;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??l.defaultError}:typeof l.data>"u"?{message:(c=u??n)!==null&&c!==void 0?c:l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:(d=u??r)!==null&&d!==void 0?d:l.defaultError}},description:a}}class Kt{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return hc(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:hc(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new As,ctx:{common:t.parent.common,data:t.data,parsedType:hc(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(zg(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const a={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:hc(t)},i=this._parseSync({data:t,path:a.path,parent:a});return CI(a,i)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:hc(t)},a=this._parse({data:t,path:n.path,parent:n}),i=await(zg(a)?a:Promise.resolve(a));return CI(n,i)}refine(t,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}
vendor: 44,226 bytes, line 573
573:typeof r=="function"?r(a):r;return this._refinement((a,i)=>{const o=t(a),l=()=>i.addIssue({code:Ie.custom,...n(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,r){return this._refinement((n,a)=>t(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(t){return new Vi({schema:this,typeName:At.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ao.create(this,this._def)}nullable(){return Xc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Fi.create(this,this._def)}promise(){return Ch.create(this,this._def)}or(t){return qg.create([this,t],this._def)}and(t){return Yg.create(this,t,this._def)}transform(t){return new Vi({...Vt(this._def),schema:this,typeName:At.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Xg({...Vt(this._def),innerType:this,defaultValue:r,typeName:At.ZodDefault})}brand(){return new WE({typeName:At.ZodBranded,type:this,...Vt(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Jg({...Vt(this._def),innerType:this,catchValue:r,typeName:At.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return fv.create(this,t)}readonly(){return ex.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const hce=/^c[^\s-]{8,}$/i,mce=/^[0-9a-z]+$/,pce=/^[0-9A-HJKMNP-TV-Z]{26}$/,gce=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,xce=/^[a-z0-9_-]{21}$/i,vce=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,yce=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bce="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let SS;const jce=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wce=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Nce=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,T7="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Sce=new RegExp(`^${T7}$`);function _7(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function kce(e){return new RegExp(`^${_7(e)}$`)}function P7(e){let t=`${T7}T${_7(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Cce(e,t){return!!((t==="v4"||!t)&&jce.test(e)||(t==="v6"||!t)&&wce.test(e))}class Mi extends Kt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==tt.string){const i=this._getOrReturnCtx(t);return Ge(i,{code:Ie.invalid_type,expected:tt.string,received:i.parsedType}),It}const n=new As;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),Ge(a,{code:Ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),Ge(a,{code:Ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,l=t.data.length<i.value;(o||l)&&(a=this._getOrReturnCtx(t,a),o?Ge(a,{code:Ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&Ge(a,{code:Ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")yce.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"email",code:Ie.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")SS||(SS=new RegExp(bce,"u")),SS.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"emoji",code:Ie.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")gce.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"uuid",code:Ie.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")xce.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"nanoid",code:Ie.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")hce.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"cuid",code:Ie.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")mce.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"cuid2",code:Ie.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")pce.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"ulid",code:Ie.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Ge(a,{validation:"url",code:Ie.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"regex",code:Ie.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),Ge(a,{code:Ie.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),Ge(a,{code:Ie.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),Ge(a,{code:Ie.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?P7(i).test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{code:Ie.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?Sce.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{code:Ie.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?kce(i).test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{code:Ie.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?vce.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"duration",code:Ie.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?Cce(t.data,i.version)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"ip",code:Ie.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Nce.test(t.data)||(a=this._getOrReturnCtx(t,a),Ge(a,{validation:"base64",code:Ie.invalid_string,message:i.message}),n.dirty()):cr.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(a=>t.test(a),{validation:r,code:Ie.invalid_string,...mt.errToObj(n)})}_addCheck(t){return new Mi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...mt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...mt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...mt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...mt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...mt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...mt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...mt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...mt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...mt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...mt.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...mt.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...mt.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...mt.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...mt.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...mt.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...mt.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...mt.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...mt.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...mt.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...mt.errToObj(r)})}nonempty(t){return this.min(1,mt.errToObj(t))}trim(){return new Mi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Mi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Mi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Mi.create=e=>{var t;return new Mi({checks:[],typeName:At.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Vt(e)})};function Tce(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,a=r>n?r:n,i=parseInt(e.toFixed(a).replace(".","")),o=parseInt(t.toFixed(a).replace(".",""));return i%o/Math.pow(10,a)}class Kc extends Kt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==tt.number){const i=this._getOrReturnCtx(t);return Ge(i,{code:Ie.invalid_type,expected:tt.number,received:i.parsedType}),It}let n;const a=new As;for(const i of this._def.checks)i.kind==="int"?cr.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Ge(n,{code:Ie.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Ie.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Ie.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?Tce(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Ie.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Ge(n,{code:Ie.not_finite,message:i.message}),a.dirty()):cr.assertNever(i);return{status:a.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,mt.toString(r))}gt(t,r){return this.setLimit("min",t,!1,mt.toString(r))}lte(t,r){return this.setLimit("max",t,!0,mt.toString(r))}lt(t,r){return this.setLimit("max",t,!1,mt.toString(r))}setLimit(t,r,n,a){return new Kc({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:mt.toString(a)}]})}_addCheck(t){return new Kc({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:mt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:mt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:mt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:mt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:mt.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:mt.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:mt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:mt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:mt.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&cr.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}Kc.create=e=>new Kc({checks:[],typeName:At.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Vt(e)});class Qc extends Kt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==tt.bigint){const i=this._getOrReturnCtx(t);return Ge(i,{code:Ie.invalid_type,expected:tt.bigint,received:i.parsedType}),It}let n;const a=new As;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Ie.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Ie.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Ge(n,{code:Ie.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):cr.assertNever(i);return{status:a.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,mt.toString(r))}gt(t,r){return this.setLimit("min",t,!1,mt.toString(r))}lte(t,r){return this.setLimit("max",t,!0,mt.toString(r))}lt(t,r){return this.setLimit("max",t,!1,mt.toString(r))}setLimit(t,r,n,a){return new Qc({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:mt.toString(a)}]})}_addCheck(t){return new Qc({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:mt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:mt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:mt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:mt.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:mt.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Qc.create=e=>{var t;return new Qc({checks:[],typeName:At.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Vt(e)})};class Wg extends Kt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==tt.boolean){const n=this._getOrReturnCtx(t);return Ge(n,{code:Ie.invalid_type,expected:tt.boolean,received:n.parsedType}),It}return ra(t.data)}}Wg.create=e=>new Wg({typeName:At.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Vt(e)});class pu extends Kt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==tt.date){const i=this._getOrReturnCtx(t);return Ge(i,{code:Ie.invalid_type,expected:tt.date,received:i.parsedType}),It}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Ge(i,{code:Ie.invalid_date}),It}const n=new As;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),Ge(a,{code:Ie.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),Ge(a,{code:Ie.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):cr.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new pu({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:mt.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:mt.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}pu.create=e=>new pu({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:At.ZodDate,...Vt(e)});class I0 extends Kt{_parse(t){if(this._getType(t)!==tt.symbol){const n=this._getOrReturnCtx(t);return Ge(n,{code:Ie.invalid_type,expected:tt.symbol,received:n.parsedType}),It}return ra(t.data)}}I0.create=e=>new I0({typeName:At.ZodSymbol,...Vt(e)});class Vg extends Kt{_parse(t){if(this._getType(t)!==tt.undefined){const n=this._getOrReturnCtx(t);return Ge(n,{code:Ie.invalid_type,expected:tt.undefined,received:n.parsedType}),It}return ra(t.data)}}Vg.create=e=>new Vg({typeName:At.ZodUndefined,...Vt(e)});class Hg extends Kt{_parse(t){if(this._getType(t)!==tt.null){const n=this._getOrReturnCtx(t);return Ge(n,{code:Ie.invalid_type,expected:tt.null,received:n.parsedType}),It}return ra(t.data)}}Hg.create=e=>new Hg({typeName:At.ZodNull,...Vt(e)});class kh extends Kt{constructor(){super(...arguments),this._any=!0}_parse(t){return ra(t.data)}}kh.create=e=>new kh({typeName:At.ZodAny,...Vt(e)});class Jd extends Kt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ra(t.data)}}Jd.create=e=>new Jd({typeName:At.ZodUnknown,...Vt(e)});class Ml extends Kt{_parse(t){const r=this._getOrReturnCtx(t);return Ge(r,{code:Ie.invalid_type,expected:tt.never,received:r.parsedType}),It}}Ml.create=e=>new Ml({typeName:At.ZodNever,...Vt(e)});class R0 extends Kt{_parse(t){if(this._getType(t)!==tt.undefined){const n=this._getOrReturnCtx(t);return Ge(n,{code:Ie.invalid_type,expected:tt.void,received:n.parsedType}),It}return ra(t.data)}}R0.create=e=>new R0({typeName:At.ZodVoid,...Vt(e)});class Fi extends Kt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),a=this._def;if(r.parsedType!==tt.array)return Ge(r,{code:Ie.invalid_type,expected:tt.array,received:r.parsedType}),It;if(a.exactLength!==null){const o=r.data.length>a.exactLength.value,l=r.data.length<a.exactLength.value;(o||l)&&(Ge(r,{code:o?Ie.too_big:Ie.too_small,minimum:l?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(Ge(r,{code:Ie.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(Ge(r,{code:Ie.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,l)=>a.type._parseAsync(new Lo(r,o,r.path,l)))).then(o=>As.mergeArray(n,o));const i=[...r.data].map((o,l)=>a.type._parseSync(new Lo(r,o,r.path,l)));return As.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new Fi({...this._def,minLength:{value:t,message:mt.toString(r)}})}max(t,r){return new Fi({...this._def,maxLength:{value:t,message:mt.toString(r)}})}length(t,r){return new Fi({...this._def,exactLength:{value:t,message:mt.toString(r)}})}nonempty(t){return this.min(1,t)}}Fi.create=(e,t)=>new Fi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:At.ZodArray,...Vt(t)});function nf(e){if(e instanceof cn){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Ao.create(nf(n))}return new cn({...e._def,shape:()=>t})}else return e instanceof Fi?new Fi({...e._def,type:nf(e.element)}):e instanceof Ao?Ao.create(nf(e.unwrap())):e instanceof Xc?Xc.create(nf(e.unwrap())):e instanceof Fo?Fo.create(e.items.map(t=>nf(t))):e}class cn extends Kt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=cr.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==tt.object){const d=this._getOrReturnCtx(t);return Ge(d,{code:Ie.invalid_type,expected:tt.object,received:d.parsedType}),It}const{status:n,ctx:a}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Ml&&this._def.unknownKeys==="strip"))for(const d in a.data)o.includes(d)||l.push(d);const c=[];for(const d of o){const u=i[d],f=a.data[d];c.push({key:{status:"valid",value:d},value:u._parse(new Lo(a,f,a.path,d)),alwaysSet:d in a.data})}if(this._def.catchall instanceof Ml){const d=this._def.unknownKeys;if(d==="passthrough")for(const u of l)c.push({key:{status:"valid",value:u},value:{status:"valid",value:a.data[u]}});else if(d==="strict")l.length>0&&(Ge(a,{code:Ie.unrecognized_keys,keys:l}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const u of l){const f=a.data[u];c.push({key:{status:"valid",value:u},value:d._parse(new Lo(a,f,a.path,u)),alwaysSet:u in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const d=[];for(const u of c){const f=await u.key,h=await u.value;d.push({key:f,value:h,alwaysSet:u.alwaysSet})}return d}).then(d=>As.mergeObjectSync(n,d)):As.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return mt.errToObj,new cn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var a,i,o,l;const c=(o=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(l=mt.errToObj(t).message)!==null&&l!==void 0?l:c}:{message:c}}}:{}})}strip(){return new cn({...this._def,unknownKeys:"strip"})}passthrough(){return new cn({...this._def,unknownKeys:"passthrough"})}extend(t){return new cn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new cn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:At.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new cn({...this._def,catchall:t})}pick(t){const r={};return cr.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new cn({...this._def,shape:()=>r})}omit(t){const r={};return cr.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new cn({...this._def,shape:()=>r})}deepPartial(){return nf(this)}partial(t){const r={};return cr.objectKeys(this.shape).forEach(n=>{const a=this.shape[n];t&&!t[n]?r[n]=a:r[n]=a.optional()}),new cn({...this._def,shape:()=>r})}required(t){const r={};return cr.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Ao;)i=i._def.innerType;r[n]=i}}),new cn({...this._def,shape:()=>r})}keyof(){return E7(cr.objectKeys(this.shape))}}cn.create=(e,t)=>new cn({shape:()=>e,unknownKeys:"strip",catchall:Ml.create(),typeName:At.ZodObject,...Vt(t)});cn.strictCreate=(e,t)=>new cn({shape:()=>e,unknownKeys:"strict",catchall:Ml.create(),typeName:At.ZodObject,...Vt(t)});cn.lazycreate=(e,t)=>new cn({shape:e,unknownKeys:"strip",catchall:Ml.create(),typeName:At.ZodObject,...Vt(t)});class qg extends Kt{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function a(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return r.common.issues.push(...l.ctx.common.issues),l.result;const o=i.map(l=>new $a(l.ctx.common.issues));return Ge(r,{code:Ie.invalid_union,unionErrors:o}),It}if(r.common.async)return Promise.all(n.map(async i=>{const o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const c of n){const d={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:d});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const l=o.map(c=>new $a(c));return Ge(r,{code:Ie.invalid_union,unionErrors:l}),It}}get options(){return this._def.options}}qg.create=(e,t)=>new qg({options:e,typeName:At.ZodUnion,...Vt(t)});const tl=e=>e instanceof Kg?tl(e.schema):e instanceof Vi?tl(e.innerType()):e instanceof Qg?[e.value]:e instanceof Zc?e.options:e instanceof Zg?cr.objectValues(e.enum):e instanceof Xg?tl(e._def.innerType):e instanceof Vg?[void 0]:e instanceof Hg?[null]:e instanceof Ao?[void 0,...tl(e.unwrap())]:e instanceof Xc?[null,...tl(e.unwrap())]:e instanceof WE||e instanceof ex?tl(e.unwrap()):e instanceof Jg?tl(e._def.innerType):[];class Qw extends Kt{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==tt.object)return Ge(r,{code:Ie.invalid_type,expected:tt.object,received:r.parsedType}),It;const n=this.discriminator,a=r.data[n],i=this.optionsMap.get(a);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(Ge(r,{code:Ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),It)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const a=new Map;for(const i of r){const o=tl(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const l of o){if(a.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);a.set(l,i)}}return new Qw({typeName:At.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:a,...Vt(n)})}}function dT(e,t){const r=hc(e),n=hc(t);if(e===t)return{valid:!0,data:e};if(r===tt.object&&n===tt.object){const a=cr.objectKeys(t),i=cr.objectKeys(e).filter(l=>a.indexOf(l)!==-1),o={...e,...t};for(const l of i){const c=dT(e[l],t[l]);if(!c.valid)return{valid:!1};o[l]=c.data}return{valid:!0,data:o}}else if(r===tt.array&&n===tt.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const o=e[i],l=t[i],c=dT(o,l);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else return r===tt.date&&n===tt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Yg extends Kt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=(i,o)=>{if(lT(i)||lT(o))return It;const l=dT(i.value,o.value);return l.valid?((cT(i)||cT(o))&&r.dirty(),{status:r.value,value:l.data}):(Ge(n,{code:Ie.invalid_intersection_types}),It)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Yg.create=(e,t,r)=>new Yg({left:e,right:t,typeName:At.ZodIntersection,...Vt(r)});class Fo extends Kt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==tt.array)return Ge(n,{code:Ie.invalid_type,expected:tt.array,received:n.parsedType}),It;if(n.data.length<this._def.items.length)return Ge(n,{code:Ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),It;!this._def.rest&&n.data.length>this._def.items.length&&(Ge(n,{code:Ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((o,l)=>{const c=this._def.items[l]||this._def.rest;return c?c._parse(new Lo(n,o,n.path,l)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>As.mergeArray(r,o)):As.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new Fo({...this._def,rest:t})}}Fo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fo({items:e,typeName:At.ZodTuple,rest:null,...Vt(t)})};class Gg extends Kt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==tt.object)return Ge(n,{code:Ie.invalid_type,expected:tt.object,received:n.parsedType}),It;const a=[],i=this._def.keyType,o=this._def.valueType;for(const l in n.data)a.push({key:i._parse(new Lo(n,l,n.path,l)),value:o._parse(new Lo(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?As.mergeObjectAsync(r,a):As.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Kt?new Gg({keyType:t,valueType:r,typeName:At.ZodRecord,...Vt(n)}):new Gg({keyType:Mi.create(),valueType:t,typeName:At.ZodRecord,...Vt(r)})}}class $0 extends Kt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==tt.map)return Ge(n,{code:Ie.invalid_type,expected:tt.map,received:n.parsedType}),It;const a=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([l,c],d)=>({key:a._parse(new Lo(n,l,n.path,[d,"key"])),value:i._parse(new Lo(n,c,n.path,[d,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of o){const d=await c.key,u=await c.value;if(d.status==="aborted"||u.status==="aborted")return It;(d.status==="dirty"||u.status==="dirty")&&r.dirty(),l.set(d.value,u.value)}return{status:r.value,value:l}})}else{const l=new Map;for(const c of o){const d=c.key,u=c.value;if(d.status==="aborted"||u.status==="aborted")return It;(d.status==="dirty"||u.status==="dirty")&&r.dirty(),l.set(d.value,u.value)}return{status:r.value,value:l}}}}$0.create=(e,t,r)=>new $0({valueType:t,keyType:e,typeName:At.ZodMap,...Vt(r)});class gu extends Kt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==tt.set)return Ge(n,{code:Ie.invalid_type,expected:tt.set,received:n.parsedType}),It;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(Ge(n,{code:Ie.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(Ge(n,{code:Ie.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const i=this._def.valueType;function o(c){const d=new Set;for(const u of c){if(u.status==="aborted")return It;u.status==="dirty"&&r.dirty(),d.add(u.value)}return{status:r.value,value:d}}const l=[...n.data.values()].map((c,d)=>i._parse(new Lo(n,c,n.path,d)));return n.common.async?Promise.all(l).then(c=>o(c)):o(l)}min(t,r){return new gu({...this._def,minSize:{value:t,message:mt.toString(r)}})}max(t,r){return new gu({...this._def,maxSize:{value:t,message:mt.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}gu.create=(e,t)=>new gu({valueType:e,minSize:null,maxSize:null,typeName:At.ZodSet,...Vt(t)});class zf extends Kt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==tt.function)return Ge(r,{code:Ie.invalid_type,expected:tt.function,received:r.parsedType}),It;function n(l,c){return D0({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,A0(),Sh].filter(d=>!!d),issueData:{code:Ie.invalid_arguments,argumentsError:c}})}function a(l,c){return D0({data:l,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,A0(),Sh].filter(d=>!!d),issueData:{code:Ie.invalid_return_type,returnTypeError:c}})}const i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Ch){const l=this;return ra(async function(...c){const d=new $a([]),u=await l._def.args.parseAsync(c,i).catch(m=>{throw d.addIssue(n(c,m)),d}),f=await Reflect.apply(o,this,u);return await l._def.returns._def.type.parseAsync(f,i).catch(m=>{throw d.addIssue(a(f,m)),d})})}else{const l=this;return ra(function(...c){const d=l._def.args.safeParse(c,i);if(!d.success)throw new $a([n(c,d.error)]);const u=Reflect.apply(o,this,d.data),f=l._def.returns.safeParse(u,i);if(!f.success)throw new $a([a(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new zf({...this._def,args:Fo.create(t).rest(Jd.create())})}returns(t){return new zf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new zf({args:t||Fo.create([]).rest(Jd.create()),returns:r||Jd.create(),typeName:At.ZodFunction,...Vt(n)})}}class Kg extends Kt{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Kg.create=(e,t)=>new Kg({getter:e,typeName:At.ZodLazy,...Vt(t)});class Qg extends Kt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Ge(r,{received:r.data,code:Ie.invalid_literal,expected:this._def.value}),It}return{status:"valid",value:t.data}}get value(){return this._def.value}}Qg.create=(e,t)=>new Qg({value:e,typeName:At.ZodLiteral,...Vt(t)});function E7(e,t){return new Zc({values:e,typeName:At.ZodEnum,...Vt(t)})}class Zc extends Kt{constructor(){super(...arguments),Wp.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return Ge(r,{expected:cr.joinValues(n),received:r.parsedType,code:Ie.invalid_type}),It}if(M0(this,Wp)||C7(this,Wp,new Set(this._def.values)),!M0(this,Wp).has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return Ge(r,{received:r.data,code:Ie.invalid_enum_value,options:n}),It}return ra(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Zc.create(t,{...this._def,...r})}exclude(t,r=this._def){return Zc.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}}Wp=new WeakMap;Zc.create=E7;class Zg extends Kt{constructor(){super(...arguments),Vp.set(this,void 0)}_parse(t){const r=cr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==tt.string&&n.parsedType!==tt.number){const a=cr.objectValues(r);return Ge(n,{expected:cr.joinValues(a),received:n.parsedType,code:Ie.invalid_type}),It}if(M0(this,Vp)||C7(this,Vp,new Set(cr.getValidEnumValues(this._def.values))),!M0(this,Vp).has(t.data)){const a=cr.objectValues(r);return Ge(n,{received:n.data,code:Ie.invalid_enum_value,options:a}),It}return ra(t.data)}get enum(){return this._def.values}}Vp=new WeakMap;Zg.create=(e,t)=>new Zg({values:e,typeName:At.ZodNativeEnum,...Vt(t)});class Ch extends Kt{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==tt.promise&&r.common.async===!1)return Ge(r,{code:Ie.invalid_type,expected:tt.promise,received:r.parsedType}),It;const n=r.parsedType===tt.promise?r.data:Promise.resolve(r.data);return ra(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Ch.create=(e,t)=>new Ch({type:e,typeName:At.ZodPromise,...Vt(t)});class Vi extends Kt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===At.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:o=>{Ge(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async l=>{if(r.value==="aborted")return It;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?It:c.status==="dirty"||r.value==="dirty"?bf(c.value):c});{if(r.value==="aborted")return It;const l=this._def.schema._parseSync({data:o,path:n.path,parent:n});return l.status==="aborted"?It:l.status==="dirty"||r.value==="dirty"?bf(l.value):l}}if(a.type==="refinement"){const o=l=>{const c=a.refinement(l,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?It:(l.status==="dirty"&&r.dirty(),o(l.value),{status:r.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?It:(l.status==="dirty"&&r.dirty(),o(l.value).then(()=>({status:r.value,value:l.value}))))}if(a.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ug(o))return o;const l=a.transform(o.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Ug(o)?Promise.resolve(a.transform(o.value,i)).then(l=>({status:r.value,value:l})):o);cr.assertNever(a)}}Vi.create=(e,t,r)=>new Vi({schema:e,typeName:At.ZodEffects,effect:t,...Vt(r)});Vi.createWithPreprocess=(e,t,r)=>new Vi({schema:t,effect:{type:"preprocess",transform:e},typeName:At.ZodEffects,...Vt(r)});class Ao extends Kt{_parse(t){return this._getType(t)===tt.undefined?ra(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ao.create=(e,t)=>new Ao({innerType:e,typeName:At.ZodOptional,...Vt(t)});class Xc extends Kt{_parse(t){return this._getType(t)===tt.null?ra(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xc.create=(e,t)=>new Xc({innerType:e,typeName:At.ZodNullable,...Vt(t)});class Xg extends Kt{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===tt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Xg.create=(e,t)=>new Xg({innerType:e,typeName:At.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Vt(t)});class Jg extends Kt{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return zg(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new $a(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new $a(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Jg.create=(e,t)=>new Jg({innerType:e,typeName:At.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Vt(t)});class L0 extends Kt{_parse(t){if(this._getType(t)!==tt.nan){const n=this._getOrReturnCtx(t);return Ge(n,{code:Ie.invalid_type,expected:tt.nan,received:n.parsedType}),It}return{status:"valid",value:t.data}}}L0.create=e=>new L0({typeName:At.ZodNaN,...Vt(e)});const _ce=Symbol("zod_brand");class WE extends Kt{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class fv extends Kt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?It:i.status==="dirty"?(r.dirty(),bf(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?It:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(t,r){return new fv({in:t,out:r,typeName:At.ZodPipeline})}}class ex extends Kt{_parse(t){const r=this._def.innerType._parse(t),n=a=>(Ug(a)&&(a.value=Object.freeze(a.value)),a);return zg(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}ex.create=(e,t)=>new ex({innerType:e,typeName:At.ZodReadonly,...Vt(t)});function O7(e,t={},r){return e?kh.create().superRefine((n,a)=>{var i,o;if(!e(n)){const l=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,c=(o=(i=l.fatal)!==null&&i!==void 0?i:r)!==null&&o!==void 0?o:!0,d=typeof l=="string"?{message:l}:l;a.addIssue({code:"custom",...d,fatal:c})}}):kh.create()}const Pce={object:cn.lazycreate};var At;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(At||(At={}));const Ece=(e,t={message:`Input not instance of ${e.name}`})=>O7(r=>r instanceof e,t),A7=Mi.create,D7=Kc.create,Oce=L0.create,Ace=Qc.create,M7=Wg.create,Dce=pu.create,Mce=I0.create,Ice=Vg.create,Rce=Hg.create,$ce=kh.create,Lce=Jd.create,Fce=Ml.create,Bce=R0.create,Uce=Fi.create,zce=cn.create,Wce=cn.strictCreate,Vce=qg.create,Hce=Qw.create,qce=Yg.create,Yce=Fo.create,Gce=Gg.create,Kce=$0.create,Qce=gu.create,Zce=zf.create,Xce=Kg.create,Jce=Qg.create,ede=Zc.create,tde=Zg.create,rde=Ch.create,TI=Vi.create,nde=Ao.
573create,sde=Xc.create,ade=Vi.createWithPreprocess,ide=fv.create,ode=()=>A7().optional(),lde=()=>D7().optional(),cde=()=>M7().optional(),dde={string:e=>Mi.create({...e,coerce:!0}),number:e=>Kc.create({...e,coerce:!0}),boolean:e=>Wg.create({...e,coerce:!0}),bigint:e=>Qc.create({...e,coerce:!0}),date:e=>pu.create({...e,coerce:!0})},ude=It;var Ae=Object.freeze({__proto__:null,defaultErrorMap:Sh,setErrorMap:uce,getErrorMap:A0,makeIssue:D0,EMPTY_PATH:fce,addIssueToContext:Ge,ParseStatus:As,INVALID:It,DIRTY:bf,OK:ra,isAborted:lT,isDirty:cT,isValid:Ug,isAsync:zg,get util(){return cr},get objectUtil(){return oT},ZodParsedType:tt,getParsedType:hc,ZodType:Kt,datetimeRegex:P7,ZodString:Mi,ZodNumber:Kc,ZodBigInt:Qc,ZodBoolean:Wg,ZodDate:pu,ZodSymbol:I0,ZodUndefined:Vg,ZodNull:Hg,ZodAny:kh,ZodUnknown:Jd,ZodNever:Ml,ZodVoid:R0,ZodArray:Fi,ZodObject:cn,ZodUnion:qg,ZodDiscriminatedUnion:Qw,ZodIntersection:Yg,ZodTuple:Fo,ZodRecord:Gg,ZodMap:$0,ZodSet:gu,ZodFunction:zf,ZodLazy:Kg,ZodLiteral:Qg,ZodEnum:Zc,ZodNativeEnum:Zg,ZodPromise:Ch,ZodEffects:Vi,ZodTransformer:Vi,ZodOptional:Ao,ZodNullable:Xc,ZodDefault:Xg,ZodCatch:Jg,ZodNaN:L0,BRAND:_ce,ZodBranded:WE,ZodPipeline:fv,ZodReadonly:ex,custom:O7,Schema:Kt,ZodSchema:Kt,late:Pce,get ZodFirstPartyTypeKind(){return At},coerce:dde,any:$ce,array:Uce,bigint:Ace,boolean:M7,date:Dce,discriminatedUnion:Hce,effect:TI,enum:ede,function:Zce,instanceof:Ece,intersection:qce,lazy:Xce,literal:Jce,map:Kce,nan:Oce,nativeEnum:tde,never:Fce,null:Rce,nullable:sde,number:D7,object:zce,oboolean:cde,onumber:lde,optional:nde,ostring:ode,pipeline:ide,preprocess:ade,promise:rde,record:Gce,set:Qce,strictObject:Wce,string:A7,symbol:Mce,transformer:TI,tuple:Yce,undefined:Ice,union:Vce,unknown:Lce,void:Bce,NEVER:ude,ZodIssueCode:Ie,quotelessJson:dce,ZodError:$a});const ln={INT8_MIN:-128,INT8_MAX:127,INT8_UNSIGNED_MAX:255,INT16_MIN:-32768,INT16_MAX:32767,INT16_UNSIGNED_MAX:65535,INT24_MIN:-8388608,INT24_MAX:8388607,INT24_UNSIGNED_MAX:16777215,INT32_MIN:-2147483648,INT32_MAX:2147483647,INT32_UNSIGNED_MAX:4294967295,INT48_MIN:-0x800000000000,INT48_MAX:0x7fffffffffff,INT48_UNSIGNED_MAX:0xffffffffffff,INT64_MIN:-9223372036854775808n,INT64_MAX:9223372036854775807n,INT64_UNSIGNED_MAX:18446744073709551615n};function Cn(e,t){return t.includes(e.columnType)}function fde(e){return"enumValues"in e&&Array.isArray(e.enumValues)&&e.enumValues.length>0}const hde=Ae.union([Ae.string(),Ae.number(),Ae.boolean(),Ae.null()]),mde=Ae.union([hde,Ae.record(Ae.any()),Ae.array(Ae.any())]),pde=Ae.custom(e=>e instanceof Buffer);function I7(e,t){const r=(t==null?void 0:t.zodInstance)??Ae,n=(t==null?void 0:t.coerce)??{};let a;return fde(e)&&(a=e.enumValues.length?r.enum(e.enumValues):r.string()),a||(Cn(e,["PgGeometry","PgPointTuple"])?a=r.tuple([r.number(),r.number()]):Cn(e,["PgGeometryObject","PgPointObject"])?a=r.object({x:r.number(),y:r.number()}):Cn(e,["PgHalfVector","PgVector"])?(a=r.array(r.number()),a=e.dimensions?a.length(e.dimensions):a):Cn(e,["PgLine"])?a=r.tuple([r.number(),r.number(),r.number()]):Cn(e,["PgLineABC"])?a=r.object({a:r.number(),b:r.number(),c:r.number()}):Cn(e,["PgArray"])?(a=r.array(I7(e.baseColumn,r)),a=e.size?a.length(e.size):a):e.dataType==="array"?a=r.array(r.any()):e.dataType==="number"?a=gde(e,r,n):e.dataType==="bigint"?a=xde(e,r,n):e.dataType==="boolean"?a=n===!0||n.boolean?r.coerce.boolean():r.boolean():e.dataType==="date"?a=n===!0||n.date?r.coerce.date():r.date():e.dataType==="string"?a=vde(e,r,n):e.dataType==="json"?a=mde:e.dataType==="custom"?a=r.any():e.dataType==="buffer"&&(a=pde)),a||(a=r.any()),a}function gde(e,t,r){let n=e.getSQLType().includes("unsigned"),a,i,o=!1;Cn(e,["MySqlTinyInt","SingleStoreTinyInt"])?(a=n?0:ln.INT8_MIN,i=n?ln.INT8_UNSIGNED_MAX:ln.INT8_MAX,o=!0):Cn(e,["PgSmallInt","PgSmallSerial","MySqlSmallInt","SingleStoreSmallInt"])?(a=n?0:ln.INT16_MIN,i=n?ln.INT16_UNSIGNED_MAX:ln.INT16_MAX,o=!0):Cn(e,["PgReal","MySqlFloat","MySqlMediumInt","SingleStoreMediumInt","SingleStoreFloat"])?(a=n?0:ln.INT24_MIN,i=n?ln.INT24_UNSIGNED_MAX:ln.INT24_MAX,o=Cn(e,["MySqlMediumInt","SingleStoreMediumInt"])):Cn(e,["PgInteger","PgSerial","MySqlInt","SingleStoreInt"])?(a=n?0:ln.INT32_MIN,i=n?ln.INT32_UNSIGNED_MAX:ln.INT32_MAX,o=!0):Cn(e,["PgDoublePrecision","MySqlReal","MySqlDouble","SingleStoreReal","SingleStoreDouble","SQLiteReal"])?(a=n?0:ln.INT48_MIN,i=n?ln.INT48_UNSIGNED_MAX:ln.INT48_MAX):Cn(e,["PgBigInt53","PgBigSeri
573al53","MySqlBigInt53","MySqlSerial","SingleStoreBigInt53","SingleStoreSerial","SQLiteInteger"])?(n=n||Cn(e,["MySqlSerial","SingleStoreSerial"]),a=n?0:Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER,o=!0):Cn(e,["MySqlYear","SingleStoreYear"])?(a=1901,i=2155,o=!0):(a=Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER);let l=r===!0||r!=null&&r.number?t.coerce.number():t.number();return l=l.min(a).max(i),o?l.int():l}function xde(e,t,r){const n=e.getSQLType().includes("unsigned"),a=n?0n:ln.INT64_MIN,i=n?ln.INT64_UNSIGNED_MAX:ln.INT64_MAX;return(r===!0||r!=null&&r.bigint?t.coerce.bigint():t.bigint()).min(a).max(i)}function vde(e,t,r){if(Cn(e,["PgUUID"]))return t.string().uuid();let n,a,i=!1;Cn(e,["PgVarchar","SQLiteText"])?n=e.length:Cn(e,["MySqlVarChar","SingleStoreVarChar"])?n=e.length??ln.INT16_UNSIGNED_MAX:Cn(e,["MySqlText","SingleStoreText"])&&(e.textType==="longtext"?n=ln.INT32_UNSIGNED_MAX:e.textType==="mediumtext"?n=ln.INT24_UNSIGNED_MAX:e.textType==="text"?n=ln.INT16_UNSIGNED_MAX:n=ln.INT8_UNSIGNED_MAX),Cn(e,["PgChar","MySqlChar","SingleStoreChar"])&&(n=e.length,i=!0),Cn(e,["PgBinaryVector"])&&(a=/^[01]+$/,n=e.dimensions);let o=r===!0||r!=null&&r.string?t.coerce.string():t.string();return o=a?o.regex(a):o,n&&i?o.length(n):n?o.max(n):o}function R7(e){return HW(e)?Rle(e):$le(e)}function $7(e,t,r,n){const a={};for(const[i,o]of Object.entries(e)){if(!$n(o,Nh)&&!$n(o,wn)&&!$n(o,wn.Aliased)&&typeof o=="object"){const f=HW(o)||Ile(o)?R7(o):o;a[i]=$7(f,t[i]??{},r,n);continue}const l=t[i];if(l!==void 0&&typeof l!="function"){a[i]=l;continue}const c=$n(o,Nh)?o:void 0,d=c?I7(c,n):Ae.any(),u=typeof l=="function"?l(d):d;r.never(c)||(a[i]=u,c&&(r.nullable(c)&&(a[i]=a[i].nullable()),r.optional(c)&&(a[i]=a[i].optional())))}return Ae.object(a)}const yde={never:e=>{var t,r;return((t=e==null?void 0:e.generated)==null?void 0:t.type)==="always"||((r=e==null?void 0:e.generatedIdentity)==null?void 0:r.type)==="always"},optional:e=>!e.notNull||e.notNull&&e.hasDefault,nullable:e=>!e.notNull},rr=(e,t)=>{const r=R7(e);return $7(r,{},yde)};Xt("session",{sid:m7("sid").primaryKey(),sess:CV("sess").notNull(),expire:qe("expire",{precision:6}).notNull()});const St={ADMIN:"admin",COMPANY_ADMIN:"company_admin",TEAM_MANAGER:"team_manager",USER:"user"},ws={FREE:"free",INDIVIDUAL:"individual",TEAM:"team",ORGANIZATION:"organization"},rl={ACTIVE:"active",TRIALING:"trialing",PAST_DUE:"past_due",CANCELED:"canceled",EXPIRED:"expired",UNPAID:"unpaid"},bde=Xt("users",{id:Zt("id").primaryKey(),username:re("username").notNull().unique(),password:re("password").notNull(),email:re("email").notNull().unique(),emailVerified:_t("email_verified").default(!1),firstName:re("first_name"),lastName:re("last_name"),displayName:re("display_name"),profilePicture:re("profile_picture"),avatarColor:re("avatar_color"),bio:re("bio"),timezone:re("timezone").default("UTC"),role:re("role").notNull().default(St.USER),organizationId:Se("organization_id"),teamId:Se("team_id"),stripeCustomerId:re("stripe_customer_id").unique(),hasFreeAccess:_t("has_free_access").default(!1),trialEndsAt:qe("trial_ends_at"),forcePasswordChange:_t("force_password_change").default(!1)});rr(bde).pick({username:!0,password:!0,email:!0,emailVerified:!0,firstName:!0,lastName:!0,displayName:!0,profilePicture:!0,avatarColor:!0,bio:!0,timezone:!0,role:!0,organizationId:!0,teamId:!0,stripeCustomerId:!0,hasFreeAccess:!0,trialEndsAt:!0,forcePasswordChange:!0});const jde=Xt("organizations",{id:Zt("id").primaryKey(),name:re("name").notNull(),description:re("description"),stripeCustomerId:re("stripe_customer_id").unique(),trialEndsAt:qe("trial_ends_at"),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow()});rr(jde).pick({name:!0,description:!0,stripeCustomerId:!0,trialEndsAt:!0});const wde=Xt("teams",{id:Zt("id").primaryKey(),name:re("name").notNull(),description:re("description"),organizationId:Se("organization_id").notNull(),stripeCustomerId:re("stripe_customer_id").unique(),trialEndsAt:qe("trial_ends_at"),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow()});rr(wde).pick({name:!0,description:!0,organizationId:!0,stripeCustomerId:!0,trialEndsAt:!0});const Nde=Xt("calendar_integrations",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),type:re("type").notNull(),name:re("name"),accessToken:re("access_token"),refreshToken:re("refresh_token"),expiresAt:qe("expires_at"),calendarId:re("calendar_id"),lastSynced:qe("last_synced"),isConnected:_t("is_connected").default(!1),isPrimary:_t("is_primary").default(!1),webhookUrl:re("webhook_url"),apiKey:re("api_key"),metadata:nr("metadata"),settings:nr("settings"),status:re("status"),scope:re("scope"),error:re("error")});rr(Nde).pick({userId:!0,type:!0,name:!0,accessToken:!0,refreshToken:!0,expiresAt:!0,calendarId:!0,lastSynced:!0,isConnected:!0,isPrimary:!0,webhookUrl:!0,apiKey:!0,metadata:!0});const Sde=Xt("events",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),title:re("title").notNull(),description:re("description"),startTime:qe("start_time").notNull(),endTime:qe("end_time").notNull(),location:re("location"),meetingUrl:re("meeting_url"),isAllDay:_t("is_all_day").default(!1),externalId:re("external_id"),calendarType:re("calendar_type"),calendarIntegrationId:Se("calendar_integration_id"),attendees:nr("attendees").default([]),reminders:nr("reminders").default([]),timezone:re("timezone"),recurrence:re("recurrence"),status:re("status"),visibility:re("visibility")}),kde=rr(Sde).pick({userId:!0,title:!0,description:!0,startTime:!0,endTime:!0,location:!0,meetingUrl:!0,isAllDay:!0,externalId:!0,calendarType:!0,calendarIntegrationId:!0,attendees:!0,reminders:!0,timezone:!0,recurrence:!0}),Cde=Xt("booking_links",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),teamId:Se("team_id"),isTeamBooking:_t("is_team_booking").default(!1),teamMemberIds:nr("team_member_ids").default([]),assignmentMethod:re("assignment_method").default("round-robin"),slug:re("slug").notNull(),title:re("title").notNull(),description:re("description"),duration:Se("duration").notNull(),availability:nr("availability").default({window:30,days:["1","2","3","4","5"],hours:{start:"09:00",end:"17:00"}}),meetingType:re("meeting_type").default("in-person"),location:re("location"),meetingUrl:re("meeting_url"),bufferBefore:Se("buffer_before").default(0),bufferAfter:Se("buffer_after").default(0),maxBookingsPerDay:Se("max_bookings_per_day").default(0),leadTime:Se("lead_time").default(60),startTimeIncrement:Se("start_time_increment").default(30),isHidden:_t("is_hidden").default(!1),availabilityScheduleId:Se("availability_schedule_id"),brandLogo:re("brand_logo"),brandColor:re("brand_color"),removeBranding:_t("remove_branding").default(!1),redirectUrl:re("redirect_url"),confirmationMessage:re("confirmation_message"),confirmationCta:nr("confirmation_cta"),isOneOff:_t("is_one_off").default(!1),isExpired:_t("is_expired").default(!1),requirePayment:_t("require_payment").default(!1),price:Se("price"),currency:re("currency").default("usd"),autoCreateMeetLink:_t("auto_create_meet_link").default(!1),teamMemberWeights:nr("team_member_weights").default({}),maxBookingsPerWeek:Se("max_bookings_per_week").default(0),maxBookingsPerMonth:Se("max_bookings_per_month").default(0),isCollective:_t("is_collective").default(!1),collectiveMemberIds:nr("collective_member_ids").default([]),rotatingMemberIds:nr("rotating_member_ids").default([]),isManagedTemplate:_t("is_managed_template").default(!1),managedTemplateId:Se("managed_template_id"),lockedFields:nr("locked_fields").default([]),requiresConfirmation:_t("requires_confirmation").default(!1),maxSeats:Se("max_seats").default(0),allowRecurring:_t("allow_recurring").default(!1),recurringOptions:nr("recurring_options").default({maxOccurrences:12,frequencies:["weekly"]}),roundRobinGroups:nr("round_robin_groups").default([])},e=>[cce("idx_booking_links_user_slug").on(e.userId,e.slug)]),Tde=rr(Cde),_de=Xt("bookings",{id:Zt("id").primaryKey(),bookingLinkId:Se("booking_link_id").notNull(),name:re("name").notNull(),email:re("email").notNull(),startTime:qe("start_time").notNull(),endTime:qe("end_time").notNull(),notes:re("notes"),status:re("status").default("
573confirmed"),eventId:Se("event_id"),assignedUserId:Se("assigned_user_id"),customAnswers:nr("custom_answers").default([]),noShowMarkedAt:qe("no_show_marked_at"),noShowMarkedBy:Se("no_show_marked_by"),reconfirmationSentAt:qe("reconfirmation_sent_at"),reconfirmationStatus:re("reconfirmation_status"),reconfirmationToken:re("reconfirmation_token"),collectiveAttendeeIds:nr("collective_attendee_ids").default([]),paymentStatus:re("payment_status"),paymentIntentId:re("payment_intent_id"),paymentAmount:Se("payment_amount"),paymentCurrency:re("payment_currency"),meetingUrl:re("meeting_url"),confirmationToken:re("confirmation_token"),confirmedAt:qe("confirmed_at"),declinedAt:qe("declined_at"),declineReason:re("decline_reason"),recurringGroupId:re("recurring_group_id"),recurringFrequency:re("recurring_frequency"),recurringCount:Se("recurring_count"),recurringIndex:Se("recurring_index"),externalId:re("external_id"),createdAt:qe("created_at").defaultNow()});rr(_de).pick({bookingLinkId:!0,name:!0,email:!0,startTime:!0,endTime:!0,notes:!0,status:!0,eventId:!0,assignedUserId:!0,customAnswers:!0,noShowMarkedAt:!0,noShowMarkedBy:!0,reconfirmationSentAt:!0,reconfirmationStatus:!0,reconfirmationToken:!0,paymentStatus:!0,paymentIntentId:!0,paymentAmount:!0,paymentCurrency:!0,meetingUrl:!0,collectiveAttendeeIds:!0,confirmationToken:!0,confirmedAt:!0,declinedAt:!0,declineReason:!0,recurringGroupId:!0,recurringFrequency:!0,recurringCount:!0,recurringIndex:!0,externalId:!0});const Pde=Xt("settings",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull().unique(),defaultReminders:nr("default_reminders").default([15]),emailNotifications:_t("email_notifications").default(!0),pushNotifications:_t("push_notifications").default(!0),defaultCalendar:re("default_calendar").default("google"),defaultCalendarIntegrationId:Se("default_calendar_integration_id"),defaultMeetingDuration:Se("default_meeting_duration").default(30),showDeclinedEvents:_t("show_declined_events").default(!1),combinedView:_t("combined_view").default(!0),preferredTimezone:re("preferred_timezone").default("UTC"),workingHours:nr("working_hours").default({0:{enabled:!1,start:"09:00",end:"17:00"},1:{enabled:!0,start:"09:00",end:"17:00"},2:{enabled:!0,start:"09:00",end:"17:00"},3:{enabled:!0,start:"09:00",end:"17:00"},4:{enabled:!0,start:"09:00",end:"17:00"},5:{enabled:!0,start:"09:00",end:"17:00"},6:{enabled:!1,start:"09:00",end:"17:00"}}),timeFormat:re("time_format").default("12h"),timeBlocks:nr("time_blocks").default([]),metadata:nr("metadata")});rr(Pde).pick({userId:!0,defaultReminders:!0,emailNotifications:!0,pushNotifications:!0,defaultCalendar:!0,defaultCalendarIntegrationId:!0,defaultMeetingDuration:!0,showDeclinedEvents:!0,combinedView:!0,preferredTimezone:!0,workingHours:!0,timeFormat:!0,timeBlocks:!0});const Ede=Xt("subscriptions",{id:Zt("id").primaryKey(),stripeCustomerId:re("stripe_customer_id").unique(),stripeSubscriptionId:re("stripe_subscription_id").unique(),plan:re("plan").notNull().default(ws.FREE),status:re("status").notNull().default(rl.TRIALING),priceId:re("price_id"),quantity:Se("quantity").default(1),trialEndsAt:qe("trial_ends_at"),startsAt:qe("starts_at"),currentPeriodStart:qe("current_period_start"),currentPeriodEnd:qe("current_period_end"),canceledAt:qe("canceled_at"),endedAt:qe("ended_at"),organizationId:Se("organization_id"),teamId:Se("team_id"),userId:Se("user_id"),metadata:nr("metadata"),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow(),amount:Se("amount"),interval:re("interval")});rr(Ede).pick({stripeCustomerId:!0,stripeSubscriptionId:!0,plan:!0,status:!0,priceId:!0,quantity:!0,trialEndsAt:!0,startsAt:!0,currentPeriodStart:!0,currentPeriodEnd:!0,canceledAt:!0,endedAt:!0,organizationId:!0,teamId:!0,userId:!0,metadata:!0});const Ode=Xt("payment_methods",{id:Zt("id").primaryKey(),stripeCustomerId:re("stripe_customer_id").notNull(),stripePaymentMethodId:re("stripe_payment_method_id").notNull().unique(),type:re("type").notNull(),isDefault:_t("is_default").default(!1),last4:re("last4"),brand:re("brand"),expiryMonth:Se("expiry_month"),expiryYear:Se("expiry_year"),organizationId:Se("organization_id"),teamId:Se("team_id"),userId:Se("user_id"),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow()});
573rr(Ode).pick({stripeCustomerId:!0,stripePaymentMethodId:!0,type:!0,isDefault:!0,last4:!0,brand:!0,expiryMonth:!0,expiryYear:!0,organizationId:!0,teamId:!0,userId:!0});const Ade=Xt("invoices",{id:Zt("id").primaryKey(),stripeInvoiceId:re("stripe_invoice_id").notNull().unique(),stripeCustomerId:re("stripe_customer_id").notNull(),subscriptionId:Se("subscription_id"),status:re("status").notNull(),amountDue:Ob("amount_due").notNull(),amountPaid:Ob("amount_paid"),amountRemaining:Ob("amount_remaining"),currency:re("currency").notNull().default("usd"),invoiceNumber:re("invoice_number"),invoiceDate:aT("invoice_date").notNull(),dueDate:aT("due_date"),pdfUrl:re("pdf_url"),hostedInvoiceUrl:re("hosted_invoice_url"),organizationId:Se("organization_id"),teamId:Se("team_id"),userId:Se("user_id"),metadata:nr("metadata"),createdAt:qe("created_at").defaultNow()});rr(Ade).pick({stripeInvoiceId:!0,stripeCustomerId:!0,subscriptionId:!0,status:!0,amountDue:!0,amountPaid:!0,amountRemaining:!0,currency:!0,invoiceNumber:!0,invoiceDate:!0,dueDate:!0,pdfUrl:!0,hostedInvoiceUrl:!0,organizationId:!0,teamId:!0,userId:!0,metadata:!0});const Dde=Xt("password_reset_tokens",{id:Zt("id").primaryKey(),token:re("token").notNull().unique(),userId:Se("user_id").notNull(),email:re("email").notNull(),expiresAt:qe("expires_at").notNull(),createdAt:qe("created_at").defaultNow(),consumed:_t("consumed").default(!1)});rr(Dde).pick({token:!0,userId:!0,email:!0,expiresAt:!0,consumed:!0});const Mde=Xt("auto_login_tokens",{id:Zt("id").primaryKey(),token:re("token").notNull().unique(),userId:Se("user_id").notNull(),createdByUserId:Se("created_by_user_id").notNull(),expiresAt:qe("expires_at"),createdAt:qe("created_at").defaultNow(),revokedAt:qe("revoked_at"),lastUsedAt:qe("last_used_at"),useCount:Se("use_count").default(0),label:re("label")});rr(Mde).pick({token:!0,userId:!0,createdByUserId:!0,expiresAt:!0,label:!0});const Ide={PENDING:"pending",ACCEPTED:"accepted",REVOKED:"revoked"},Rde=Xt("user_invitations",{id:Zt("id").primaryKey(),token:re("token").notNull().unique(),email:re("email").notNull(),role:re("role").notNull().default(St.USER),organizationId:Se("organization_id"),teamId:Se("team_id"),isComped:_t("is_comped").default(!1),note:re("note"),invitedByUserId:Se("invited_by_user_id").notNull(),status:re("status").notNull().default(Ide.PENDING),expiresAt:qe("expires_at").notNull(),acceptedAt:qe("accepted_at"),acceptedUserId:Se("accepted_user_id"),createdAt:qe("created_at").defaultNow()});rr(Rde).pick({token:!0,email:!0,role:!0,organizationId:!0,teamId:!0,isComped:!0,note:!0,invitedByUserId:!0,status:!0,expiresAt:!0});const $de=Xt("workflows",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),name:re("name").notNull(),description:re("description"),triggerType:re("trigger_type").notNull(),triggerConfig:nr("trigger_config").default({}),isEnabled:_t("is_enabled").default(!0),isTemplate:_t("is_template").default(!1),templateId:Se("template_id"),version:Se("version").default(1),isManagedTemplate:_t("is_managed_template").default(!1),managedTemplateId:Se("managed_template_id"),lockedFields:nr("locked_fields").default([]),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow()});rr($de).pick({userId:!0,name:!0,description:!0,triggerType:!0,triggerConfig:!0,isEnabled:!0,isTemplate:!0,templateId:!0,version:!0,isManagedTemplate:!0,managedTemplateId:!0,lockedFields:!0});const Lde=Xt("workflow_steps",{id:Zt("id").primaryKey(),workflowId:Se("workflow_id").notNull(),actionType:re("action_type").notNull(),actionConfig:nr("action_config").default({}),orderIndex:Se("order_index").notNull(),parentStepId:Se("parent_step_id"),branchCondition:re("branch_condition"),conditionConfig:nr("condition_config"),delayMinutes:Se("delay_minutes").default(0),createdAt:qe("created_at").defaultNow()});rr(Lde).pick({workflowId:!0,actionType:!0,actionConfig:!0,orderIndex:!0,parentStepId:!0,branchCondition:!0,conditionConfig:!0,delayMinutes:!0});const Fde=Xt("workflow_executions",{id:Zt("id").primaryKey(),workflowId:Se("workflow_id").notNull(),triggerData:nr("trigger_data").default({}
573),status:re("status").notNull().default("pending"),startedAt:qe("started_at").defaultNow(),completedAt:qe("completed_at"),errorMessage:re("error_message"),stepsCompleted:Se("steps_completed").default(0),totalSteps:Se("total_steps").default(0),metadata:nr("metadata").default({})});rr(Fde).pick({workflowId:!0,triggerData:!0,status:!0,startedAt:!0,completedAt:!0,errorMessage:!0,stepsCompleted:!0,totalSteps:!0,metadata:!0});const Bde=Xt("workflow_step_executions",{id:Zt("id").primaryKey(),executionId:Se("execution_id").notNull(),stepId:Se("step_id").notNull(),status:re("status").notNull().default("pending"),startedAt:qe("started_at"),completedAt:qe("completed_at"),output:nr("output").default({}),errorMessage:re("error_message")});rr(Bde).pick({executionId:!0,stepId:!0,status:!0,startedAt:!0,completedAt:!0,output:!0,errorMessage:!0});const Ude=Xt("appointments",{id:Zt("id").primaryKey(),externalId:re("external_id"),source:re("source").notNull().default("internal"),type:re("type").notNull().default("initial_consultation"),status:re("status").notNull().default("scheduled"),scheduledAt:qe("scheduled_at").notNull(),duration:Se("duration").notNull().default(30),timezone:re("timezone").default("UTC"),clientExternalId:re("client_external_id"),clientEmail:re("client_email").notNull(),clientName:re("client_name").notNull(),clientPhone:re("client_phone"),hostUserId:Se("host_user_id"),hostExternalId:re("host_external_id"),hostEmail:re("host_email"),hostName:re("host_name"),hostRole:re("host_role").default("advisor"),location:re("location"),meetingUrl:re("meeting_url"),notes:re("notes"),metadata:nr("metadata").default({}),organizationId:Se("organization_id"),teamId:Se("team_id"),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow(),completedAt:qe("completed_at"),cancelledAt:qe("cancelled_at")});rr(Ude).pick({externalId:!0,source:!0,type:!0,status:!0,scheduledAt:!0,duration:!0,timezone:!0,clientExternalId:!0,clientEmail:!0,clientName:!0,clientPhone:!0,hostUserId:!0,hostExternalId:!0,hostEmail:!0,hostName:!0,hostRole:!0,location:!0,meetingUrl:!0,notes:!0,metadata:!0,organizationId:!0,teamId:!0});const zde=Xt("webhook_integrations",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),organizationId:Se("organization_id"),name:re("name").notNull(),source:re("source").notNull(),webhookSecret:re("webhook_secret").notNull(),isActive:_t("is_active").default(!0),apiKey:re("api_key"),apiEndpoint:re("api_endpoint"),callbackUrl:re("callback_url"),callbackSecret:re("callback_secret"),metadata:nr("metadata").default({}),lastWebhookAt:qe("last_webhook_at"),webhookCount:Se("webhook_count").default(0),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow()});rr(zde).pick({userId:!0,organizationId:!0,name:!0,source:!0,webhookSecret:!0,isActive:!0,apiKey:!0,apiEndpoint:!0,callbackUrl:!0,callbackSecret:!0,metadata:!0});const Wde=Xt("webhook_logs",{id:Zt("id").primaryKey(),integrationId:Se("integration_id").notNull(),eventType:re("event_type").notNull(),payload:nr("payload").default({}),signature:re("signature"),signatureValid:_t("signature_valid").default(!1),processed:_t("processed").default(!1),processingError:re("processing_error"),appointmentId:Se("appointment_id"),createdAt:qe("created_at").defaultNow()});rr(Wde).pick({integrationId:!0,eventType:!0,payload:!0,signature:!0,signatureValid:!0,processed:!0,processingError:!0,appointmentId:!0});const Vde=Xt("availability_schedules",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),name:re("name").notNull(),isDefault:_t("is_default").default(!1),timezone:re("timezone").default("UTC"),rules:nr("rules").default([]),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow()});rr(Vde).pick({userId:!0,name:!0,isDefault:!0,timezone:!0,rules:!0});const Hde=Xt("custom_questions",{id:Zt("id").primaryKey(),bookingLinkId:Se("booking_link_id").notNull(),label:re("label").notNull(),type:re("type").notNull(),required:_t("required").default(!1),options:nr("options").default([]),orderIndex:Se("order_index").notNull().default(0),enabled:_t("enabled").default(!0),createdAt:qe("created_at").defaultNow()});rr(Hde).pick({bookingLinkId:!0,label:!0,type:!0,required:!0,options:!0,orderIndex:!0,enabled:!0});const qde=Xt("date_overrides",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),date:re("override_date").notNull(),isAvailable:_t("is_available").default(!0),startTime:re("start_time"),endTime:re("end_time"),label:re("label"),createdAt:qe("created_at").defaultNow()});rr(qde).pick({userId:!0,date:!0,isAvailable:!0,startTime:!0,endTime:!0,label:!0});const Yde=Xt("meeting_polls",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),title:re("title").notNull(),description:re("description"),slug:re("slug").notNull().unique(),duration:Se("duration").notNull(),location:re("location"),meetingUrl:re("meeting_url"),status:re("status").default("open"),deadline:qe
573("deadline"),selectedOptionId:Se("selected_option_id"),timezone:re("timezone").default("UTC"),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow()});rr(Yde).pick({userId:!0,title:!0,description:!0,slug:!0,duration:!0,location:!0,meetingUrl:!0,status:!0,deadline:!0,selectedOptionId:!0,timezone:!0});const Gde=Xt("meeting_poll_options",{id:Zt("id").primaryKey(),pollId:Se("poll_id").notNull(),startTime:qe("start_time").notNull(),endTime:qe("end_time").notNull(),createdAt:qe("created_at").defaultNow()});rr(Gde).pick({pollId:!0,startTime:!0,endTime:!0});const Kde=Xt("meeting_poll_votes",{id:Zt("id").primaryKey(),pollId:Se("poll_id").notNull(),optionId:Se("option_id").notNull(),voterName:re("voter_name").notNull(),voterEmail:re("voter_email").notNull(),vote:re("vote").notNull().default("yes"),createdAt:qe("created_at").defaultNow()});rr(Kde).pick({pollId:!0,optionId:!0,voterName:!0,voterEmail:!0,vote:!0});const Qde=Xt("slack_integrations",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),webhookUrl:re("webhook_url").notNull(),channelName:re("channel_name"),notifyOnBooking:_t("notify_on_booking").default(!0),notifyOnCancellation:_t("notify_on_cancellation").default(!0),notifyOnReschedule:_t("notify_on_reschedule").default(!0),notifyOnNoShow:_t("notify_on_no_show").default(!1),isActive:_t("is_active").default(!0),createdAt:qe("created_at").defaultNow()});rr(Qde).pick({userId:!0,webhookUrl:!0,channelName:!0,notifyOnBooking:!0,notifyOnCancellation:!0,notifyOnReschedule:!0,notifyOnNoShow:!0,isActive:!0});const Zde=Xt("audit_logs",{id:Zt("id").primaryKey(),userId:Se("user_id"),organizationId:Se("organization_id"),action:re("action").notNull(),entityType:re("entity_type"),entityId:Se("entity_id"),details:nr("details").default({}),ipAddress:re("ip_address"),userAgent:re("user_agent"),createdAt:qe("created_at").defaultNow()});rr(Zde).pick({userId:!0,organizationId:!0,action:!0,entityType:!0,entityId:!0,details:!0,ipAddress:!0,userAgent:!0});const Xde=Xt("domain_controls",{id:Zt("id").primaryKey(),organizationId:Se("organization_id").notNull(),domain:re("domain").notNull(),isVerified:_t("is_verified").default(!1),verificationToken:re("verification_token"),autoJoin:_t("auto_join").default(!1),createdAt:qe("created_at").defaultNow()});rr(Xde).pick({organizationId:!0,domain:!0,isVerified:!0,verificationToken:!0,autoJoin:!0});const Jde=Xt("data_retention_policies",{id:Zt("id").primaryKey(),organizationId:Se("organization_id").notNull(),entityType:re("entity_type").notNull(),retentionDays:Se("retention_days").notNull(),isActive:_t("is_active").default(!0),lastRunAt:qe("last_run_at"),deletedCount:Se("deleted_count").default(0),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow()});rr(Jde).pick({organizationId:!0,entityType:!0,retentionDays:!0,isActive:!0});const eue=Xt("scim_configs",{id:Zt("id").primaryKey(),organizationId:Se("organization_id").notNull(),bearerToken:re("bearer_token").notNull(),isActive:_t("is_active").default(!0),baseUrl:re("base_url"),lastSyncAt:qe("last_sync_at"),provisionedCount:Se("provisioned_count").default(0),createdAt:qe("created_at").defaultNow()});rr(eue).pick({organizationId:!0,bearerToken:!0,isActive:!0,baseUrl:!0});const tue=Xt("routing_forms",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),title:re("title").notNull(),slug:re("slug").notNull().unique(),description:re("description"),isActive:_t("is_active").default(!0),createdAt:qe("created_at").defaultNow(),updatedAt:qe("updated_at").defaultNow()});rr(tue).pick({userId:!0,title:!0,slug:!0,description:!0,isActive:!0});const rue=Xt("routing_form_questions",{id:Zt("id").primaryKey(),routingFormId:Se("routing_form_id").notNull(),label:re("label").notNull(),type:re("type").notNull(),options:nr("options").default([]),isRequired:_t("is_required").default(!0),orderIndex:Se("order_index").default(0)});rr(rue).pick({routingFormId:!0,label:!0,type:!0,options:!0,isRequired:!0,orderIndex:!0});const nue=Xt("routing_form_rules",{id:Zt("id").primaryKey(),routingFormId:Se("routing_form_id").notNull(),questionId:Se("question_id").notNull(),operator:re("operator").notNull(),value:re("value").notNull(),action:re("action").notNull(),targetBookingLinkId:Se("target_booking_link_id"),targetUrl:re("target_url"),targetMessage:re("target_message"),priority:Se("priority").default(0),isActive:_t("is_active").default(!0)});rr(nue).pick({routingFormId:!0,questionId:!0,operator:!0,value:!0,action:!0,targetBookingLinkId:!0,targetUrl:!0,targetMessage:!0,priority:!0,isActive:!0});const sue=Xt("routing_form_submissions",{id:Zt("id").primaryKey(),routingFormId:Se("routing_form_id").notNull(),answers:nr("answers").default({}),routedTo:re("routed_to"),routedBookingLinkId:Se("routed_booking_link_id"),submitterEmail:re("submitter_email"),submitterName:re("submitter_name"),createdAt:qe("created_at").defaultNow()});rr(sue).pick({routingFormId:!0,answers:!0,routedTo:!0,routedBookingLinkId:!0,submitterEmail:!0,submitterName:!0});const aue=Xt("out_of_office",{id:Zt("id").primaryKey(),userId:Se("user_id").notNull(),startDate:re("start_date").notNull(),endDate:re("end_date").notNull(),reason:re("reason"),redirectToUserId:Se("redirect_to_user_id"),redirectToBookingLinkSlug:re("redirect_to_booking_link_slug"),message:re("message"),isActive:_t("is_active").default(!0),createdAt:qe("created_at").defaultNow()});rr(aue).pick({userId:!0,startDate:!0,endDate:!0,reason:!0,redirectToUserId:!0,redirectToBookingLinkSlug:!0,message:!0,isActive:!0});const iue=Xt("custom_booking_domains",{id:Zt("id").primaryKey(),organizationId:Se("organization_id").notNull(),domain:re("domain").notNull().unique(),isVerified:_t("is_verified").default(!1),verificationMethod:re("verification_method").default("
573cname"),verificationToken:re("verification_token"),sslStatus:re("ssl_status").default("pending"),isActive:_t("is_active").default(!1),createdAt:qe("created_at").defaultNow(),verifiedAt:qe("verified_at")});rr(iue).pick({organizationId:!0,domain:!0,isVerified:!0,verificationMethod:!0,verificationToken:!0,sslStatus:!0,isActive:!0});const L7=p.createContext({user:null,setUser:()=>{},organization:null,team:null,isAdmin:!1,isCompanyAdmin:!1,isTeamManager:!1,login:async()=>{},logout:async()=>{},refreshUser:async()=>{},loading:!1,error:null}),gn=()=>p.useContext(L7),oue=({children:e})=>{var k,T,C;const[t,r]=p.useState(null),[n,a]=p.useState(null),[i,o]=p.useState(null),[l,c]=p.useState(!0),[d,u]=p.useState(!1),[f,h]=p.useState(null),{toast:m}=Qt();p.useEffect(()=>{(async()=>{try{const P=localStorage.getItem("user");if(P)try{const _=JSON.parse(P);r(_);const I=await g();I?(console.log("UserContext: Updating user with fresh data from server"),r(I),localStorage.setItem("user",JSON.stringify(I)),x(I)):(console.log("UserContext: Using cached user data from localStorage"),x(_))}catch(_){console.error("Failed to parse stored user",_),localStorage.removeItem("user")}else{console.log("UserContext: No local user, checking server session (auto-login support)");const _=await g();_&&(console.log("UserContext: Found active server session, user logged in via auto-login or other server-side auth"),r(_),localStorage.setItem("user",JSON.stringify(_)),x(_))}}finally{c(!1)}})()},[]);const g=async()=>{try{console.log("UserContext: Fetching fresh user data from server");const E=await fetch("/api/users/current",{credentials:"include"});if(E.ok){const P=await E.json();return console.log("UserContext: Received fresh user data",P),P}else return console.error("UserContext: Failed to fetch current user data",E.statusText),null}catch(E){return console.error("UserContext: Error fetching current user data",E),null}},x=async E=>{if(E.organizationId)try{const P=await fetch(`/api/organizations/${E.organizationId}`);if(P.ok){const _=await P.json();a(_)}}catch(P){console.error("Failed to fetch organization details",P)}if(E.teamId)try{const P=await fetch(`/api/teams/${E.teamId}`);if(P.ok){const _=await P.json();o(_)}}catch(P){console.error("Failed to fetch team details",P)}},v=dt({mutationFn:async({username:E,password:P})=>{const _=await Ue("POST","/api/login",{username:E,password:P});if(_.status===403){const I=await _.json();if(I.message==="Email verification required")throw I.emailVerificationSent?(window.location.href=`/login?verification_resent=true&email=${encodeURIComponent(I.email||"")}`,new Error("Please verify your email address before logging in. A new verification email has been sent.")):(window.location.href=`/login?email_error=true&email=${encodeURIComponent(I.email||"")}`,new Error("We had trouble sending the verification email. Please try again later or contact support."))}if(!_.ok){const I=await _.json();throw new Error(I.message||"Login failed")}return _.json()},onSuccess:async E=>{if(r(E),localStorage.setItem("user",JSON.stringify(E)),E.forcePasswordChange){console.log("Login: User must change password on first login"),m({title:"Password Change Required",description:"Please change your password to continue."}),window.location.href="/change-password";return}const P=await g();P?(console.log("Login: Updating user with fresh data from server"),r(P),localStorage.setItem("user",JSON.stringify(P)),x(P)):(console.log("Login: Using data from login response"),x(E)),m({title:"Login successful",description:`Welcome back, ${E.displayName||E.username}!`})},onError:E=>{h(E.message),m({title:"Login failed",description:E.message,variant:"destructive"})}}),b=async(E,P)=>{c(!0),h(null);try{await v.mutateAsync({username:E,password:P})}finally{c(!1)}},y=async()=>{if(!t){console.log("UserContext: Cannot refresh, no user is logged in");return}console.log("UserContext: Refreshing user data"),c(!0);try{const E=await g();E?(console.log("UserContext: User data refreshed successfully"),r(E),localStorage.setItem("user",JSON.stringify(E)),x(E),Wt.invalidateQueries({queryKey:["/api/users"]})):console.error("UserContext: Failed to refresh user data")}catch(E){console.error("UserContext: Error refreshing user data",E)}finally{c(!1)}},j=async()=>
573{if(!d){u(!0);try{await fetch("/api/logout",{method:"POST",credentials:"include"})}catch(E){console.error("UserContext: Error calling server logout",E)}r(null),a(null),o(null),localStorage.removeItem("user"),m({title:"Logged out",description:"You have been successfully logged out."}),window.location.href="/"}};p.useEffect(()=>{var E,P;if(t&&(console.log("UserContext: User role check",{username:t.username,role:t.role,UserRoleAdmin:St.ADMIN,isExactMatch:t.role===St.ADMIN,isLowercaseMatch:((E=t.role)==null?void 0:E.toLowerCase())===St.ADMIN.toLowerCase(),roleType:typeof t.role}),((P=t.role)==null?void 0:P.toLowerCase())===St.ADMIN.toLowerCase()&&t.role!==St.ADMIN)){console.log("UserContext: Normalizing admin role to lowercase");const _={...t,role:St.ADMIN};r(_),localStorage.setItem("user",JSON.stringify(_))}},[t]);const w=((k=t==null?void 0:t.role)==null?void 0:k.toLowerCase())===St.ADMIN.toLowerCase(),N=((T=t==null?void 0:t.role)==null?void 0:T.toLowerCase())===St.COMPANY_ADMIN.toLowerCase(),S=((C=t==null?void 0:t.role)==null?void 0:C.toLowerCase())===St.TEAM_MANAGER.toLowerCase();return t&&console.log("UserContext: Role assignments",{username:t.username,role:t.role,isAdmin:w,isCompanyAdmin:N,isTeamManager:S,ADMIN:St.ADMIN,COMPANY_ADMIN:St.COMPANY_ADMIN,TEAM_MANAGER:St.TEAM_MANAGER}),s.jsx(L7.Provider,{value:{user:t,setUser:r,organization:n,team:i,isAdmin:w,isCompanyAdmin:N,isTeamManager:S,login:b,logout:j,refreshUser:y,loading:l,error:f},children:e})},uT={dashboard:!1,calendar:!1,profile:!1,team:!1,bookings:!1,settings:!1},lue={isFirstVisit:!0,isTutorialActive:!1,isTutorialCompleted:!1,showOnLogin:!0,activeFeatureTour:null,hotspotEnabled:!0,tutorialProgress:uT,startTutorial:()=>{},skipTutorial:()=>{},completeTutorial:()=>{},resetTutorial:()=>{},startFeatureTour:()=>{},exitFeatureTour:()=>{},markFeatureComplete:()=>{},toggleHotspots:()=>{},setShowOnLogin:()=>{}},F7=p.createContext(lue),cue=({children:e})=>{const[t,r]=p.useState(!0),[n,a]=p.useState(!1),[i,o]=p.useState(!1),[l,c]=p.useState(null),[d,u]=p.useState(uT),[f,h]=p.useState(!0),[m,g]=p.useState(!0);p.useEffect(()=>{const T=localStorage.getItem("isFirstVisit"),C=localStorage.getItem("isTutorialCompleted"),E=localStorage.getItem("tutorialProgress"),P=localStorage.getItem("hotspotEnabled"),_=localStorage.getItem("showOnLogin");T!==null&&r(T==="true"),C!==null&&o(C==="true"),E!==null&&u(JSON.parse(E)),P!==null&&h(P==="true"),_!==null&&g(_==="true")},[]),p.useEffect(()=>{localStorage.setItem("isFirstVisit",t.toString()),localStorage.setItem("isTutorialCompleted",i.toString()),localStorage.setItem("tutorialProgress",JSON.stringify(d)),localStorage.setItem("hotspotEnabled",f.toString()),localStorage.setItem("showOnLogin",m.toString())},[t,i,d,f,m]);const k={isFirstVisit:t,isTutorialActive:n,isTutorialCompleted:i,showOnLogin:m,activeFeatureTour:l,hotspotEnabled:f,tutorialProgress:d,startTutorial:()=>{a(!0),c("dashboard")},skipTutorial:()=>{a(!1),r(!1),c(null)},completeTutorial:()=>{a(!1),o(!0),r(!1),c(null)},resetTutorial:()=>{r(!0),a(!1),o(!1),u(uT),c(null)},startFeatureTour:T=>{c(T)},exitFeatureTour:()=>{c(null)},markFeatureComplete:T=>{u(P=>({...P,[T]:!0}));const C={...d,[T]:!0};Object.values(C).every(Boolean)&&o(!0)},toggleHotspots:()=>{h(T=>!T)},setShowOnLogin:g};return s.jsx(F7.Provider,{value:k,children:e})},hv=()=>p.useContext(F7);function B7(e){return t=>typeof t===e}var due=B7("function"),uue=e=>e===null,_I=e=>Object.prototype.toString.call(e).slice(8,-1)==="RegExp",PI=e=>!fue(e)&&!uue(e)&&(due(e)||typeof e=="object"),fue=B7("undefined");function hue(e,t){const{length:r}=e;if(r!==t.length)return!1;for(let n=r;n--!==0;)if(!Ys(e[n],t[n]))return!1;return!0}function mue(e,t){if(e.byteLength!==t.byteLength)return!1;const r=new DataView(e.buffer),n=new DataView(t.buffer);let a=e.byteLength;for(;a--;)if(r.getUint8(a)!==n.getUint8(a))return!1;return!0}function pue(e,t){if(e.size!==t.size)return!1;for(const r of e.entries())if(!t.has(r[0]))return!1;for(const r of e.entries())if(!Ys(r[1],t.get(r[0])))return!1;return!0}function gue(e,t){if(e.size!==t.size)return!1;
573for(const r of e.entries())if(!t.has(r[0]))return!1;return!0}function Ys(e,t){if(e===t)return!0;if(e&&PI(e)&&t&&PI(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return hue(e,t);if(e instanceof Map&&t instanceof Map)return pue(e,t);if(e instanceof Set&&t instanceof Set)return gue(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return mue(e,t);if(_I(e)&&_I(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let a=r.length;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[a]))return!1;for(let a=r.length;a--!==0;){const i=r[a];if(!(i==="_owner"&&e.$$typeof)&&!Ys(e[i],t[i]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}var xue=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],vue=["bigint","boolean","null","number","string","symbol","undefined"];function Zw(e){const t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(yue(t))return t}function Yi(e){return t=>Zw(t)===e}function yue(e){return xue.includes(e)}function wm(e){return t=>typeof t===e}function bue(e){return vue.includes(e)}var jue=["innerHTML","ownerDocument","style","attributes","nodeValue"];function rt(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(rt.array(e))return"Array";if(rt.plainFunction(e))return"Function";const t=Zw(e);return t||"Object"}rt.array=Array.isArray;rt.arrayOf=(e,t)=>!rt.array(e)&&!rt.function(t)?!1:e.every(r=>t(r));rt.asyncGeneratorFunction=e=>Zw(e)==="AsyncGeneratorFunction";rt.asyncFunction=Yi("AsyncFunction");rt.bigint=wm("bigint");rt.boolean=e=>e===!0||e===!1;rt.date=Yi("Date");rt.defined=e=>!rt.undefined(e);rt.domElement=e=>rt.object(e)&&!rt.plainObject(e)&&e.nodeType===1&&rt.string(e.nodeName)&&jue.every(t=>t in e);rt.empty=e=>rt.string(e)&&e.length===0||rt.array(e)&&e.length===0||rt.object(e)&&!rt.map(e)&&!rt.set(e)&&Object.keys(e).length===0||rt.set(e)&&e.size===0||rt.map(e)&&e.size===0;rt.error=Yi("Error");rt.function=wm("function");rt.generator=e=>rt.iterable(e)&&rt.function(e.next)&&rt.function(e.throw);rt.generatorFunction=Yi("GeneratorFunction");rt.instanceOf=(e,t)=>!e||!t?!1:Object.getPrototypeOf(e)===t.prototype;rt.iterable=e=>!rt.nullOrUndefined(e)&&rt.function(e[Symbol.iterator]);rt.map=Yi("Map");rt.nan=e=>Number.isNaN(e);rt.null=e=>e===null;rt.nullOrUndefined=e=>rt.null(e)||rt.undefined(e);rt.number=e=>wm("number")(e)&&!rt.nan(e);rt.numericString=e=>rt.string(e)&&e.length>0&&!Number.isNaN(Number(e));rt.object=e=>!rt.nullOrUndefined(e)&&(rt.function(e)||typeof e=="object");rt.oneOf=(e,t)=>rt.array(e)?e.indexOf(t)>-1:!1;rt.plainFunction=Yi("Function");rt.plainObject=e=>{if(Zw(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};rt.primitive=e=>rt.null(e)||bue(typeof e);rt.promise=Yi("Promise");rt.propertyOf=(e,t,r)=>{if(!rt.object(e)||!t)return!1;const n=e[t];return rt.function(r)?r(n):rt.defined(n)};rt.regexp=Yi("RegExp");rt.set=Yi("Set");rt.string=wm("string");rt.symbol=wm("symbol");rt.undefined=wm("undefined");rt.weakMap=Yi("WeakMap");rt.weakSet=Yi("WeakSet");var at=rt;function wue(...e){return e.every(t=>at.string(t)||at.array(t)||at.plainObject(t))}function Nue(e,t,r){return U7(e,t)?[e,t].every(at.array)?!e.some(MI(r))&&t.some(MI(r)):[e,t].every(at.plainObject)?!Object.entries(e).some(DI(r))&&Object.entries(t).some(DI(r)):t===r:!1}function EI(e,t,r){const{actual:n,key:a,previous:i,type:o}=r,l=wo(e,a),c=wo(t,a);let d=[l,c].every(at.number)&&(o==="increased"?l<c:l>c);return at.undefined(n)||(d=d&&c===n),at.undefined(i)||(d=d&&l===i),d}function OI(e,t,r){const{key:n,type:a,value:i}
573=r,o=wo(e,n),l=wo(t,n),c=a==="added"?o:l,d=a==="added"?l:o;if(!at.nullOrUndefined(i)){if(at.defined(c)){if(at.array(c)||at.plainObject(c))return Nue(c,d,i)}else return Ys(d,i);return!1}return[o,l].every(at.array)?!d.every(VE(c)):[o,l].every(at.plainObject)?Sue(Object.keys(c),Object.keys(d)):![o,l].every(u=>at.primitive(u)&&at.defined(u))&&(a==="added"?!at.defined(o)&&at.defined(l):at.defined(o)&&!at.defined(l))}function AI(e,t,{key:r}={}){let n=wo(e,r),a=wo(t,r);if(!U7(n,a))throw new TypeError("Inputs have different types");if(!wue(n,a))throw new TypeError("Inputs don't have length");return[n,a].every(at.plainObject)&&(n=Object.keys(n),a=Object.keys(a)),[n,a]}function DI(e){return([t,r])=>at.array(e)?Ys(e,r)||e.some(n=>Ys(n,r)||at.array(r)&&VE(r)(n)):at.plainObject(e)&&e[t]?!!e[t]&&Ys(e[t],r):Ys(e,r)}function Sue(e,t){return t.some(r=>!e.includes(r))}function MI(e){return t=>at.array(e)?e.some(r=>Ys(r,t)||at.array(t)&&VE(t)(r)):Ys(e,t)}function lp(e,t){return at.array(e)?e.some(r=>Ys(r,t)):Ys(e,t)}function VE(e){return t=>e.some(r=>Ys(r,t))}function U7(...e){return e.every(at.array)||e.every(at.number)||e.every(at.plainObject)||e.every(at.string)}function wo(e,t){return at.plainObject(e)||at.array(e)?at.string(t)?t.split(".").reduce((n,a)=>n&&n[a],e):at.number(t)?e[t]:e:e}function F0(e,t){if([e,t].some(at.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(u=>at.plainObject(u)||at.array(u)))throw new Error("Expected plain objects or array");return{added:(u,f)=>{try{return OI(e,t,{key:u,type:"added",value:f})}catch{return!1}},changed:(u,f,h)=>{try{const m=wo(e,u),g=wo(t,u),x=at.defined(f),v=at.defined(h);if(x||v){const b=v?lp(h,m):!lp(f,m),y=lp(f,g);return b&&y}return[m,g].every(at.array)||[m,g].every(at.plainObject)?!Ys(m,g):m!==g}catch{return!1}},changedFrom:(u,f,h)=>{if(!at.defined(u))return!1;try{const m=wo(e,u),g=wo(t,u),x=at.defined(h);return lp(f,m)&&(x?lp(h,g):!x)}catch{return!1}},decreased:(u,f,h)=>{if(!at.defined(u))return!1;try{return EI(e,t,{key:u,actual:f,previous:h,type:"decreased"})}catch{return!1}},emptied:u=>{try{const[f,h]=AI(e,t,{key:u});return!!f.length&&!h.length}catch{return!1}},filled:u=>{try{const[f,h]=AI(e,t,{key:u});return!f.length&&!!h.length}catch{return!1}},increased:(u,f,h)=>{if(!at.defined(u))return!1;try{return EI(e,t,{key:u,actual:f,previous:h,type:"increased"})}catch{return!1}},removed:(u,f)=>{try{return OI(e,t,{key:u,type:"removed",value:f})}catch{return!1}}}}var kue=new Error("Element already at target scroll position"),Cue=new Error("Scroll cancelled"),Tue=Math.min,II=Date.now,_ue={left:RI("scrollLeft"),top:RI("scrollTop")};function RI(e){return function(r,n,a,i){a=a||{},typeof a=="function"&&(i=a,a={}),typeof i!="function"&&(i=Eue);var o=II(),l=r[e],c=a.ease||Pue,d=isNaN(a.duration)?350:+a.duration,u=!1;return l===n?i(kue,r[e]):requestAnimationFrame(h),f;function f(){u=!0}function h(m){if(u)return i(Cue,r[e]);var g=II(),x=Tue(1,(g-o)/d),v=c(x);r[e]=v*(n-l)+l,x<1?requestAnimationFrame(h):requestAnimationFrame(function(){i(null,r[e])})}}}function Pue(e){return .5*(1-Math.cos(Math.PI*e))}function Eue(){}const Oue=ur(_ue);var z7={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():t.Scrollparent=r()})($p,function(){function t(n){var a=getComputedStyle(n,null).getPropertyValue("overflow");return a.indexOf("scroll")>-1||a.indexOf("auto")>-1}function r(n){if(n instanceof HTMLElement||n instanceof SVGElement){for(var a=n.parentNode;a.parentNode;){if(t(a))return a;a=a.parentNode}return document.scrollingElement||document.documentElement}}return r})})(z7);var Aue=z7.exports;const W7=ur(Aue);var Due=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},Mue=function(e,t){return e+tx(t)},tx=function(e){return e===null||typeof e=="boolean"||typeof e>"u"?"":typeof e=="number"?e.toString():typeof e=="string"?e:Array.isArray(e)?e.reduce(Mue,""):Due(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?tx(e.props.children):""};tx.default=tx;var Iue=tx;const $I=ur(Iue);var Rue=function(t){return $ue(t)&&!Lue(t)};function $ue(e){return!!e&&typeof e=="object"}function Lue(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Uue(e)}var Fue=typeof Symbol=="function"&&Symbol.for,Bue=Fue?Symbol.for("react.element"):60103;function Uue(e){return e.$$typeof===Bue}function zue(e){return Array.isArray(e)?[]:{}}function rx(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Th(zue(e),e,t):e}function Wue(e,t,r){return e.concat(t).map(function(n){return rx(n,r)})}function Vue(e,t){if(!t.customMerge)return Th;var r=t.customMerge(e);return typeof r=="function"?r:Th}function Hue(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function LI(e){return Object.keys(e).concat(Hue(e))}function V7(e,t){try{return t in e}catch{return!1}}function que(e,t){return V7(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Yue(e,t,r){var n={};return r.isMergeableObject(e)&&LI(e).forEach(function(a){n[a]=rx(e[a],r)}),LI(t).forEach(function(a){que(e,a)||(V7(e,a)&&r.isMergeableObject(t[a])?n[a]=Vue(a,r)(e[a],t[a],r):n[a]=rx(t[a],r))}),n}function Th(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Wue,r.isMergeableObject=r.isMergeableObject||Rue,r.cloneUnlessOtherwiseSpecified=rx;var n=Array.isArray(t),a=Array.isArray(e),i=n===a;return i?n?r.arrayMerge(e,t,r):Yue(e,t,r):rx(t,r)}Th.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,a){return Th(n,a,r)},{})};var Gue=Th,Kue=Gue;const Ii=ur(Kue);var H7={exports:{}},Que="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Zue=Que,Xue=Zue;function q7(){}function Y7(){}Y7.resetWarningCache=q7;var Jue=function(){function e(n,a,i,o,l,c){if(c!==Xue){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
vendor: 5,081 bytes, lines 573-596
573:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Y7,resetWarningCache:q7};return r.PropTypes=r,r};H7.exports=Jue();var efe=H7.exports;const ge=ur(efe);/**! 574 * @fileOverview Kickass library to create and place poppers near their reference elements. 575 * @version 1.16.1 576 * @license 577 * Copyright (c) 2016 Federico Zivolo and contributors 578 * 579 * Permission is hereby granted, free of charge, to any person obtaining a copy 580 * of this software and associated documentation files (the "Software"), to deal 581 * in the Software without restriction, including without limitation the rights 582 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 583 * copies of the Software, and to permit persons to whom the Software is 584 * furnished to do so, subject to the following conditions: 585 * 586 * The above copyright notice and this permission notice shall be included in all 587 * copies or substantial portions of the Software. 588 * 589 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 590 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 591 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 592 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 593 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 594 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 595 * SOFTWARE. 596 */var mv=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",tfe=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(mv&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();function rfe(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function nfe(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},tfe))}}var sfe=mv&&window.Promise,afe=sfe?rfe:nfe;function G7(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function Iu(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,n=r.getComputedStyle(e,null);return t?n[t]:n}function HE(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function pv(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Iu(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/(auto|scroll|overlay)/.test(r+a+n)?e:pv(HE(e))}function K7(e){return e&&e.referenceNode?e.referenceNode:e}var FI=mv&&!!(window.MSInputMethodContext&&document.documentMode),BI=mv&&/MSIE 10/.test(navigator.userAgent);function Nm(e){return e===11?FI:e===10?BI:FI||BI}function _h(e){if(!e)return document.documentElement;for(var t=Nm(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&Iu(r,"position")==="static"?_h(r):r}function ife(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||_h(e.firstElementChild)===e}function fT(e){return e.parentNode!==null?fT(e.parentNode):e}function B0(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,a=r?t:e,i=document.createRange();i.setStart(n,0),i.setEnd(a,0);var o=i.commonAncestorContainer;if(e!==o&&t!==o||n.contains(a))return ife(o)?o:_h(o);var l=fT(e);return l.host?B0(l.host,t):B0(e,fT(t).host)}function Ph(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",n=e.nodeName;if(n==="BODY"||n==="HTML"){var a=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||a;return i[r]}return e[r]}function ofe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Ph(t,"top"),a=Ph(t,"left"),i=r?-1:1;return e.top+=n*i,e.bottom+=n*i,e.left+=a*i,e.right+=a*i,e}function UI(e,t){var r=t==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function zI(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],Nm(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function Q7(e){var t=e.body,r=e.documentElement,n=Nm(10)&&getComputedStyle(r);return{height:zI("Height",t,r,n),width:zI("Width",t,r,n)}}var lfe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},cfe=function(){function e(t,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),Eh=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},ii=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 13,693 bytes, line 596
596for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Jc(e){return ii({},e,{right:e.left+e.width,bottom:e.top+e.height})}function hT(e){var t={};try{if(Nm(10)){t=e.getBoundingClientRect();var r=Ph(e,"top"),n=Ph(e,"left");t.top+=r,t.left+=n,t.bottom+=r,t.right+=n}else t=e.getBoundingClientRect()}catch{}var a={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i=e.nodeName==="HTML"?Q7(e.ownerDocument):{},o=i.width||e.clientWidth||a.width,l=i.height||e.clientHeight||a.height,c=e.offsetWidth-o,d=e.offsetHeight-l;if(c||d){var u=Iu(e);c-=UI(u,"x"),d-=UI(u,"y"),a.width-=c,a.height-=d}return Jc(a)}function qE(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Nm(10),a=t.nodeName==="HTML",i=hT(e),o=hT(t),l=pv(e),c=Iu(t),d=parseFloat(c.borderTopWidth),u=parseFloat(c.borderLeftWidth);r&&a&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var f=Jc({top:i.top-o.top-d,left:i.left-o.left-u,width:i.width,height:i.height});if(f.marginTop=0,f.marginLeft=0,!n&&a){var h=parseFloat(c.marginTop),m=parseFloat(c.marginLeft);f.top-=d-h,f.bottom-=d-h,f.left-=u-m,f.right-=u-m,f.marginTop=h,f.marginLeft=m}return(n&&!r?t.contains(l):t===l&&l.nodeName!=="BODY")&&(f=ofe(f,t)),f}function dfe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,n=qE(e,r),a=Math.max(r.clientWidth,window.innerWidth||0),i=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:Ph(r),l=t?0:Ph(r,"left"),c={top:o-n.top+n.marginTop,left:l-n.left+n.marginLeft,width:a,height:i};return Jc(c)}function Z7(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(Iu(e,"position")==="fixed")return!0;var r=HE(e);return r?Z7(r):!1}function X7(e){if(!e||!e.parentElement||Nm())return document.documentElement;for(var t=e.parentElement;t&&Iu(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function YE(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,i={top:0,left:0},o=a?X7(e):B0(e,K7(t));if(n==="viewport")i=dfe(o,a);else{var l=void 0;n==="scrollParent"?(l=pv(HE(t)),l.nodeName==="BODY"&&(l=e.ownerDocument.documentElement)):n==="window"?l=e.ownerDocument.documentElement:l=n;var c=qE(l,o,a);if(l.nodeName==="HTML"&&!Z7(o)){var d=Q7(e.ownerDocument),u=d.height,f=d.width;i.top+=c.top-c.marginTop,i.bottom=u+c.top,i.left+=c.left-c.marginLeft,i.right=f+c.left}else i=c}r=r||0;var h=typeof r=="number";return i.left+=h?r:r.left||0,i.top+=h?r:r.top||0,i.right-=h?r:r.right||0,i.bottom-=h?r:r.bottom||0,i}function ufe(e){var t=e.width,r=e.height;return t*r}function J7(e,t,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var o=YE(r,n,i,a),l={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},c=Object.keys(l).map(function(h){return ii({key:h},l[h],{area:ufe(l[h])})}).sort(function(h,m){return m.area-h.area}),d=c.filter(function(h){var m=h.width,g=h.height;return m>=r.clientWidth&&g>=r.clientHeight}),u=d.length>0?d[0].key:c[0].key,f=e.split("-")[1];return u+(f?"-"+f:"")}function eH(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=n?X7(t):B0(t,K7(r));return qE(r,a,n)}function tH(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),a=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),i={width:e.offsetWidth+a,height:e.offsetHeight+n};return i}function U0(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function rH(e,t,r){r=r.split("-")[0];var n=tH(e),a={width:n.width,height:n.height},i=["right","left"].indexOf(r)!==-1,o=i?"top":"left",l=i?"left":"top",c=i?"height":"width",d=i?"width":"height";return a[o]=t[o]+t[c]/2-n[c]/2,r===l?a[l]=t[l]-n[d]:a[l]=t[U0(l)],a}function gv(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function ffe(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(a){return a[t]===r});var n=gv(e,function(a){return a[t]===r});return e.indexOf(n)}function nH(e,t,r){var n=r===void 0?e:e.slice(0,ffe(e,"name",r));return n.forEach(function(a){a.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=a.function||a.fn;a.enabled&&G7(i)&&(t.offsets.popper=Jc(t.offsets.popper),t.offsets.reference=Jc(t.offsets.reference),t=i(t,a))}),t}function hfe(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=eH(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=J7(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=rH(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=nH(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function sH(e,t){return e.some(function(r){var n=r.name,a=r.enabled;return a&&n===t})}function GE(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var a=t[n],i=a?""+a+r:e;if(typeof document.body.style[i]<"u")return i}return null}function mfe(){return this.state.isDestroyed=!0,sH(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[GE("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function aH(e){var t=e.ownerDocument;return t?t.defaultView:window}function iH(e,t,r,n){var a=e.nodeName==="BODY",i=a?e.ownerDocument.defaultView:e;i.addEventListener(t,r,{passive:!0}),a||iH(pv(i.parentNode),t,r,n),n.push(i)}function pfe(e,t,r,n){r.updateBound=n,aH(e).addEventListener("resize",r.updateBound,{passive:!0});var a=pv(e);return iH(a,"scroll",r.updateBound,r.scrollParents),r.scrollElement=a,r.eventsEnabled=!0,r}function gfe(){this.state.eventsEnabled||(this.state=pfe(this.reference,this.options,this.state,this.scheduleUpdate))}function xfe(e,t){return aH(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(r){r.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function vfe(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=xfe(this.reference,this.state))}function KE(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)}function mT(e,t){Object.keys(t).forEach(function(r){var n="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&KE(t[r])&&(n="px"),e.style[r]=t[r]+n})}function yfe(e,t){Object.keys(t).forEach(function(r){var n=t[r];n!==!1?e.setAttribute(r,t[r]):e.removeAttribute(r)})}function bfe(e){return mT(e.instance.popper,e.styles),yfe(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&mT(e.arrowElement,e.arrowStyles),e}function jfe(e,t,r,n,a){var i=eH(a,t,e,r.positionFixed),o=J7(r.placement,i,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return t.setAttribute("x-placement",o),mT(t,{position:r.positionFixed?"fixed":"absolute"}),r}function wfe(e,t){var r=e.offsets,n=r.popper,a=r.reference,i=Math.round,o=Math.floor,l=function(b){return b},c=i(a.width),d=i(n.width),u=["left","right"].indexOf(e.placement)!==-1,f=e.placement.indexOf("-")!==-1,h=c%2===d%2,m=c%2===1&&d%2===1,g=t?u||f||h?i:o:l,x=t?i:l;return{left:g(m&&!f&&t?n.left-1:n.left),top:x(n.top),bottom:x(n.bottom),right:g(n.right)}}var Nfe=mv&&/Firefox/i.test(navigator.userAgent);function Sfe(e,t){var r=t.x,n=t.y,a=e.offsets.popper,i=gv(e.instance.modifiers,function(j){return j.name==="applyStyle"}).gpuAcceleration;i!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var o=i!==void 0?i:t.gpuAcceleration,l=_h(e.instance.popper),c=hT(l),d={position:a.position},u=wfe(e,window.devicePixelRatio<2||!Nfe),f=r==="bottom"?"top":"bottom",h=n==="right"?"left":"right",m=GE("transform"),g=void 0,x=void 0;if(f==="bottom"?l.nodeName==="HTML"?x=-l.clientHeight+u.bottom:x=-c.height+u.bottom:x=u.top,h==="right"?l.nodeName==="HTML"?g=-l.clientWidth+u.right:g=-c.width+u.right:g=u.left,o&&m)d[m]="translate3d("+g+"px, "+x+"px, 0)",d[f]=0,d[h]=0,d.willChange="transform";else{var v=f==="bottom"?-1:1,b=h==="right"?-1:1;d[f]=x*v,d[h]=g*b,d.willChange=f+", "+h}var y={"x-placement":e.placement};return e.attributes=ii({},y,e.attributes),e.styles=ii({},d,e.styles),e.arrowStyles=ii({},e.offsets.arrow,e.arrowStyles),e}function oH(e,t,r){var n=gv(e,function(l){var c=l.name;return c===t}),a=!!n&&e.some(function(l){return l.name===r&&l.enabled&&l.order<n.order});if(!a){var i="`"+t+"`",o="`"+r+"`";console.warn(o+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return a}function kfe(e,t){var r;if(!oH(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if(typeof n=="string"){if(n=e.instance.popper.querySelector(n),!n)return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var a=e.placement.split("-")[0],i=e.offsets,o=i.popper,l=i.reference,c=["left","right"].indexOf(a)!==-1,d=c?"height":"width",u=c?"Top":"Left",f=u.toLowerCase(),h=c?"left":"top",m=c?"bottom":"right",g=tH(n)[d];l[m]-g<o[f]&&(e.offsets.popper[f]-=o[f]-(l[m]-g)),l[f]+g>o[m]&&(e.offsets.popper[f]+=l[f]+g-o[m]),e.offsets.popper=Jc(e.offsets.popper);var x=l[f]+l[d]/2-g/2,v=Iu(e.instance.popper),b=parseFloat(v["margin"+u]),y=parseFloat(v["border"+u+"Width"]),j=x-e.offsets.popper[f]-b-y;return j=Math.max(Math.min(o[d]-g,j),0),e.arrowElement=n,e.offsets.arrow=(r={},Eh(r,f,Math.round(j)),Eh(r,h,""),r),e}function Cfe(e){return e==="end"?"start":e==="start"?"end":e}var lH=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],kS=lH.slice(3);function WI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=kS.indexOf(e),n=kS.slice(r+1).concat(kS.slice(0,r));return t?n.reverse():n}var CS={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Tfe(e,t){if(sH(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=YE(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],a=U0(n),i=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case CS.FLIP:o=[n,a];break;case CS.CLOCKWISE:o=WI(n);break;case CS.COUNTERCLOCKWISE:o=WI(n,!0);break;default:o=t.behavior}return o.forEach(function(l,c){if(n!==l||o.length===c+1)return e;n=e.placement.split("-")[0],a=U0(n);var d=e.offsets.popper,u=e.offsets.reference,f=Math.floor,h=n==="left"&&f(d.right)>f(u.left)||n==="right"&&f(d.left)<f(u.right)||n==="top"&&f(d.bottom)>f(u.top)||n==="bottom"&&f(d.top)<f(u.bottom),m=f(d.left)<f(r.left),g=f(d.right)>f(r.right),x=f(d.top)<f(r.top),v=f(d.bottom)>f(r.bottom),b=n==="left"&&m||n==="right"&&g||n==="top"&&x||n==="bottom"&&v,y=["top","bottom"].indexOf(n)!==-1,j=!!t.flipVariations&&(y&&i==="start"&&m||y&&i==="end"&&g||!y&&i==="start"&&x||!y&&i==="end"&&v),w=!!t.flipVariationsByContent&&(y&&i==="start"&&g||y&&i==="end"&&m||!y&&i==="start"&&v||!y&&i==="end"&&x),N=j||w;(h||b||N)&&(e.flipped=!0,(h||b)&&(n=o[c+1]),N&&(i=Cfe(i)),e.placement=n+(i?"-"+i:""),e.offsets.popper=ii({},e.offsets.popper,rH(e.instance.popper,e.offsets.reference,e.placement)),e=nH(e.instance.modifiers,e,"flip"))}),e}function _fe(e){var t=e.offsets,r=t.popper,n=t.reference,a=e.placement.split("-")[0],i=Math.floor,o=["top","bottom"].indexOf(a)!==-1,l=o?"right":"bottom",c=o?"left":"top",d=o?"width":"height";return r[l]<i(n[c])&&(e.offsets.popper[c]=i(n[c])-r[d]),r[c]>i(n[l])&&(e.offsets.popper[c]=i(n[l])),e}function Pfe(e,t,r,n){var a=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+a[1],o=a[2];if(!i)return e;if(o.indexOf("%")===0){var l=void 0;switch(o){case"%p":l=r;break;case"%":case"%r":default:l=n}var c=Jc(l);return c[t]/100*i}else if(o==="vh"||o==="vw"){var d=void 0;return o==="vh"?d=Math.max(document.documentElement.clientHeight,window.innerHeight||0):d=Math.max(document.documentElement.clientWidth,window.innerWidth||0),d/100*i}else return i}function Efe(e,t,r,n){var a=[0,0],i=["right","left"].indexOf(n)!==-1,o=e.split(/(\+|\-)/).map(function(u){return u.trim()}),l=o.indexOf(gv(o,function(u){return u.search(/,|\s/)!==-1}));o[l]&&o[l].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,d=l!==-1?[o.slice(0,l).concat([o[l].split(c)[0]]),[o[l].split(c)[1]].concat(o.slice(l+1))]:[o];return d=d.map(function(u,f){var h=(f===1?!i:i)?"height":"width",m=!1;return u.reduce(function(g,x){return g[g.length-1]===""&&["+","-"].indexOf(x)!==-1?(g[g.length-1]=x,m=!0,g):m?(g[g.length-1]+=x,m=!1,g):g.concat(x)},[]).map(function(g){return Pfe(g,h,t,r)})}),d.forEach(function(u,f){u.forEach(function(h,m){KE(h)&&(a[f]+=h*(u[m-1]==="-"?-1:1))})}),a}function Ofe(e,t){var r=t.offset,n=e.placement,a=e.offsets,i=a.popper,o=a.reference,l=n.split("-")[0],c=void 0;
vendor: 10,237 bytes, line 596
596return KE(+r)?c=[+r,0]:c=Efe(r,i,o,l),l==="left"?(i.top+=c[0],i.left-=c[1]):l==="right"?(i.top+=c[0],i.left+=c[1]):l==="top"?(i.left+=c[0],i.top-=c[1]):l==="bottom"&&(i.left+=c[0],i.top+=c[1]),e.popper=i,e}function Afe(e,t){var r=t.boundariesElement||_h(e.instance.popper);e.instance.reference===r&&(r=_h(r));var n=GE("transform"),a=e.instance.popper.style,i=a.top,o=a.left,l=a[n];a.top="",a.left="",a[n]="";var c=YE(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);a.top=i,a.left=o,a[n]=l,t.boundaries=c;var d=t.priority,u=e.offsets.popper,f={primary:function(m){var g=u[m];return u[m]<c[m]&&!t.escapeWithReference&&(g=Math.max(u[m],c[m])),Eh({},m,g)},secondary:function(m){var g=m==="right"?"left":"top",x=u[g];return u[m]>c[m]&&!t.escapeWithReference&&(x=Math.min(u[g],c[m]-(m==="right"?u.width:u.height))),Eh({},g,x)}};return d.forEach(function(h){var m=["left","top"].indexOf(h)!==-1?"primary":"secondary";u=ii({},u,f[m](h))}),e.offsets.popper=u,e}function Dfe(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var a=e.offsets,i=a.reference,o=a.popper,l=["bottom","top"].indexOf(r)!==-1,c=l?"left":"top",d=l?"width":"height",u={start:Eh({},c,i[c]),end:Eh({},c,i[c]+i[d]-o[d])};e.offsets.popper=ii({},o,u[n])}return e}function Mfe(e){if(!oH(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=gv(e.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(t.bottom<r.top||t.left>r.right||t.top>r.bottom||t.right<r.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function Ife(e){var t=e.placement,r=t.split("-")[0],n=e.offsets,a=n.popper,i=n.reference,o=["left","right"].indexOf(r)!==-1,l=["top","left"].indexOf(r)===-1;return a[o?"left":"top"]=i[r]-(l?a[o?"width":"height"]:0),e.placement=U0(t),e.offsets.popper=Jc(a),e}var Rfe={shift:{order:100,enabled:!0,fn:Dfe},offset:{order:200,enabled:!0,fn:Ofe,offset:0},preventOverflow:{order:300,enabled:!0,fn:Afe,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:_fe},arrow:{order:500,enabled:!0,fn:kfe,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Tfe,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:Ife},hide:{order:800,enabled:!0,fn:Mfe},computeStyle:{order:850,enabled:!0,fn:Sfe,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:bfe,onLoad:jfe,gpuAcceleration:void 0}},$fe={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Rfe},nx=function(){function e(t,r){var n=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};lfe(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=afe(this.update.bind(this)),this.options=ii({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(ii({},e.Defaults.modifiers,a.modifiers)).forEach(function(o){n.options.modifiers[o]=ii({},e.Defaults.modifiers[o]||{},a.modifiers?a.modifiers[o]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(o){return ii({name:o},n.options.modifiers[o])}).sort(function(o,l){return o.order-l.order}),this.modifiers.forEach(function(o){o.enabled&&G7(o.onLoad)&&o.onLoad(n.reference,n.popper,n.options,o,n.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return cfe(e,[{key:"update",value:function(){return hfe.call(this)}},{key:"destroy",value:function(){return mfe.call(this)}},{key:"enableEventListeners",value:function(){return gfe.call(this)}},{key:"disableEventListeners",value:function(){return vfe.call(this)}}]),e}();nx.Utils=(typeof window<"u"?window:global).PopperUtils;nx.placements=lH;nx.Defaults=$fe;var Lfe=["innerHTML","ownerDocument","style","attributes","nodeValue"],Ffe=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],Bfe=["bigint","boolean","null","number","string","symbol","undefined"];function Xw(e){var t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(Ufe(t))return t}function Gi(e){return function(t){return Xw(t)===e}}function Ufe(e){return Ffe.includes(e)}function Sm(e){return function(t){return typeof t===e}}function zfe(e){return Bfe.includes(e)}function xe(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(xe.array(e))return"Array";if(xe.plainFunction(e))return"Function";var t=Xw(e);return t||"Object"}xe.array=Array.isArray;xe.arrayOf=function(e,t){return!xe.array(e)&&!xe.function(t)?!1:e.every(function(r){return t(r)})};xe.asyncGeneratorFunction=function(e){return Xw(e)==="AsyncGeneratorFunction"};xe.asyncFunction=Gi("AsyncFunction");xe.bigint=Sm("bigint");xe.boolean=function(e){return e===!0||e===!1};xe.date=Gi("Date");xe.defined=function(e){return!xe.undefined(e)};xe.domElement=function(e){return xe.object(e)&&!xe.plainObject(e)&&e.nodeType===1&&xe.string(e.nodeName)&&Lfe.every(function(t){return t in e})};xe.empty=function(e){return xe.string(e)&&e.length===0||xe.array(e)&&e.length===0||xe.object(e)&&!xe.map(e)&&!xe.set(e)&&Object.keys(e).length===0||xe.set(e)&&e.size===0||xe.map(e)&&e.size===0};xe.error=Gi("Error");xe.function=Sm("function");xe.generator=function(e){return xe.iterable(e)&&xe.function(e.next)&&xe.function(e.throw)};xe.generatorFunction=Gi("GeneratorFunction");xe.instanceOf=function(e,t){return!e||!t?!1:Object.getPrototypeOf(e)===t.prototype};xe.iterable=function(e){return!xe.nullOrUndefined(e)&&xe.function(e[Symbol.iterator])};xe.map=Gi("Map");xe.nan=function(e){return Number.isNaN(e)};xe.null=function(e){return e===null};xe.nullOrUndefined=function(e){return xe.null(e)||xe.undefined(e)};xe.number=function(e){return Sm("number")(e)&&!xe.nan(e)};xe.numericString=function(e){return xe.string(e)&&e.length>0&&!Number.isNaN(Number(e))};xe.object=function(e){return!xe.nullOrUndefined(e)&&(xe.function(e)||typeof e=="object")};xe.oneOf=function(e,t){return xe.array(e)?e.indexOf(t)>-1:!1};xe.plainFunction=Gi("Function");xe.plainObject=function(e){if(Xw(e)!=="Object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};xe.primitive=function(e){return xe.null(e)||zfe(typeof e)};xe.promise=Gi("Promise");xe.propertyOf=function(e,t,r){if(!xe.object(e)||!t)return!1;var n=e[t];return xe.function(r)?r(n):xe.defined(n)};xe.regexp=Gi("RegExp");xe.set=Gi("Set");xe.string=Sm("string");xe.symbol=Sm("symbol");xe.undefined=Sm("undefined");xe.weakMap=Gi("WeakMap");xe.weakSet=Gi("WeakSet");function cH(e){return function(t){return typeof t===e}}var Wfe=cH("function"),Vfe=function(e){return e===null},VI=function(e){return Object.prototype.toString.call(e).slice(8,-1)==="RegExp"},HI=function(e){return!Hfe(e)&&!Vfe(e)&&(Wfe(e)||typeof e=="object")},Hfe=cH("undefined"),pT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function qfe(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=r;n--!==0;)if(!pa(e[n],t[n]))return!1;return!0}function Yfe(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=new DataView(e.buffer),n=new DataView(t.buffer),a=e.byteLength;a--;)if(r.getUint8(a)!==n.getUint8(a))return!1;return!0}function Gfe(e,t){var r,n,a,i;if(e.size!==t.size)return!1;try{for(var o=pT(e.entries()),l=o.next();!l.done;l=o.next()){var c=l.value;if(!t.has(c[0]))return!1}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}try{for(var d=pT(e.entries()),u=d.next();!u.done;u=d.next()){var c=u.value;if(!pa(c[1],t.get(c[0])))return!1}}catch(f){a={error:f}}finally{try{u&&!u.done&&(i=d.return)&&i.call(d)}finally{if(a)throw a.error}}return!0}function Kfe(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var a=pT(e.entries()),i=a.next();!i.done;i=a.next()){var o=i.value;if(!t.has(o[0]))return!1}}catch(l){r={error:l}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!0}function pa(e,t){if(e===t)return!0;if(e&&HI(e)&&t&&HI(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return qfe(e,t);if(e instanceof Map&&t instanceof Map)return Gfe(e,t);if(e instanceof Set&&t instanceof Set)return Kfe(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return Yfe(e,t);if(VI(e)&&VI(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var a=r.length;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[a]))return!1;for(var a=r.length;a--!==0;){var i=r[a];if(!(i==="_owner"&&e.$$typeof)&&!pa(e[i],t[i]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}function Qfe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(function(r){return xe.string(r)||xe.array(r)||xe.plainObject(r)})}function Zfe(e,t,r){return dH(e,t)?[e,t].every(xe.array)?!e.some(QI(r))&&t.some(QI(r)):[e,t].every(xe.plainObject)?!Object.entries(e).some(KI(r))&&Object.entries(t).some(KI(r)):t===r:!1}function qI(e,t,r){var n=r.actual,a=r.key,i=r.previous,o=r.type,l=No(e,a),c=No(t,a),d=[l,c].every(xe.number)&&(o==="increased"?l<c:l>c);return xe.undefined(n)||(d=d&&c===n),xe.undefined(i)||(d=d&&l===i),d}function YI(e,t,r){var n=r.key,a=r.type,i=r.value,o=No(e,n),l=No(t,n),c=a==="added"?o:l,d=a==="added"?l:o;
596if(!xe.nullOrUndefined(i)){if(xe.defined(c)){if(xe.array(c)||xe.plainObject(c))return Zfe(c,d,i)}else return pa(d,i);return!1}return[o,l].every(xe.array)?!d.every(QE(c)):[o,l].every(xe.plainObject)?Xfe(Object.keys(c),Object.keys(d)):![o,l].every(function(u){return xe.primitive(u)&&xe.defined(u)})&&(a==="added"?!xe.defined(o)&&xe.defined(l):xe.defined(o)&&!xe.defined(l))}function GI(e,t,r){var n=r===void 0?{}:r,a=n.key,i=No(e,a),o=No(t,a);if(!dH(i,o))throw new TypeError("Inputs have different types");if(!Qfe(i,o))throw new TypeError("Inputs don't have length");return[i,o].every(xe.plainObject)&&(i=Object.keys(i),o=Object.keys(o)),[i,o]}function KI(e){return function(t){var r=t[0],n=t[1];return xe.array(e)?pa(e,n)||e.some(function(a){return pa(a,n)||xe.array(n)&&QE(n)(a)}):xe.plainObject(e)&&e[r]?!!e[r]&&pa(e[r],n):pa(e,n)}}function Xfe(e,t){return t.some(function(r){return!e.includes(r)})}function QI(e){return function(t){return xe.array(e)?e.some(function(r){return pa(r,t)||xe.array(t)&&QE(t)(r)}):pa(e,t)}}function cp(e,t){return xe.array(e)?e.some(function(r){return pa(r,t)}):pa(e,t)}function QE(e){return function(t){return e.some(function(r){return pa(r,t)})}}function dH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(xe.array)||e.every(xe.number)||e.every(xe.plainObject)||e.every(xe.string)}function No(e,t){if(xe.plainObject(e)||xe.array(e)){if(xe.string(t)){var r=t.split(".");return r.reduce(function(n,a){return n&&n[a]},e)}return xe.number(t)?e[t]:e}return e}function Jfe(e,t){if([e,t].some(xe.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(function(f){return xe.plainObject(f)||xe.array(f)}))throw new Error("Expected plain objects or array");var r=function(f,h){try{return YI(e,t,{key:f,type:"added",value:h})}catch{return!1}},n=function(f,h,m){try{var g=No(e,f),x=No(t,f),v=xe.defined(h),b=xe.defined(m);if(v||b){var y=b?cp(m,g):!cp(h,g),j=cp(h,x);return y&&j}return[g,x].every(xe.array)||[g,x].every(xe.plainObject)?!pa(g,x):g!==x}catch{return!1}},a=function(f,h,m){if(!xe.defined(f))return!1;try{var g=No(e,f),x=No(t,f),v=xe.defined(m);return cp(h,g)&&(v?cp(m,x):!v)}catch{return!1}},i=function(f,h){return xe.defined(f)?n(f,h):!1},o=function(f,h,m){if(!xe.defined(f))return!1;try{return qI(e,t,{key:f,actual:h,previous:m,type:"decreased"})}catch{return!1}},l=function(f){try{var h=GI(e,t,{key:f}),m=h[0],g=h[1];return!!m.length&&!g.length}catch{return!1}},c=function(f){try{var h=GI(e,t,{key:f}),m=h[0],g=h[1];return!m.length&&!!g.length}catch{return!1}},d=function(f,h,m){if(!xe.defined(f))return!1;try{return qI(e,t,{key:f,actual:h,previous:m,type:"increased"})}catch{return!1}},u=function(f,h){try{return YI(e,t,{key:f,type:"removed",value:h})}catch{return!1}};return{added:r,changed:n,changedFrom:a,changedTo:i,decreased:o,emptied:l,filled:c,increased:d,removed:u}}function ZI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZI(Object(r),!0).forEach(function(n){ks(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ehe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fH(n.key),n)}}function vv(e,t,r){return t&&ehe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ks(e,t,r){return t=fH(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yv(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gT(e,t)}
vendor: 5,245 bytes, line 596
596function z0(e){return z0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},z0(e)}function gT(e,t){return gT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},gT(e,t)}function the(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rhe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function uH(e,t){if(e==null)return{};var r=rhe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nhe(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nl(e)}function bv(e){var t=the();return function(){var n=z0(e),a;if(t){var i=z0(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return nhe(this,a)}}function she(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fH(e){var t=she(e,"string");return typeof t=="symbol"?t:String(t)}var ahe={flip:{padding:20},preventOverflow:{padding:10}},ihe="The typeValidator argument must be a function with the signature function(props, propName, componentName).",ohe="The error message is optional, but must be a string if provided.";function lhe(e,t,r,n){return typeof e=="boolean"?e:typeof e=="function"?e(t,r,n):e?!!e:!1}function che(e,t){return Object.hasOwnProperty.call(e,t)}function dhe(e,t,r,n){return new Error("Required ".concat(e[t]," `").concat(t,"` was not specified in `").concat(r,"`."))}function uhe(e,t){if(typeof e!="function")throw new TypeError(ihe);if(t&&typeof t!="string")throw new TypeError(ohe)}function XI(e,t,r){return uhe(e,r),function(n,a,i){for(var o=arguments.length,l=new Array(o>3?o-3:0),c=3;c<o;c++)l[c-3]=arguments[c];return lhe(t,n,a,i)?che(n,a)?e.apply(void 0,[n,a,i].concat(l)):dhe(n,a,i):e.apply(void 0,[n,a,i].concat(l))}}var lr={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"},dp=Rf.createPortal!==void 0;function lo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function TS(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function Dy(e){var t=e.title,r=e.data,n=e.warn,a=n===void 0?!1:n,i=e.debug,o=i===void 0?!1:i,l=a?console.warn||console.error:console.log;o&&t&&r&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(r)?r.forEach(function(c){xe.plainObject(c)&&c.key?l.apply(console,[c.key,c.value]):l.apply(console,[c])}):l.apply(console,[r]),console.groupEnd())}function fhe(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.addEventListener(t,r,n)}function hhe(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.removeEventListener(t,r,n)}function mhe(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a;a=function(o){r(o),hhe(e,t,a)},fhe(e,t,a,n)}function JI(){}var hH=function(e){yv(r,e);var t=bv(r);function r(){return xv(this,r),t.apply(this,arguments)}return vv(r,[{key:"componentDidMount",value:function(){lo()&&(this.node||this.appendNode(),dp||this.renderPortal())}},{key:"componentDidUpdate",value:function(){lo()&&(dp||this.renderPortal())}},{key:"componentWillUnmount",value:function(){!lo()||!this.node||(dp||Rf.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var a=this.props,i=a.id,o=a.zIndex;this.node||(this.node=document.createElement("div"),i&&(this.node.id=i),o&&(this.node.style.zIndex=o),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!lo())return null;var a=this.props,i=a.children,o=a.setRef;if(this.node||this.appendNode(),dp)return Rf.createPortal(i,this.node);var l=Rf.unstable_renderSubtreeIntoContainer(this,i.length>1?O.createElement("div",null,i):i[0],this.node);return o(l),null}},{key:"renderReact16",value:function(){var a=this.props,i=a.hasChildren,o=a.placement,l=a.target;return i?this.renderPortal():l||o==="center"?this.renderPortal():null}},{key:"render",value:function(){return dp?this.renderReact16():null}}]),r}(O.Component);ks(hH,"propTypes",{children:ge.oneOfType([ge.element,ge.array]),hasChildren:ge.bool,id:ge.oneOfType([ge.string,ge.number]),placement:ge.string,setRef:ge.func.isRequired,target:ge.oneOfType([ge.object,ge.string]),zIndex:ge.number});var mH=function(e){yv(r,e);var t=bv(r);function r(){return xv(this,r),t.apply(this,arguments)}
596return vv(r,[{key:"parentStyle",get:function(){var a=this.props,i=a.placement,o=a.styles,l=o.arrow.length,c={pointerEvents:"none",position:"absolute",width:"100%"};return i.startsWith("top")?(c.bottom=0,c.left=0,c.right=0,c.height=l):i.startsWith("bottom")?(c.left=0,c.right=0,c.top=0,c.height=l):i.startsWith("left")?(c.right=0,c.top=0,c.bottom=0):i.startsWith("right")&&(c.left=0,c.top=0),c}},{key:"render",value:function(){var a=this.props,i=a.placement,o=a.setArrowRef,l=a.styles,c=l.arrow,d=c.color,u=c.display,f=c.length,h=c.margin,m=c.position,g=c.spread,x={display:u,position:m},v,b=g,y=f;return i.startsWith("top")?(v="0,0 ".concat(b/2,",").concat(y," ").concat(b,",0"),x.bottom=0,x.marginLeft=h,x.marginRight=h):i.startsWith("bottom")?(v="".concat(b,",").concat(y," ").concat(b/2,",0 0,").concat(y),x.top=0,x.marginLeft=h,x.marginRight=h):i.startsWith("left")?(y=g,b=f,v="0,0 ".concat(b,",").concat(y/2," 0,").concat(y),x.right=0,x.marginTop=h,x.marginBottom=h):i.startsWith("right")&&(y=g,b=f,v="".concat(b,",").concat(y," ").concat(b,",0 0,").concat(y/2),x.left=0,x.marginTop=h,x.marginBottom=h),O.createElement("div",{className:"__floater__arrow",style:this.parentStyle},O.createElement("span",{ref:o,style:x},O.createElement("svg",{width:b,height:y,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},O.createElement("polygon",{points:v,fill:d}))))}}]),r}(O.Component);ks(mH,"propTypes",{placement:ge.string.isRequired,setArrowRef:ge.func.isRequired,styles:ge.object.isRequired});var phe=["color","height","width"];function pH(e){var t=e.handleClick,r=e.styles,n=r.color,a=r.height,i=r.width,o=uH(r,phe);return O.createElement("button",{"aria-label":"close",onClick:t,style:o,type:"button"},O.createElement("svg",{width:"".concat(i,"px"),height:"".concat(a,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},O.createElement("g",null,O.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:n}))))}pH.propTypes={handleClick:ge.func.isRequired,styles:ge.object.isRequired};function gH(e){var t=e.content,r=e.footer,n=e.handleClick,a=e.open,i=e.positionWrapper,o=e.showCloseButton,l=e.title,c=e.styles,d={content:O.isValidElement(t)?t:O.createElement("div",{className:"__floater__content",style:c.content},t)};return l&&(d.title=O.isValidElement(l)?l:O.createElement("div",{className:"__floater__title",style:c.title},l)),r&&(d.footer=O.isValidElement(r)?r:O.createElement("div",{className:"__floater__footer",style:c.footer},r)),(o||i)&&!xe.boolean(a)&&(d.close=O.createElement(pH,{styles:c.close,handleClick:n})),O.createElement("div",{className:"__floater__container",style:c.container},d.close,d.title,d.content,d.footer)}gH.propTypes={content:ge.node.isRequired,footer:ge.node,handleClick:ge.func.isRequired,open:ge.bool,positionWrapper:ge.bool.isRequired,showCloseButton:ge.bool.isRequired,styles:ge.object.isRequired,title:ge.node};var xH=function(e){yv(r,e);var t=bv(r);function r(){return xv(this,r),t.apply(this,arguments)}return vv(r,[{key:"style",get:function(){var a=this.props,i=a.disableAnimation,o=a.component,l=a.placement,c=a.hideArrow,d=a.status,u=a.styles,f=u.arrow.length,h=u.floater,m=u.floaterCentered,g=u.floaterClosing,x=u.floaterOpening,v=u.floaterWithAnimation,b=u.floaterWithComponent,y={};return c||(l.startsWith("top")?y.padding="0 0 ".concat(f,"px"):l.startsWith("bottom")?y.padding="".concat(f,"px 0 0"):l.startsWith("left")?y.padding="0 ".concat(f,"px 0 0"):l.startsWith("right")&&(y.padding="0 0 0 ".concat(f,"px"))),[lr.OPENING,lr.OPEN].indexOf(d)!==-1&&(y=tn(tn({},y),x)),d===lr.CLOSING&&(y=tn(tn({},y),g)),d===lr.OPEN&&!i&&(y=tn(tn({},y),v)),l==="center"&&(y=tn(tn({},y),m)),o&&(y=tn(tn({},y),b)),tn(tn({},h),y)}},{key:"render",value:function(){var a=this.props,i=a.component,o=a.handleClick,l=a.hideArrow,c=a.setFloaterRef,d=a.status,u={},f=["__floater"];return i?O.isValidElement(i)?u.content=O.cloneElement(i,{closeFn:o}):u.content=i({closeFn:o}):u.content=O.createElement(gH,this.props),d===lr.OPEN&&f.push("__floater__open"),l||(u.arrow=O.createElement(mH,this.props)),O.createElement("div",{ref:c,className:f.join(" "),style:this.style},O.createElement("div",{className:"__floater__body"},u.content,u.arrow))}}]),r}(O.Component);ks(xH,"propTypes",{component:ge.oneOfType([ge.func,ge.element]),content:ge.node,disableAnimation:ge.bool.isRequired,footer:ge.node,handleClick:ge.func.isRequired,hideArrow:ge.bool.isRequired,open:ge.bool,placement:ge.string.isRequired,positionWrapper:ge.bool.isRequired,setArrowRef:ge.func.isRequired,setFloaterRef:ge.func.isRequired,showCloseButton:ge.bool,status:ge.string.isRequired,styles:ge.object.isRequired,title:ge.node});var vH=function(e){yv(r,e);var t=bv(r);function r(){return xv(this,r),t.apply(this,arguments)}
vendor: 9,038 bytes, line 596
596return vv(r,[{key:"render",value:function(){var a=this.props,i=a.children,o=a.handleClick,l=a.handleMouseEnter,c=a.handleMouseLeave,d=a.setChildRef,u=a.setWrapperRef,f=a.style,h=a.styles,m;if(i)if(O.Children.count(i)===1)if(!O.isValidElement(i))m=O.createElement("span",null,i);else{var g=xe.function(i.type)?"innerRef":"ref";m=O.cloneElement(O.Children.only(i),ks({},g,d))}else m=i;return m?O.createElement("span",{ref:u,style:tn(tn({},h),f),onClick:o,onMouseEnter:l,onMouseLeave:c},m):null}}]),r}(O.Component);ks(vH,"propTypes",{children:ge.node,handleClick:ge.func.isRequired,handleMouseEnter:ge.func.isRequired,handleMouseLeave:ge.func.isRequired,setChildRef:ge.func.isRequired,setWrapperRef:ge.func.isRequired,style:ge.object,styles:ge.object.isRequired});var ghe={zIndex:100};function xhe(e){var t=Ii(ghe,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex},floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}var vhe=["arrow","flip","offset"],yhe=["position","top","right","bottom","left"],ZE=function(e){yv(r,e);var t=bv(r);function r(n){var a;return xv(this,r),a=t.call(this,n),ks(nl(a),"setArrowRef",function(i){a.arrowRef=i}),ks(nl(a),"setChildRef",function(i){a.childRef=i}),ks(nl(a),"setFloaterRef",function(i){a.floaterRef=i}),ks(nl(a),"setWrapperRef",function(i){a.wrapperRef=i}),ks(nl(a),"handleTransitionEnd",function(){var i=a.state.status,o=a.props.callback;a.wrapperPopper&&a.wrapperPopper.instance.update(),a.setState({status:i===lr.OPENING?lr.OPEN:lr.IDLE},function(){var l=a.state.status;o(l===lr.OPEN?"open":"close",a.props)})}),ks(nl(a),"handleClick",function(){var i=a.props,o=i.event,l=i.open;if(!xe.boolean(l)){var c=a.state,d=c.positionWrapper,u=c.status;(a.event==="click"||a.event==="hover"&&d)&&(Dy({title:"click",data:[{event:o,status:u===lr.OPEN?"closing":"opening"}],debug:a.debug}),a.toggle())}}),ks(nl(a),"handleMouseEnter",function(){var i=a.props,o=i.event,l=i.open;if(!(xe.boolean(l)||TS())){var c=a.state.status;a.event==="hover"&&c===lr.IDLE&&(Dy({title:"mouseEnter",data:[{key:"originalEvent",value:o}],debug:a.debug}),clearTimeout(a.eventDelayTimeout),a.toggle())}}),ks(nl(a),"handleMouseLeave",function(){var i=a.props,o=i.event,l=i.eventDelay,c=i.open;if(!(xe.boolean(c)||TS())){var d=a.state,u=d.status,f=d.positionWrapper;a.event==="hover"&&(Dy({title:"mouseLeave",data:[{key:"originalEvent",value:o}],debug:a.debug}),l?[lr.OPENING,lr.OPEN].indexOf(u)!==-1&&!f&&!a.eventDelayTimeout&&(a.eventDelayTimeout=setTimeout(function(){delete a.eventDelayTimeout,a.toggle()},l*1e3)):a.toggle(lr.IDLE))}}),a.state={currentPlacement:n.placement,needsUpdate:!1,positionWrapper:n.wrapperOptions.position&&!!n.target,status:lr.INIT,statusWrapper:lr.INIT},a._isMounted=!1,a.hasMounted=!1,lo()&&window.addEventListener("load",function(){a.popper&&a.popper.instance.update(),a.wrapperPopper&&a.wrapperPopper.instance.update()}),a}return vv(r,[{key:"componentDidMount",value:function(){if(lo()){var a=this.state.positionWrapper,i=this.props,o=i.children,l=i.open,c=i.target;this._isMounted=!0,Dy({title:"init",data:{hasChildren:!!o,hasTarget:!!c,isControlled:xe.boolean(l),positionWrapper:a,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!o&&c&&xe.boolean(l)}}},{key:"componentDidUpdate",value:function(a,i){if(lo()){var o=this.props,l=o.autoOpen,c=o.open,d=o.target,u=o.wrapperOptions,f=Jfe(i,this.state),h=f.changedFrom,m=f.changed;if(a.open!==c){var g;xe.boolean(c)&&(g=c?lr.OPENING:lr.CLOSING),this.toggle(g)}(a.wrapperOptions.position!==u.position||a.target!==d)&&this.changeWrapperPosition(this.props),m("status",lr.IDLE)&&c?this.toggle(lr.OPEN):h("status",lr.INIT,lr.IDLE)&&l&&this.toggle(lr.OPEN),this.popper&&m("status",lr.OPENING)&&this.popper.instance.update(),this.floaterRef&&(m("status",lr.OPENING)||m("status",lr.CLOSING))&&mhe(this.floaterRef,"transitionend",this.handleTransitionEnd),m("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){lo()&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target,o=this.state.positionWrapper,l=this.props,c=l.disableFlip,d=l.getPopper,u=l.hideArrow,f=l.offset,h=l.placement,m=l.wrapperOptions,g=h==="top"||h==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(h==="center")this.setState({status:lr.IDLE});else if(i&&this.floaterRef){var x=this.options,v=x.arrow,b=x.flip,y=x.offset,j=uH(x,vhe);new nx(i,this.floaterRef,{placement:h,modifiers:tn({arrow:tn({enabled:!u,element:this.arrowRef},v),flip:tn({enabled:!c,behavior:g},b),offset:tn({offset:"0, ".concat(f,"px")},y)},j),onCreate:function(S){var k;if(a.popper=S,!((k=a.floaterRef)!==null&&k!==void 0&&k.isConnected)){a.setState({needsUpdate:!0});return}d(S,"floater"),a._isMounted&&a.setState({currentPlacement:S.placement,status:lr.IDLE}),h!==S.placement&&setTimeout(function(){S.instance.update()},1)},onUpdate:function(S){a.popper=S;var k=a.state.currentPlacement;a._isMounted&&S.placement!==k&&a.setState({currentPlacement:S.placement})}})}if(o){var w=xe.undefined(m.offset)?0:m.offset;new nx(this.target,this.wrapperRef,{placement:m.placement||h,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(w,"px")},flip:{enabled:!1}},onCreate:function(S){a.wrapperPopper=S,a._isMounted&&a.setState({statusWrapper:lr.IDLE}),d(S,"wrapper"),h!==S.placement&&setTimeout(function(){S.instance.update()},1)}})}}},{key:"rebuildPopper",value:function(){var a=this;this.floaterRefInterval=setInterval(function(){var i;(i=a.floaterRef)!==null&&i!==void 0&&i.isConnected&&(clearInterval(a.floaterRefInterval),a.setState({needsUpdate:!1}),a.initPopper())},50)}},{key:"changeWrapperPosition",value:function(a){var i=a.target,o=a.wrapperOptions;this.setState({positionWrapper:o.position&&!!i})}},{key:"toggle",value:function(a){var i=this.state.status,o=i===lr.OPEN?lr.CLOSING:lr.OPENING;xe.undefined(a)||(o=a),this.setState({status:o})}},{key:"debug",get:function(){var a=this.props.debug;return a||lo()&&"ReactFloaterDebug"in window&&!!window.ReactFloaterDebug}},{key:"event",get:function(){var a=this.props,i=a.disableHoverToClick,o=a.event;return o==="hover"&&TS()&&!i?"click":o}},{key:"options",get:function(){var a=this.props.options;return Ii(ahe,a||{})}},{key:"styles",get:function(){var a=this,i=this.state,o=i.status,l=i.positionWrapper,c=i.statusWrapper,d=this.props.styles,u=Ii(xhe(d),d);if(l){var f;[lr.IDLE].indexOf(o)===-1||[lr.IDLE].indexOf(c)===-1?f=u.wrapperPosition:f=this.wrapperPopper.styles,u.wrapper=tn(tn({},u.wrapper),f)}if(this.target){var h=window.getComputedStyle(this.target);this.wrapperStyles?u.wrapper=tn(tn({},u.wrapper),this.wrapperStyles):["relative","static"].indexOf(h.position)===-1&&(this.wrapperStyles={},l||(yhe.forEach(function(m){a.wrapperStyles[m]=h[m]}),u.wrapper=tn(tn({},u.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return u}},{key:"target",get:function(){if(!lo())return null;var a=this.props.target;return a?xe.domElement(a)?a:document.querySelector(a):this.childRef||this.wrapperRef}},{key:"render",value:function(){var a=this.state,i=a.currentPlacement,o=a.positionWrapper,l=a.status,c=this.props,d=c.children,u=c.component,f=c.content,h=c.disableAnimation,m=c.footer,g=c.hideArrow,x=c.id,v=c.open,b=c.showCloseButton,y=c.style,j=c.target,w=c.title,N=O.createElement(vH,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:y,styles:this.styles.wrapper},d),S={};
596return o?S.wrapperInPortal=N:S.wrapperAsChildren=N,O.createElement("span",null,O.createElement(hH,{hasChildren:!!d,id:x,placement:i,setRef:this.setFloaterRef,target:j,zIndex:this.styles.options.zIndex},O.createElement(xH,{component:u,content:f,disableAnimation:h,footer:m,handleClick:this.handleClick,hideArrow:g||i==="center",open:v,placement:i,positionWrapper:o,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:b,status:l,styles:this.styles,title:w}),S.wrapperInPortal),S.wrapperAsChildren)}}]),r}(O.Component);ks(ZE,"propTypes",{autoOpen:ge.bool,callback:ge.func,children:ge.node,component:XI(ge.oneOfType([ge.func,ge.element]),function(e){return!e.content}),content:XI(ge.node,function(e){return!e.component}),debug:ge.bool,disableAnimation:ge.bool,disableFlip:ge.bool,disableHoverToClick:ge.bool,event:ge.oneOf(["hover","click"]),eventDelay:ge.number,footer:ge.node,getPopper:ge.func,hideArrow:ge.bool,id:ge.oneOfType([ge.string,ge.number]),offset:ge.number,open:ge.bool,options:ge.object,placement:ge.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:ge.bool,style:ge.object,styles:ge.object,target:ge.oneOfType([ge.object,ge.string]),title:ge.node,wrapperOptions:ge.shape({offset:ge.number,placement:ge.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:ge.bool})});ks(ZE,"defaultProps",{autoOpen:!1,callback:JI,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:JI,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});var bhe=Object.defineProperty,jhe=(e,t,r)=>t in e?bhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ot=(e,t,r)=>jhe(e,typeof t!="symbol"?t+"":t,r),Nr={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},Pi={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},Ut={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},Jt={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"};function mc(){var e;return!!(typeof window<"u"&&((e=window.document)!=null&&e.createElement))}function yH(e){return e?e.getBoundingClientRect():null}function whe(e=!1){const{body:t,documentElement:r}=document;if(!t||!r)return 0;if(e){const n=[t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight].sort((i,o)=>i-o),a=Math.floor(n.length/2);return n.length%2===0?(n[a-1]+n[a])/2:n[a]}return Math.max(t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}function dl(e){if(typeof e=="string")try{return document.querySelector(e)}catch{return null}return e}function Nhe(e){return!e||e.nodeType!==1?null:getComputedStyle(e)}function sx(e,t,r){if(!e)return Md();const n=W7(e);if(n){if(n.isSameNode(Md()))return r?document:Md();if(!(n.scrollHeight>n.offsetHeight)&&!t)return n.style.overflow="initial",Md()}return n}function Jw(e,t){if(!e)return!1;const r=sx(e,t);return r?!r.isSameNode(Md()):!1}function She(e){return e.offsetParent!==document.body}function Oh(e,t="fixed"){if(!e||!(e instanceof HTMLElement))return!1;const{nodeName:r}=e,n=Nhe(e);return r==="BODY"||r==="HTML"?!1:n&&n.position===t?!0:e.parentNode?Oh(e.parentNode,t):!1}function khe(e){var t;if(!e)return!1;let r=e;for(;r&&r!==document.body;){if(r instanceof HTMLElement){const{display:n,visibility:a}=getComputedStyle(r);if(n==="none"||a==="hidden")return!1}r=(t=r.parentElement)!=null?t:null}return!0}function Che(e,t,r){var n,a,i;const o=yH(e),l=sx(e,r),c=Jw(e,r),d=Oh(e);let u=0,f=(n=o==null?void 0:o.top)!=null?n:0;if(c&&d){const h=(a=e==null?void 0:e.offsetTop)!=null?a:0,m=(i=l==null?void 0:l.scrollTop)!=null?i:0;f=h-m}else l instanceof HTMLElement&&(u=l.scrollTop,!c&&!Oh(e)&&(f+=u),l.isSameNode(Md())||(f+=Md().scrollTop));return Math.floor(f-t)}function The(e,t,r){var n;if(!e)return 0;const{offsetTop:a=0,scrollTop:i=0}=(n=W7(e))!=null?n:{};let o=e.getBoundingClientRect().top+i;a&&(Jw(e,r)||She(e))&&(o-=a);const l=Math.floor(o-t);return l<0?0:l}function Md(){var e;return(e=document.scrollingElement)!=null?e:document.documentElement}function _he(e,t){const{duration:r,element:n}=t;return new Promise((a,i)=>{const{scrollTop:o}=n,l=e>o?e-o:o-e;Oue.top(n,e,{duration:l<100?50:r},c=>c&&c.message!=="Element already at target scroll position"?i(c):a())})}var up=Li.createPortal!==void 0;function bH(e=navigator.userAgent){let t=e;return typeof window>"u"?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":window.opera||e.includes(" OPR/")?t="opera":typeof window.InstallTrigger<"u"?t="firefox":window.chrome?t="chrome":/(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function Db(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function co(e,t={}){const{defaultValue:r,step:n,steps:a}=t;let i=$I(e);if(i)(i.includes("{step}")||i.includes("{steps}"))&&n&&a&&(i=i.replace("{step}",n.toString()).replace("{steps}",a.toString()));else if(p.isValidElement(e)&&!Object.values(e.props).length&&Db(e.type)==="function"){const o=e.type({});i=co(o,t)}else i=$I(r);return i}function Phe(e,t){return!at.plainObject(e)||!at.array(t)?!1:Object.keys(e).every(r=>t.includes(r))}function Ehe(e){const t=/^#?([\da-f])([\da-f])([\da-f])$/i,r=e.replace(t,(a,i,o,l)=>i+i+o+o+l+l),n=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(r);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}function e4(e){return e.disableBeacon||e.placement==="center"}function t4(){return!["chrome","safari","firefox","opera"].includes(bH())}function xu({data:e,debug:t=!1,title:r,warn:n=!1}){const a=n?console.warn||console.error:console.log;t&&(r&&e?(console.groupCollapsed(`%creact-joyride: ${r}`,"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(e)?e.forEach(i=>
596{at.plainObject(i)&&i.key?a.apply(console,[i.key,i.value]):a.apply(console,[i])}):a.apply(console,[e]),console.groupEnd()):console.error("Missing title or data props"))}function Ohe(e){return Object.keys(e)}function jH(e,...t){if(!at.plainObject(e))throw new TypeError("Expected an object");const r={};for(const n in e)({}).hasOwnProperty.call(e,n)&&(t.includes(n)||(r[n]=e[n]));return r}function Ahe(e,...t){if(!at.plainObject(e))throw new TypeError("Expected an object");if(!t.length)return e;const r={};for(const n in e)({}).hasOwnProperty.call(e,n)&&t.includes(n)&&(r[n]=e[n]);return r}function xT(e,t,r){const n=i=>i.replace("{step}",String(t)).replace("{steps}",String(r));if(Db(e)==="string")return n(e);if(!p.isValidElement(e))return e;const{children:a}=e.props;if(Db(a)==="string"&&a.includes("{step}"))return p.cloneElement(e,{children:n(a)});if(Array.isArray(a))return p.cloneElement(e,{children:a.map(i=>typeof i=="string"?n(i):xT(i,t,r))});if(Db(e.type)==="function"&&!Object.values(e.props).length){const i=e.type({});return xT(i,t,r)}return e}function Dhe(e){const{isFirstStep:t,lifecycle:r,previousLifecycle:n,scrollToFirstStep:a,step:i,target:o}=e;return!i.disableScrolling&&(!t||a||r===Ut.TOOLTIP)&&i.placement!=="center"&&(!i.isFixed||!Oh(o))&&n!==r&&[Ut.BEACON,Ut.TOOLTIP].includes(r)}var Mhe={options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:!0}},wH={back:"Back",close:"Close",last:"Last",next:"Next",nextLabelWithProgress:"Next (Step {step} of {steps})",open:"Open the dialog",skip:"Skip"},Ihe={event:"click",placement:"bottom",offset:10,disableBeacon:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrollParentFix:!1,disableScrolling:!1,hideBackButton:!1,hideCloseButton:!1,hideFooter:!1,isFixed:!1,locale:wH,showProgress:!1,showSkipButton:!1,spotlightClicks:!1,spotlightPadding:10},Rhe={continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:void 0,hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]},$he={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",width:380,zIndex:100},fp={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"},r4={borderRadius:4,position:"absolute"};function Lhe(e,t){var r,n,a,i,o;const{floaterProps:l,styles:c}=e,d=Ii((r=t.floaterProps)!=null?r:{},l??{}),u=Ii(c??{},(n=t.styles)!=null?n:{}),f=Ii($he,u.options||{}),h=t.placement==="center"||t.disableBeacon;let{width:m}=f;window.innerWidth>480&&(m=380),"width"in f&&(m=typeof f.width=="number"&&window.innerWidth<f.width?window.innerWidth-30:f.width);const g={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:f.zIndex},x={beacon:{...fp,display:h?"none":"inline-block",height:f.beaconSize,position:"relative",width:f.beaconSize,zIndex:f.zIndex},beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:f.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:`rgba(${Ehe(f.primaryColor).join(",")}, 0.2)`,border:`2px solid ${f.primaryColor}`,borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:f.backgroundColor,borderRadius:5,boxSizing:"border-box",color:f.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:m},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:{...fp,backgroundColor:f.primaryColor,borderRadius:4,color:"#fff"},buttonBack:{...fp,color:f.primaryColor,marginLeft:"auto",marginRight:5},buttonClose:{...fp,color:f.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14},buttonSkip:{...fp,color:f.textColor,fontSize:14},overlay:{...g,backgroundColor:f.overlayColor,mixBlendMode:"hard-light"},overlayLegacy:{...g},overlayLegacyCenter:{...g,backgroundColor:f.overlayColor},spotlight:{...r4,backgroundColor:"gray"},spotlightLegacy:{...r4,boxShadow:`0 0 0 9999px ${f.overlayColor}, ${f.spotlightShadow}`},floaterStyles:{arrow:{color:(o=(i=(a=d==null?void 0:d.styles)==null?void 0:a.arrow)==null?void 0:i.color)!=null?o:f.arrowColor},options:{zIndex:f.zIndex+100}},options:f};return Ii(x,u)}function Fhe(e){return Ahe(e,"beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","hideCloseButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent")}function qu(e,t){var r,n,a,i,o,l;const c=t??{},d=Ii.all([Ihe,Fhe(e),c],{isMergeableObject:at.plainObject}),u=Lhe(e,d),f=Jw(dl(d.target),d.disableScrollParentFix),h=Ii.all([Mhe,(r=e.floaterProps)!=null?r:{},(n=d.floaterProps)!=null?n:{}]);return h.offset=d.offset,h.styles=Ii((a=h.styles)!=null?a:{},u.floaterStyles),h.offset+=(o=(i=e.spotlightPadding)!=null?i:d.spotlightPadding)!=null?o:0,d.placementBeacon&&h.wrapperOptions&&(h.wrapperOptions.placement=d.placementBeacon),f&&h.options.preventOverflow&&(h.options.preventOverflow.boundariesElement="window"),{...d,locale:Ii.all([wH,(l=e.locale)!=null?l:{},d.locale||{}]),floaterProps:h,styles:jH(u,"floaterStyles")}}function NH(e,t=!1){return at.plainObject(e)?e.target?!0:(xu({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(xu({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function n4(e,t=!1){return at.array(e)?e.every(r=>NH(r,t)):(xu({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var SH={action:"init",controlled:!1,index:0,lifecycle:Ut.INIT,origin:null,size:0,status:Jt.IDLE},s4=Ohe(jH(SH,"controlled","size")),Bhe=class{constructor(e){ot(this,"beaconPopper"),ot(this,"tooltipPopper"),ot(this,"data",new Map),ot(this,"listener"),ot(this,"store",new Map),ot(this,"addListener",a=>{this.listener=a}),ot(this,"setSteps",a=>
596{const{size:i,status:o}=this.getState(),l={size:a.length,status:o};this.data.set("steps",a),o===Jt.WAITING&&!i&&a.length&&(l.status=Jt.RUNNING),this.setState(l)}),ot(this,"getPopper",a=>a==="beacon"?this.beaconPopper:this.tooltipPopper),ot(this,"setPopper",(a,i)=>{a==="beacon"?this.beaconPopper=i:this.tooltipPopper=i}),ot(this,"cleanupPoppers",()=>{this.beaconPopper=null,this.tooltipPopper=null}),ot(this,"close",(a=null)=>{const{index:i,status:o}=this.getState();o===Jt.RUNNING&&this.setState({...this.getNextState({action:Nr.CLOSE,index:i+1,origin:a})})}),ot(this,"go",a=>{const{controlled:i,status:o}=this.getState();if(i||o!==Jt.RUNNING)return;const l=this.getSteps()[a];this.setState({...this.getNextState({action:Nr.GO,index:a}),status:l?o:Jt.FINISHED})}),ot(this,"info",()=>this.getState()),ot(this,"next",()=>{const{index:a,status:i}=this.getState();i===Jt.RUNNING&&this.setState(this.getNextState({action:Nr.NEXT,index:a+1}))}),ot(this,"open",()=>{const{status:a}=this.getState();a===Jt.RUNNING&&this.setState({...this.getNextState({action:Nr.UPDATE,lifecycle:Ut.TOOLTIP})})}),ot(this,"prev",()=>{const{index:a,status:i}=this.getState();i===Jt.RUNNING&&this.setState({...this.getNextState({action:Nr.PREV,index:a-1})})}),ot(this,"reset",(a=!1)=>{const{controlled:i}=this.getState();i||this.setState({...this.getNextState({action:Nr.RESET,index:0}),status:a?Jt.RUNNING:Jt.READY})}),ot(this,"skip",()=>{const{status:a}=this.getState();a===Jt.RUNNING&&this.setState({action:Nr.SKIP,lifecycle:Ut.INIT,status:Jt.SKIPPED})}),ot(this,"start",a=>{const{index:i,size:o}=this.getState();this.setState({...this.getNextState({action:Nr.START,index:at.number(a)?a:i},!0),status:o?Jt.RUNNING:Jt.WAITING})}),ot(this,"stop",(a=!1)=>{const{index:i,status:o}=this.getState();[Jt.FINISHED,Jt.SKIPPED].includes(o)||this.setState({...this.getNextState({action:Nr.STOP,index:i+(a?1:0)}),status:Jt.PAUSED})}),ot(this,"update",a=>{var i,o;if(!Phe(a,s4))throw new Error(`State is not valid. Valid keys: ${s4.join(", ")}`);this.setState({...this.getNextState({...this.getState(),...a,action:(i=a.action)!=null?i:Nr.UPDATE,origin:(o=a.origin)!=null?o:null},!0)})});const{continuous:t=!1,stepIndex:r,steps:n=[]}=e??{};this.setState({action:Nr.INIT,controlled:at.number(r),continuous:t,index:at.number(r)?r:0,lifecycle:Ut.INIT,origin:null,status:n.length?Jt.READY:Jt.IDLE},!0),this.beaconPopper=null,this.tooltipPopper=null,this.listener=null,this.setSteps(n)}getState(){return this.store.size?{action:this.store.get("action")||"",controlled:this.store.get("controlled")||!1,index:parseInt(this.store.get("index"),10),lifecycle:this.store.get("lifecycle")||"",origin:this.store.get("origin")||null,size:this.store.get("size")||0,status:this.store.get("status")||""}:{...SH}}getNextState(e,t=!1){var r,n,a,i,o;const{action:l,controlled:c,index:d,size:u,status:f}=this.getState(),h=at.number(e.index)?e.index:d,m=c&&!t?d:Math.min(Math.max(h,0),u);return{action:(r=e.action)!=null?r:l,controlled:c,index:m,lifecycle:(n=e.lifecycle)!=null?n:Ut.INIT,origin:(a=e.origin)!=null?a:null,size:(i=e.size)!=null?i:u,status:m===u?Jt.FINISHED:(o=e.status)!=null?o:f}}getSteps(){const e=this.data.get("steps");return Array.isArray(e)?e:[]}hasUpdatedState(e){const t=JSON.stringify(e),r=JSON.stringify(this.getState());return t!==r}setState(e,t=!1){const r=this.getState(),{action:n,index:a,lifecycle:i,origin:o=null,size:l,status:c}={...r,...e};this.store.set("action",n),this.store.set("index",a),this.store.set("lifecycle",i),this.store.set("origin",o),this.store.set("size",l),this.store.set("status",c),t&&(this.store.set("controlled",e.controlled),this.store.set("continuous",e.continuous)),this.listener&&this.hasUpdatedState(r)&&this.listener(this.getState())}getHelpers(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}};function Uhe(e){return new Bhe(e)}function zhe({styles:e}){return p.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight","data-test-id":"spotlight",style:e})}var Whe=zhe,Vhe=class extends p.Component{constructor(){super(...arguments),ot(this,"isActive",!1),ot(this,"resizeTimeout"),ot(this,"scrollTimeout"),ot(this,"scrollParent"),ot(this,"state",{isScrolling:!1,mouseOverSpotlight:!1,showSpotlight:!0}),ot(this,"hideSpotlight",()=>{const{continuous:e,disableOverlay:t,lifecycle:r}=this.props,n=[Ut.INIT,Ut.BEACON,Ut.COMPLETE,Ut.ERROR];return t||(e?n.includes(r):r!==Ut.TOOLTIP)}),ot(this,"handleMouseMove",e=>
596{const{mouseOverSpotlight:t}=this.state,{height:r,left:n,position:a,top:i,width:o}=this.spotlightStyles,l=a==="fixed"?e.clientY:e.pageY,c=a==="fixed"?e.clientX:e.pageX,d=l>=i&&l<=i+r,f=c>=n&&c<=n+o&&d;f!==t&&this.updateState({mouseOverSpotlight:f})}),ot(this,"handleScroll",()=>{const{target:e}=this.props,t=dl(e);if(this.scrollParent!==document){const{isScrolling:r}=this.state;r||this.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout(()=>{this.updateState({isScrolling:!1,showSpotlight:!0})},50)}else Oh(t,"sticky")&&this.updateState({})}),ot(this,"handleResize",()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.isActive&&this.forceUpdate()},100)})}componentDidMount(){const{debug:e,disableScrolling:t,disableScrollParentFix:r=!1,target:n}=this.props,a=dl(n);this.scrollParent=sx(a??document.body,r,!0),this.isActive=!0,window.addEventListener("resize",this.handleResize)}componentDidUpdate(e){var t;const{disableScrollParentFix:r,lifecycle:n,spotlightClicks:a,target:i}=this.props,{changed:o}=F0(e,this.props);if(o("target")||o("disableScrollParentFix")){const l=dl(i);this.scrollParent=sx(l??document.body,r,!0)}o("lifecycle",Ut.TOOLTIP)&&((t=this.scrollParent)==null||t.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(()=>{const{isScrolling:l}=this.state;l||this.updateState({showSpotlight:!0})},100)),(o("spotlightClicks")||o("disableOverlay")||o("lifecycle"))&&(a&&n===Ut.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):n!==Ut.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}componentWillUnmount(){var e;this.isActive=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),(e=this.scrollParent)==null||e.removeEventListener("scroll",this.handleScroll)}get overlayStyles(){const{mouseOverSpotlight:e}=this.state,{disableOverlayClose:t,placement:r,styles:n}=this.props;let a=n.overlay;return t4()&&(a=r==="center"?n.overlayLegacyCenter:n.overlayLegacy),{cursor:t?"default":"pointer",height:whe(),pointerEvents:e?"none":"auto",...a}}get spotlightStyles(){var e,t,r;const{showSpotlight:n}=this.state,{disableScrollParentFix:a=!1,spotlightClicks:i,spotlightPadding:o=0,styles:l,target:c}=this.props,d=dl(c),u=yH(d),f=Oh(d),h=Che(d,o,a);return{...t4()?l.spotlightLegacy:l.spotlight,height:Math.round(((e=u==null?void 0:u.height)!=null?e:0)+o*2),left:Math.round(((t=u==null?void 0:u.left)!=null?t:0)-o),opacity:n?1:0,pointerEvents:i?"none":"auto",position:f?"fixed":"absolute",top:h,transition:"opacity 0.2s",width:Math.round(((r=u==null?void 0:u.width)!=null?r:0)+o*2)}}updateState(e){this.isActive&&this.setState(t=>({...t,...e}))}render(){const{showSpotlight:e}=this.state,{onClickOverlay:t,placement:r}=this.props,{hideSpotlight:n,overlayStyles:a,spotlightStyles:i}=this;if(n())return null;let o=r!=="center"&&e&&p.createElement(Whe,{styles:i});if(bH()==="safari"){const{mixBlendMode:l,zIndex:c,...d}=a;o=p.createElement("div",{style:{...d}},o),delete a.backgroundColor}return p.createElement("div",{className:"react-joyride__overlay","data-test-id":"overlay",onClick:t,role:"presentation",style:a},o)}},Hhe=class extends p.Component{constructor(){super(...arguments),ot(this,"node",null)}componentDidMount(){const{id:e}=this.props;mc()&&(this.node=document.createElement("div"),this.node.id=e,document.body.appendChild(this.node),up||this.renderReact15())}componentDidUpdate(){mc()&&(up||this.renderReact15())}componentWillUnmount(){!mc()||!this.node||(up||Li.unmountComponentAtNode(this.node),this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=null))}renderReact15(){if(!mc())return;const{children:e}=this.props;this.node&&Li.unstable_renderSubtreeIntoContainer(this,e,this.node)}renderReact16(){if(!mc()||!up)return null;const{children:e}=this.props;return this.node?Li.createPortal(e,this.node):null}render(){return up?this.renderReact16():null}},qhe=class{constructor(e,t){if(ot(this,"element"),ot(this,"options"),ot(this,"canBeTabbed",r=>{const{tabIndex:n}=r;return n===null||n<0?!1:this.canHaveFocus(r)}),ot(this,"canHaveFocus",r=>{const n=/input|select|textarea|button|object/,a=r.nodeName.toLowerCase();return(n.test(a)&&!r.getAttribute("disabled")||a==="a"&&!!r.getAttribute("href"))&&this.isVisible(r)}),ot(this,"findValidTabElements",()=>[].slice.call(this.element.querySelectorAll("*"),0).filter(this.canBeTabbed)),ot(this,"handleKeyDown",r=>{const{code:n="Tab"}=this.options;r.code===n&&this.interceptTab(r)}),ot(this,"interceptTab",r=>{r.preventDefault();const n=this.findValidTabElements(),{shiftKey:a}=r;if(!n.length)return;let i=document.activeElement?n.indexOf(document.activeElement):0;i===-1||!a&&i+1===n.length?i=0:a&&i===0?i=n.length-1:i+=a?-1:1,n[i].focus()}),ot(this,"isHidden",r=>{const n=r.offsetWidth<=0&&r.offsetHeight<=0,a=window.getComputedStyle(r);return n&&!r.innerHTML?!0:n&&a.getPropertyValue("overflow")!=="visible"||a.getPropertyValue("display")==="none"}),ot(this,"isVisible",r=>{let n=r;for(;n;)if(n instanceof HTMLElement){if(n===document.body)break;if(this.isHidden(n))return!1;n=n.parentNode}return!0}),ot(this,"removeScope",()=>{window.removeEventListener("keydown",this.handleKeyDown)}),ot(this,"checkFocus",r=>{document.activeElement!==r&&(r.focus(),window.requestAnimationFrame(()=>this.checkFocus(r)))}),ot(this,"setFocus",()=>{const{selector:r}=this.options;if(!r)return;const n=this.element.querySelector(r);n&&window.requestAnimationFrame(()=>this.checkFocus(n))}),!(e instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=e,this.options=t,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}},Yhe=class extends p.Component{constructor(e){if(super(e),ot(this,"beacon",null),ot(this,"setBeaconRef",a=>{this.beacon=a}),e.beaconComponent)return;const t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.id="joyride-beacon-animation",e.nonce&&r.setAttribute("nonce",e.nonce),r.appendChild(document.createTextNode(` 597 @keyframes joyride-beacon-inner { 598 20% { 599 opacity: 0.9; 600 } 601 602 90% { 603 opacity: 0.7; 604 } 605 } 606 607 @keyframes joyride-beacon-outer { 608 0% { 609 transform: scale(1); 610 } 611 612 45% { 613 opacity: 0.7; 614 transform: scale(0.75); 615 } 616 617 100% { 618 opacity: 0.9; 619 transform: scale(1); 620 } 621 } 622 `)),t.appendChild(r)}componentDidMount(){const{shouldFocus:e}=this.props;setTimeout(()=>{at.domElement(this.beacon)&&e&&this.beacon.focus()},0)}componentWillUnmount(){const e=document.getElementById("joyride-beacon-animation");e!=null&&e.parentNode&&e.parentNode.removeChild(e)}render(){const{beaconComponent:e,continuous:t,index:r,isLastStep:n,locale:a,onClickOrHover:i,size:o,step:l,styles:c}=this.props,d=co(a.open),u={"aria-label":d,onClick:i,onMouseEnter:i,ref:this.setBeaconRef,title:d};let f;if(e){const h=e;f=p.createElement(h,{continuous:t,index:r,isLastStep:n,size:o,step:l,...u})}else f=p.createElement("button",{key:"JoyrideBeacon",className:"react-joyride__beacon","data-test-id":"button-beacon",style:c.beacon,type:"button",...u},p.createElement("span",{style:c.beaconInner}),p.createElement("span",{style:c.beaconOuter}));return f}};function Ghe({styles:e,...t}){const{color:r,height:n,width:a,...i}=e;return O.createElement("button",{style:i,type:"button",...t},O.createElement("svg",{height:typeof n=="number"?`${n}px`:n,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:typeof a=="number"?`${a}px`:a,xmlns:"http://www.w3.org/2000/svg"},O.createElement("g",null,O.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}var Khe=Ghe;function Qhe(e){const{backProps:t,closeProps:r,index:n,isLastStep:a,primaryProps:i,skipProps:o,step:l,tooltipProps:c}=e,{content:d,hideBackButton:u,hideCloseButton:f,hideFooter:h,showSkipButton:m,styles:g,title:x}=l,v={};return v.primary=p.createElement("button",{"data-test-id":"button-primary",style:g.buttonNext,type:"button",...i}),m&&!a&&(v.skip=p.createElement("button",{"aria-live":"off","data-test-id":"button-skip",style:g.buttonSkip,type:"button",...o})),!u&&n>0&&(v.back=p.createElement("button",{"data-test-id":"button-back",style:g.buttonBack,type:"button",...t})),v.close=!f&&p.createElement(Khe,{"data-test-id":"button-close",styles:g.buttonClose,...r}),p.createElement("div",{key:"JoyrideTooltip","aria-label":co(x??d),className:"react-joyride__tooltip",style:g.tooltip,...c},p.createElement("div",{style:g.tooltipContainer},x&&p.createElement("h1",{"aria-label":co(x),style:g.tooltipTitle},x),p.createElement("div",{style:g.tooltipContent},d)),!h&&p.createElement("div",{style:g.tooltipFooter},p.createElement("div",{style:g.tooltipFooterSpacer},v.skip),v.back,v.primary),v.close)}var Zhe=Qhe,Xhe=class extends p.Component{constructor(){super(...arguments),ot(this,"handleClickBack",e=>{e.preventDefault();const{helpers:t}=this.props;t.prev()}),ot(this,"handleClickClose",e=>{e.preventDefault();const{helpers:t}=this.props;t.close("button_close")}),ot(this,"handleClickPrimary",e=>{e.preventDefault();const{continuous:t,helpers:r}=this.props;if(!t){r.close("button_primary");return}r.next()}),ot(this,"handleClickSkip",e=>{e.preventDefault();const{helpers:t}=this.props;t.skip()}),ot(this,"getElementsProps",()=>{const{continuous:e,index:t,isLastStep:r,setTooltipRef:n,size:a,step:i}=this.props,{back:o,close:l,last:c,next:d,nextLabelWithProgress:u,skip:f}=i.locale,h=co(o),m=co(l),g=co(c),x=co(d),v=co(f);let b=l,y=m;if(e){if(b=d,y=x,i.showProgress&&!r){const j=co(u,{step:t+1,steps:a});b=xT(u,t+1,a),y=j}r&&(b=c,y=g)}return{backProps:{"aria-label":h,children:o,"data-action":"back",onClick:this.handleClickBack,role:"button",title:h},closeProps:{"aria-label":m,children:l,"data-action":"close",onClick:this.handleClickClose,role:"button",title:m},primaryProps:{"aria-label":y,children:b,"data-action":"primary",onClick:this.handleClickPrimary,role:"button",title:y},skipProps:{"aria-label":v,children:f,"data-action":"skip",onClick:this.handleClickSkip,role:"button",title:v},tooltipProps:{"aria-modal":!0,ref:n,role:"alertdialog"}}})}render(){const{continuous:e,index:t,isLastStep:r,setTooltipRef:n,size:a,step:i}=this.props,{beaconComponent:o,tooltipComponent:l,...c}=i;let d;if(l){const u={...this.getElementsProps(),continuous:e,index:t,isLastStep:r,size:a,step:c,setTooltipRef:n},f=l;d=p.createElement(f,{...u})}else d=p.createElement(Zhe,{...this.getElementsProps(),continuous:e,index:t,isLastStep:r,size:a,step:i});return d}},Jhe=class extends p.Component{constructor(){super(...arguments),ot(this,"scope",null),ot(this,"tooltip",null),ot(this,"handleClickHoverBeacon",e=>
622{const{step:t,store:r}=this.props;e.type==="mouseenter"&&t.event!=="hover"||r.update({lifecycle:Ut.TOOLTIP})}),ot(this,"setTooltipRef",e=>{this.tooltip=e}),ot(this,"setPopper",(e,t)=>{var r;const{action:n,lifecycle:a,step:i,store:o}=this.props;t==="wrapper"?o.setPopper("beacon",e):o.setPopper("tooltip",e),o.getPopper("beacon")&&(o.getPopper("tooltip")||i.placement==="center")&&a===Ut.INIT&&o.update({action:n,lifecycle:Ut.READY}),(r=i.floaterProps)!=null&&r.getPopper&&i.floaterProps.getPopper(e,t)}),ot(this,"renderTooltip",e=>{const{continuous:t,helpers:r,index:n,size:a,step:i}=this.props;return p.createElement(Xhe,{continuous:t,helpers:r,index:n,isLastStep:n+1===a,setTooltipRef:this.setTooltipRef,size:a,step:i,...e})})}componentDidMount(){const{debug:e,index:t}=this.props;xu({title:`step:${t}`,data:[{key:"props",value:this.props}],debug:e})}componentDidUpdate(e){var t;const{action:r,callback:n,continuous:a,controlled:i,debug:o,helpers:l,index:c,lifecycle:d,shouldScroll:u,status:f,step:h,store:m}=this.props,{changed:g,changedFrom:x}=F0(e,this.props),v=l.info(),b=a&&r!==Nr.CLOSE&&(c>0||r===Nr.PREV),y=g("action")||g("index")||g("lifecycle")||g("status"),j=x("lifecycle",[Ut.TOOLTIP,Ut.INIT],Ut.INIT),w=g("action",[Nr.NEXT,Nr.PREV,Nr.SKIP,Nr.CLOSE]),N=i&&c===e.index;if(w&&(j||N)&&n({...v,index:e.index,lifecycle:Ut.COMPLETE,step:e.step,type:Pi.STEP_AFTER}),h.placement==="center"&&f===Jt.RUNNING&&g("index")&&r!==Nr.START&&d===Ut.INIT&&m.update({lifecycle:Ut.READY}),y){const S=dl(h.target),k=!!S;k&&khe(S)?(x("status",Jt.READY,Jt.RUNNING)||x("lifecycle",Ut.INIT,Ut.READY))&&n({...v,step:h,type:Pi.STEP_BEFORE}):(console.warn(k?"Target not visible":"Target not mounted",h),n({...v,type:Pi.TARGET_NOT_FOUND,step:h}),i||m.update({index:c+(r===Nr.PREV?-1:1)}))}x("lifecycle",Ut.INIT,Ut.READY)&&m.update({lifecycle:e4(h)||b?Ut.TOOLTIP:Ut.BEACON}),g("index")&&xu({title:`step:${d}`,data:[{key:"props",value:this.props}],debug:o}),g("lifecycle",Ut.BEACON)&&n({...v,step:h,type:Pi.BEACON}),g("lifecycle",Ut.TOOLTIP)&&(n({...v,step:h,type:Pi.TOOLTIP}),u&&this.tooltip&&(this.scope=new qhe(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus())),x("lifecycle",[Ut.TOOLTIP,Ut.INIT],Ut.INIT)&&((t=this.scope)==null||t.removeScope(),m.cleanupPoppers())}componentWillUnmount(){var e;(e=this.scope)==null||e.removeScope()}get open(){const{lifecycle:e,step:t}=this.props;return e4(t)||e===Ut.TOOLTIP}render(){const{continuous:e,debug:t,index:r,nonce:n,shouldScroll:a,size:i,step:o}=this.props,l=dl(o.target);return!NH(o)||!at.domElement(l)?null:p.createElement("div",{key:`JoyrideStep-${r}`,className:"react-joyride__step"},p.createElement(ZE,{...o.floaterProps,component:this.renderTooltip,debug:t,getPopper:this.setPopper,id:`react-joyride-step-${r}`,open:this.open,placement:o.placement,target:o.target},p.createElement(Yhe,{beaconComponent:o.beaconComponent,continuous:e,index:r,isLastStep:r+1===i,locale:o.locale,nonce:n,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:a,size:i,step:o,styles:o.styles})))}},kH=class extends p.Component{constructor(e){super(e),ot(this,"helpers"),ot(this,"store"),ot(this,"callback",o=>{const{callback:l}=this.props;at.function(l)&&l(o)}),ot(this,"handleKeyboard",o=>{const{index:l,lifecycle:c}=this.state,{steps:d}=this.props,u=d[l];c===Ut.TOOLTIP&&o.code==="Escape"&&u&&!u.disableCloseOnEsc&&this.store.close("keyboard")}),ot(this,"handleClickOverlay",()=>{const{index:o}=this.state,{steps:l}=this.props;qu(this.props,l[o]).disableOverlayClose||this.helpers.close("overlay")}),ot(this,"syncState",o=>{this.setState(o)});const{debug:t,getHelpers:r,run:n=!0,stepIndex:a}=e;this.store=Uhe({...e,controlled:n&&at.number(a)}),this.helpers=this.store.getHelpers();const{addListener:i}=this.store;xu({title:"init",data:[{key:"props",value:this.props},{key:"state",value:this.state}],debug:t}),i(this.syncState),r&&r(this.helpers),this.state=this.store.getState()}componentDidMount(){if(!mc())return;const{debug:e,disableCloseOnEsc:t,run:r,steps:n}=this.props,{start:a}=this.store;n4(n,e)&&r&&a(),t||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}componentDidUpdate(e,t){if(!mc())return;const{action:r,controlled:n,index:a,status:i}=this.state,{debug:o,run:l,stepIndex:c,steps:d}=this.props,{stepIndex:u,steps:f}=e,{reset:h,setSteps:m,start:g,stop:x,update:v}=this.store,{changed:b}=F0(e,this.props),{changed:y,changedFrom:j}=F0(t,this.state),w=qu(this.props,d[a]),N=!Ys(f,d),S=at.number(c)&&b("stepIndex"),k=dl(w.target);if(N&&(n4(d,o)?m(d):console.warn("Steps are not valid",d)),b("run")&&(l?g(c):x()),S){let E=at.number(u)&&u<c?Nr.NEXT:Nr.PREV;r===Nr.STOP&&(E=Nr.START),[Jt.FINISHED,Jt.SKIPPED].includes(i)||v({action:r===Nr.CLOSE?Nr.CLOSE:E,index:c,lifecycle:Ut.INIT})}!n&&i===Jt.RUNNING&&a===0&&!k&&(this.store.update({index:a+1}),this.callback({...this.state,type:Pi.TARGET_NOT_FOUND,step:w}));const T={...this.state,index:a,step:w};
622if(y("action",[Nr.NEXT,Nr.PREV,Nr.SKIP,Nr.CLOSE])&&y("status",Jt.PAUSED)){const E=qu(this.props,d[t.index]);this.callback({...T,index:t.index,lifecycle:Ut.COMPLETE,step:E,type:Pi.STEP_AFTER})}if(y("status",[Jt.FINISHED,Jt.SKIPPED])){const E=qu(this.props,d[t.index]);n||this.callback({...T,index:t.index,lifecycle:Ut.COMPLETE,step:E,type:Pi.STEP_AFTER}),this.callback({...T,type:Pi.TOUR_END,step:E,index:t.index}),h()}else j("status",[Jt.IDLE,Jt.READY],Jt.RUNNING)?this.callback({...T,type:Pi.TOUR_START}):(y("status")||y("action",Nr.RESET))&&this.callback({...T,type:Pi.TOUR_STATUS});this.scrollToStep(t)}componentWillUnmount(){const{disableCloseOnEsc:e}=this.props;e||document.body.removeEventListener("keydown",this.handleKeyboard)}scrollToStep(e){const{index:t,lifecycle:r,status:n}=this.state,{debug:a,disableScrollParentFix:i=!1,scrollDuration:o,scrollOffset:l=20,scrollToFirstStep:c=!1,steps:d}=this.props,u=qu(this.props,d[t]),f=dl(u.target),h=Dhe({isFirstStep:t===0,lifecycle:r,previousLifecycle:e.lifecycle,scrollToFirstStep:c,step:u,target:f});if(n===Jt.RUNNING&&h){const m=Jw(f,i),g=sx(f,i);let x=Math.floor(The(f,l,i))||0;xu({title:"scrollToStep",data:[{key:"index",value:t},{key:"lifecycle",value:r},{key:"status",value:n}],debug:a});const v=this.store.getPopper("beacon"),b=this.store.getPopper("tooltip");if(r===Ut.BEACON&&v){const{offsets:y,placement:j}=v;!["bottom"].includes(j)&&!m&&(x=Math.floor(y.popper.top-l))}else if(r===Ut.TOOLTIP&&b){const{flipped:y,offsets:j,placement:w}=b;["top","right","left"].includes(w)&&!y&&!m?x=Math.floor(j.popper.top-l):x-=u.spotlightPadding}x=x>=0?x:0,n===Jt.RUNNING&&_he(x,{element:g,duration:o}).then(()=>{setTimeout(()=>{var y;(y=this.store.getPopper("tooltip"))==null||y.instance.update()},10)})}}render(){if(!mc())return null;const{index:e,lifecycle:t,status:r}=this.state,{continuous:n=!1,debug:a=!1,nonce:i,scrollToFirstStep:o=!1,steps:l}=this.props,c=r===Jt.RUNNING,d={};if(c&&l[e]){const u=qu(this.props,l[e]);d.step=p.createElement(Jhe,{...this.state,callback:this.callback,continuous:n,debug:a,helpers:this.helpers,nonce:i,shouldScroll:!u.disableScrolling&&(e!==0||o),step:u,store:this.store}),d.overlay=p.createElement(Hhe,{id:"react-joyride-portal"},p.createElement(Vhe,{...u,continuous:n,debug:a,lifecycle:t,onClickOverlay:this.handleClickOverlay}))}return p.createElement("div",{className:"react-joyride"},d.step,d.overlay)}};ot(kH,"defaultProps",Rhe);var CH=kH;const eme=()=>{const{isTutorialActive:e,isTutorialCompleted:t,completeTutorial:r,activeFeatureTour:n,startFeatureTour:a,exitFeatureTour:i}=hv(),[o,l]=O.useState(0),[c,d]=O.useState(""),[u,f]=Nn();p.useEffect(()=>{d(u)},[u,d]);const h=p.useMemo(()=>()=>[{target:"body",content:s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-bold mb-2",children:"Welcome to SmartScheduler!"}),s.jsx("p",{children:"Let's take a quick tour to help you get started with our platform. You can skip this tutorial at any time and access it again from your profile settings."})]}),placement:"center",disableBeacon:!0},{target:'[data-tutorial="dashboard-overview"]',content:s.jsxs("div",{children:[s.jsx("h3",{className:"text-md font-semibold mb-1",children:"Dashboard Overview"}),s.jsx("p",{children:"This is your dashboard, where you can see your upcoming events, calendar integrations, and quick access to important features."})]}),placement:"bottom"}],[]),m=p.useMemo(()=>()=>[{target:'[data-tutorial="calendar-view"]',content:s.jsxs("div",{children:[s.jsx("h3",{className:"text-md font-semibold mb-1",children:"Calendar Management"}),s.jsx("p",{children:"This is your calendar view. You can view events by day, week, or month. Click on any time slot to create a new event."})]}),placement:"bottom"}],[]),g=p.useMemo(()=>()=>[{target:'[data-tutorial="profile-section"]',content:s.jsxs("div",{children:[s.jsx("h3",{className:"text-md font-semibold mb-1",children:"Your Profile"}),s.jsx("p",{children:"Here you can update your personal information, change your password, and manage notification preferences."})]}),placement:"right"}],[]),x=p.useMemo(()=>()=>[{target:'[data-tutorial="team-management"]',content:s.jsxs("div",{children:[s.jsx("h3",{className:"text-md font-semibold mb-1",children:"Team Management"}),s.jsx("p",{children:"As a team manager or company admin, you can manage team members, assign roles, and oversee team calendars."})]}),placement:"bottom"}],[]),v=p.useMemo(()=>c==="/"?h():c.includes("/calendar")||c.includes("/events")?m():c.includes("/profile")?g():c.includes("/team")?x():h(),[c,h,m,g,x]),b=y=>{const{action:j,index:w,status:N,type:S}=y;if(N===Jt.FINISHED||N===Jt.SKIPPED)r();else if(S==="step:after"&&j==="next"){l(w+1);const k=v[w];k&&k.navTo&&k.navTo!==c&&f(k.navTo)}else S==="step:after"&&j==="prev"&&l(w-1)};return!e||t?null:s.jsx(CH,{callback:b,continuous:!0,scrollToFirstStep:!0,showProgress:!0,showSkipButton:!0,disableOverlayClose:!1,disableCloseOnEsc:!1,steps:v,stepIndex:o,styles:{options:{zIndex:1e4,primaryColor:"#6366f1"},tooltipContainer:{textAlign:"left"},buttonNext:{backgroundColor:"#6366f1"},buttonBack:{marginRight:10}}})};var tme=PP.useId||(()=>{}),rme=0;function La(e){const[t,r]=p.useState(tme());return Bn(()=>{r(n=>n??String(rme++))},[e]),t?`radix-${t}`:""}var _S="focusScope.autoFocusOnMount",PS="focusScope.autoFocusOnUnmount",a4={bubbles:!1,cancelable:!0},nme="FocusScope",jv=p.forwardRef((e,t)=>
vendor: 6,232 bytes, line 622
622{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=p.useState(null),d=nn(a),u=nn(i),f=p.useRef(null),h=Ft(t,x=>c(x)),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let x=function(j){if(m.paused||!l)return;const w=j.target;l.contains(w)?f.current=w:oc(f.current,{select:!0})},v=function(j){if(m.paused||!l)return;const w=j.relatedTarget;w!==null&&(l.contains(w)||oc(f.current,{select:!0}))},b=function(j){if(document.activeElement===document.body)for(const N of j)N.removedNodes.length>0&&oc(l)};document.addEventListener("focusin",x),document.addEventListener("focusout",v);const y=new MutationObserver(b);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",v),y.disconnect()}}},[n,l,m.paused]),p.useEffect(()=>{if(l){o4.add(m);const x=document.activeElement;if(!l.contains(x)){const b=new CustomEvent(_S,a4);l.addEventListener(_S,d),l.dispatchEvent(b),b.defaultPrevented||(sme(cme(TH(l)),{select:!0}),document.activeElement===x&&oc(l))}return()=>{l.removeEventListener(_S,d),setTimeout(()=>{const b=new CustomEvent(PS,a4);l.addEventListener(PS,u),l.dispatchEvent(b),b.defaultPrevented||oc(x??document.body,{select:!0}),l.removeEventListener(PS,u),o4.remove(m)},0)}}},[l,d,u,m]);const g=p.useCallback(x=>{if(!r&&!n||m.paused)return;const v=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,b=document.activeElement;if(v&&b){const y=x.currentTarget,[j,w]=ame(y);j&&w?!x.shiftKey&&b===w?(x.preventDefault(),r&&oc(j,{select:!0})):x.shiftKey&&b===j&&(x.preventDefault(),r&&oc(w,{select:!0})):b===y&&x.preventDefault()}},[r,n,m.paused]);return s.jsx(Ke.div,{tabIndex:-1,...o,ref:h,onKeyDown:g})});jv.displayName=nme;function sme(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(oc(n,{select:t}),document.activeElement!==r)return}function ame(e){const t=TH(e),r=i4(t,e),n=i4(t.reverse(),e);return[r,n]}function TH(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function i4(e,t){for(const r of e)if(!ime(r,{upTo:t}))return r}function ime(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 ome(e){return e instanceof HTMLInputElement&&"select"in e}function oc(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&ome(e)&&t&&e.select()}}var o4=lme();function lme(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=l4(e,t),e.unshift(t)},remove(t){var r;e=l4(e,t),(r=e[0])==null||r.resume()}}}function l4(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function cme(e){return e.filter(t=>t.tagName!=="A")}var ES=0;function eN(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??c4()),document.body.insertAdjacentElement("beforeend",e[1]??c4()),ES++,()=>{ES===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ES--}},[])}function c4(){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 ho=function(){return ho=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ho.apply(this,arguments)};function _H(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function dme(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var Mb="right-scroll-bar-position",Ib="width-before-scroll-bar",ume="with-scroll-bars-hidden",fme="--removed-body-scroll-bar-size";function OS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function hme(e,t){var r=p.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var mme=typeof window<"u"?p.useLayoutEffect:p.useEffect,d4=new WeakMap;function pme(e,t){var r=hme(null,function(n){return e.forEach(function(a){return OS(a,n)})});return mme(function(){var n=d4.get(r);if(n){var a=new Set(n),i=new Set(e),o=r.current;a.forEach(function(l){i.has(l)||OS(l,null)}),i.forEach(function(l){a.has(l)||OS(l,o)})}d4.set(r,e)},[e]),r}function gme(e){return e}function xme(e,t){t===void 0&&(t=gme);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var o=t(i,n);return r.push(o),function(){r=r.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(l){return i(l)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var l=r;r=[],l.forEach(i),o=r}var c=function(){var u=o;o=[],u.forEach(i)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(u){o.push(u),d()},filter:function(u){return o=o.filter(u),r}}}};return a}function vme(e){e===void 0&&(e={});var t=xme(null);return t.options=ho({async:!0,ssr:!1},e),t}var PH=function(e){var t=e.sideCar,r=_H(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,ho({},r))};
vendor: 4,532 bytes, lines 622-659
622PH.isSideCarExport=!0;function yme(e,t){return e.useMedium(t),PH}var EH=vme(),AS=function(){},tN=p.forwardRef(function(e,t){var r=p.useRef(null),n=p.useState({onScrollCapture:AS,onWheelCapture:AS,onTouchMoveCapture:AS}),a=n[0],i=n[1],o=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,f=e.shards,h=e.sideCar,m=e.noIsolation,g=e.inert,x=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,y=e.gapMode,j=_H(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,N=pme([r,t]),S=ho(ho({},j),a);return p.createElement(p.Fragment,null,u&&p.createElement(w,{sideCar:EH,removeScrollBar:d,shards:f,noIsolation:m,inert:g,setCallbacks:i,allowPinchZoom:!!x,lockRef:r,gapMode:y}),o?p.cloneElement(p.Children.only(l),ho(ho({},S),{ref:N})):p.createElement(b,ho({},S,{className:c,ref:N}),l))});tN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tN.classNames={fullWidth:Ib,zeroRight:Mb};var bme=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jme(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bme();return t&&e.setAttribute("nonce",t),e}function wme(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Nme(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Sme=function(){var e=0,t=null;return{add:function(r){e==0&&(t=jme())&&(wme(t,r),Nme(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kme=function(){var e=Sme();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},OH=function(){var e=kme(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},Cme={left:0,top:0,right:0,gap:0},DS=function(e){return parseInt(e||"",10)||0},Tme=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[DS(r),DS(n),DS(a)]},_me=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cme;var t=Tme(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Pme=OH(),Wf="data-scroll-locked",Eme=function(e,t,r,n){var a=e.left,i=e.top,o=e.right,l=e.gap;return r===void 0&&(r="margin"),` 623 .`.concat(ume,` { 624 overflow: hidden `).concat(n,`; 625 padding-right: `).concat(l,"px ").concat(n,`; 626 } 627 body[`).concat(Wf,`] { 628 overflow: hidden `).concat(n,`; 629 overscroll-behavior: contain; 630 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 631 padding-left: `.concat(a,`px; 632 padding-top: `).concat(i,`px; 633 padding-right: `).concat(o,`px; 634 margin-left:0; 635 margin-top:0; 636 margin-right: `).concat(l,"px ").concat(n,`; 637 `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),` 638 } 639 640 .`).concat(Mb,` { 641 right: `).concat(l,"px ").concat(n,`; 642 } 643 644 .`).concat(Ib,` { 645 margin-right: `).concat(l,"px ").concat(n,`; 646 } 647 648 .`).concat(Mb," .").concat(Mb,` { 649 right: 0 `).concat(n,`; 650 } 651 652 .`).concat(Ib," .").concat(Ib,` { 653 margin-right: 0 `).concat(n,`; 654 } 655 656 body[`).concat(Wf,`] { 657 `).concat(fme,": ").concat(l,`px; 658 } 659`)},u4=function(){var e=parseInt(document.body.getAttribute(Wf)||"0",10);return isFinite(e)?e:0},Ome=function(){p.useEffect(function(){return document.body.setAttribute(Wf,(u4()+1).toString()),function(){var e=u4()-1;e<=0?document.body.removeAttribute(Wf):document.body.setAttribute(Wf,e.toString())}},[])},Ame=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;Ome();var i=p.useMemo(function(){return _me(a)},[a]);return p.createElement(Pme,{styles:Eme(i,!t,a,r?"":"!important")})},vT=!1;if(typeof window<"u")try{var My=Object.defineProperty({},"passive",{get:function(){return vT=!0,!0}});window.addEventListener("test",My,My),window.removeEventListener("test",My,My)}catch{vT=!1}var Yu=vT?{passive:!1}:!1,Dme=function(e){return e.tagName==="TEXTAREA"},AH=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Dme(e)&&r[t]==="visible")},Mme=function(e){return AH(e,"overflowY")},Ime=function(e){return AH(e,"overflowX")},f4=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=DH(e,n);
vendor: 9,236 bytes, lines 659-662
659if(a){var i=MH(e,n),o=i[1],l=i[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Rme=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},$me=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},DH=function(e,t){return e==="v"?Mme(t):Ime(t)},MH=function(e,t){return e==="v"?Rme(t):$me(t)},Lme=function(e,t){return e==="h"&&t==="rtl"?-1:1},Fme=function(e,t,r,n,a){var i=Lme(e,window.getComputedStyle(t).direction),o=i*n,l=r.target,c=t.contains(l),d=!1,u=o>0,f=0,h=0;do{var m=MH(e,l),g=m[0],x=m[1],v=m[2],b=x-v-i*g;(g||b)&&DH(e,l)&&(f+=b,h+=g),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(u&&(Math.abs(f)<1||!a)||!u&&(Math.abs(h)<1||!a))&&(d=!0),d},Iy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},h4=function(e){return[e.deltaX,e.deltaY]},m4=function(e){return e&&"current"in e?e.current:e},Bme=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ume=function(e){return` 660 .block-interactivity-`.concat(e,` {pointer-events: none;} 661 .allow-interactivity-`).concat(e,` {pointer-events: all;} 662`)},zme=0,Gu=[];function Wme(e){var t=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),a=p.useState(zme++)[0],i=p.useState(OH)[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(a));var x=dme([e.lockRef.current],(e.shards||[]).map(m4),!0).filter(Boolean);return x.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),x.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=p.useCallback(function(x,v){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!o.current.allowPinchZoom;var b=Iy(x),y=r.current,j="deltaX"in x?x.deltaX:y[0]-b[0],w="deltaY"in x?x.deltaY:y[1]-b[1],N,S=x.target,k=Math.abs(j)>Math.abs(w)?"h":"v";if("touches"in x&&k==="h"&&S.type==="range")return!1;var T=f4(k,S);if(!T)return!0;if(T?N=k:(N=k==="v"?"h":"v",T=f4(k,S)),!T)return!1;if(!n.current&&"changedTouches"in x&&(j||w)&&(n.current=N),!N)return!0;var C=n.current||N;return Fme(C,v,x,C==="h"?j:w,!0)},[]),c=p.useCallback(function(x){var v=x;if(!(!Gu.length||Gu[Gu.length-1]!==i)){var b="deltaY"in v?h4(v):Iy(v),y=t.current.filter(function(N){return N.name===v.type&&(N.target===v.target||v.target===N.shadowParent)&&Bme(N.delta,b)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var j=(o.current.shards||[]).map(m4).filter(Boolean).filter(function(N){return N.contains(v.target)}),w=j.length>0?l(v,j[0]):!o.current.noIsolation;w&&v.cancelable&&v.preventDefault()}}},[]),d=p.useCallback(function(x,v,b,y){var j={name:x,delta:v,target:b,should:y,shadowParent:Vme(b)};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(w){return w!==j})},1)},[]),u=p.useCallback(function(x){r.current=Iy(x),n.current=void 0},[]),f=p.useCallback(function(x){d(x.type,h4(x),x.target,l(x,e.lockRef.current))},[]),h=p.useCallback(function(x){d(x.type,Iy(x),x.target,l(x,e.lockRef.current))},[]);p.useEffect(function(){return Gu.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Yu),document.addEventListener("touchmove",c,Yu),document.addEventListener("touchstart",u,Yu),function(){Gu=Gu.filter(function(x){return x!==i}),document.removeEventListener("wheel",c,Yu),document.removeEventListener("touchmove",c,Yu),document.removeEventListener("touchstart",u,Yu)}},[]);var m=e.removeScrollBar,g=e.inert;return p.createElement(p.Fragment,null,g?p.createElement(i,{styles:Ume(a)}):null,m?p.createElement(Ame,{gapMode:e.gapMode}):null)}function Vme(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Hme=yme(EH,Wme);var wv=p.forwardRef(function(e,t){return p.createElement(tN,ho({},e,{ref:t,sideCar:Hme}))});wv.classNames=tN.classNames;var qme=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ku=new WeakMap,Ry=new WeakMap,$y={},MS=0,IH=function(e){return e&&(e.host||IH(e.parentNode))},Yme=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=IH(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Gme=function(e,t,r,n){var a=Yme(t,Array.isArray(e)?e:[e]);$y[r]||($y[r]=new WeakMap);var i=$y[r],o=[],l=new Set,c=new Set(a),d=function(f){!f||l.has(f)||(l.add(f),d(f.parentNode))};a.forEach(d);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(l.has(h))u(h);else try{var m=h.getAttribute(n),g=m!==null&&m!=="false",x=(Ku.get(h)||0)+1,v=(i.get(h)||0)+1;Ku.set(h,x),i.set(h,v),o.push(h),x===1&&g&&Ry.set(h,!0),v===1&&h.setAttribute(r,"true"),g||h.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return u(t),l.clear(),MS++,function(){o.forEach(function(f){var h=Ku.get(f)-1,m=i.get(f)-1;Ku.set(f,h),i.set(f,m),h||(Ry.has(f)||f.removeAttribute(n),Ry.delete(f)),m||f.removeAttribute(r)}),MS--,MS||(Ku=new WeakMap,Ku=new WeakMap,Ry=new WeakMap,$y={})}},rN=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=qme(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live]"))),Gme(n,a,r,"aria-hidden")):function(){return null}},XE="Dialog",[RH,$H]=Is(XE),[Kme,Ki]=RH(XE),LH=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,l=p.useRef(null),c=p.useRef(null),[d=!1,u]=xs({prop:n,defaultProp:a,onChange:i});return s.jsx(Kme,{scope:t,triggerRef:l,contentRef:c,contentId:La(),titleId:La(),descriptionId:La(),open:d,onOpenChange:u,onOpenToggle:p.useCallback(()=>u(f=>!f),[u]),modal:o,children:r})};LH.displayName=XE;var FH="DialogTrigger",BH=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Ki(FH,r),i=Ft(t,a.triggerRef);return s.jsx(Ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":t2(a.open),...n,ref:i,onClick:$e(e.onClick,a.onOpenToggle)})});BH.displayName=FH;var JE="DialogPortal",[Qme,UH]=RH(JE,{forceMount:void 0}),zH=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,i=Ki(JE,t);return s.jsx(Qme,{scope:t,forceMount:r,children:p.Children.map(n,o=>s.jsx(Jn,{present:r||i.open,children:s.jsx(vm,{asChild:!0,container:a,children:o})}))})};zH.displayName=JE;var W0="DialogOverlay",WH=p.forwardRef((e,t)=>{const r=UH(W0,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Ki(W0,e.__scopeDialog);return i.modal?s.jsx(Jn,{present:n||i.open,children:s.jsx(Zme,{...a,ref:t})}):null});WH.displayName=W0;var Zme=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Ki(W0,r);return s.jsx(wv,{as:$o,allowPinchZoom:!0,shards:[a.contentRef],children:s.jsx(Ke.div,{"data-state":t2(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),vu="DialogContent",VH=p.forwardRef((e,t)=>{const r=UH(vu,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Ki(vu,e.__scopeDialog);return s.jsx(Jn,{present:n||i.open,children:i.modal?s.jsx(Xme,{...a,ref:t}):s.jsx(Jme,{...a,ref:t})})});VH.displayName=vu;var Xme=p.forwardRef((e,t)=>{const r=Ki(vu,e.__scopeDialog),n=p.useRef(null),a=Ft(t,r.contentRef,n);return p.useEffect(()=>{const i=n.current;if(i)return rN(i)},[]),s.jsx(HH,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$e(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:$e(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:$e(e.onFocusOutside,i=>i.preventDefault())})}),Jme=p.forwardRef((e,t)=>{const r=Ki(vu,e.__scopeDialog),n=p.useRef(!1),a=p.useRef(!1);return s.jsx(HH,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((d=r.triggerRef.current)==null?void 0:d.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),HH=p.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,l=Ki(vu,r),c=p.useRef(null),d=Ft(t,c);return eN(),s.jsxs(s.Fragment,{children:[s.jsx(jv,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(xm,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":t2(l.open),...o,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(tpe,{titleId:l.titleId}),s.jsx(npe,{contentRef:c,descriptionId:l.descriptionId})]})]})}),e2="DialogTitle",qH=p.forwardRef((e,t)=>
662{const{__scopeDialog:r,...n}=e,a=Ki(e2,r);return s.jsx(Ke.h2,{id:a.titleId,...n,ref:t})});qH.displayName=e2;var YH="DialogDescription",GH=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Ki(YH,r);return s.jsx(Ke.p,{id:a.descriptionId,...n,ref:t})});GH.displayName=YH;var KH="DialogClose",QH=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Ki(KH,r);return s.jsx(Ke.button,{type:"button",...n,ref:t,onClick:$e(e.onClick,()=>a.onOpenChange(!1))})});QH.displayName=KH;function t2(e){return e?"open":"closed"}var ZH="DialogTitleWarning",[epe,XH]=Aie(ZH,{contentName:vu,titleName:e2,docsSlug:"dialog"}),tpe=({titleId:e})=>{const t=XH(ZH),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 663 664If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 665 666For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},rpe="DialogDescriptionWarning",npe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${XH(rpe).contentName}}.`;return p.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},r2=LH,JH=BH,n2=zH,Nv=WH,Sv=VH,kv=qH,Cv=GH,Tv=QH;const Ot=r2,_c=JH,spe=n2,ape=Tv,eq=p.forwardRef(({className:e,...t},r)=>s.jsx(Nv,{ref:r,className:Oe("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}));eq.displayName=Nv.displayName;const kt=p.forwardRef(({className:e,children:t,...r},n)=>{const[a]=p.useState(()=>`dialog-description-${Math.random().toString(36).substring(2,9)}`),i="aria-describedby"in r&&!!r["aria-describedby"];return s.jsxs(spe,{children:[s.jsx(eq,{}),s.jsxs(Sv,{ref:n,"aria-describedby":i?r["aria-describedby"]:a,className:Oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg max-h-[90vh] overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-4 sm: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%] rounded-lg",e),...r,children:[t,!i&&s.jsx("span",{id:a,className:"sr-only",children:"Dialog content"}),s.jsxs(Tv,{className:"absolute right-2 top-2 rounded-md opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground min-h-[44px] min-w-[44px] flex items-center justify-center",children:[s.jsx(Vn,{className:"h-5 w-5"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});kt.displayName=Sv.displayName;const Ct=({className:e,...t})=>s.jsx("div",{className:Oe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ct.displayName="DialogHeader";const Bt=({className:e,...t})=>s.jsx("div",{className:Oe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Bt.displayName="DialogFooter";const Tt=p.forwardRef(({className:e,...t},r)=>s.jsx(kv,{ref:r,className:Oe("text-lg font-semibold leading-none tracking-tight",e),...t}));Tt.displayName=kv.displayName;const $t=p.forwardRef(({className:e,...t},r)=>s.jsx(Cv,{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));$t.displayName=Cv.displayName;const ax=Mu("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"}}),D=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...a},i)=>{const o=n?$o:"button";return s.jsx(o,{className:Oe(ax({variant:t,size:r,className:e})),ref:i,...a})});D.displayName="Button";const ipe=()=>{const[e,t]=p.useState(!1),{isTutorialCompleted:r,completeTutorial:n}=hv(),{user:a}=gn(),[,i]=Nn();p.useEffect(()=>{const c=localStorage.getItem("hasSeenWelcome");if(a&&!c&&!r){const d=setTimeout(()=>{t(!0),localStorage.setItem("hasSeenWelcome","true")},1e3);return()=>clearTimeout(d)}},[r,a]);const o=()=>{t(!1),i("/help?tab=tutorials")},l=()=>{t(!1),n()};return s.jsx(Ot,{open:e,onOpenChange:t,children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Welcome to SmartScheduler!"}),s.jsx($t,{children:"Let us show you around and help you get started with our platform."})]}),s.jsxs("div",{className:"py-4",children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"SmartScheduler is designed to help teams coordinate and manage their calendars effectively. Our quick tutorial will walk
666you through the main features."}),s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsx("div",{className:"w-6 h-6 rounded-full bg-primary flex items-center justify-center text-white text-xs",children:"1"}),s.jsx("p",{className:"text-sm",children:"Calendar Integration"})]}),s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsx("div",{className:"w-6 h-6 rounded-full bg-primary flex items-center justify-center text-white text-xs",children:"2"}),s.jsx("p",{className:"text-sm",children:"Team Management"})]}),s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsx("div",{className:"w-6 h-6 rounded-full bg-primary flex items-center justify-center text-white text-xs",children:"3"}),s.jsx("p",{className:"text-sm",children:"Booking Links"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("div",{className:"w-6 h-6 rounded-full bg-primary flex items-center justify-center text-white text-xs",children:"4"}),s.jsx("p",{className:"text-sm",children:"Profile Settings"})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:l,children:"Skip for now"}),s.jsx(D,{onClick:o,children:"Go to Tutorials"})]})]})})},ope=({name:e,steps:t,onComplete:r})=>{const{markFeatureComplete:n,exitFeatureTour:a}=hv(),i=p.useCallback(o=>{const{status:l,type:c}=o;(l==="finished"||l==="skipped")&&(l==="finished"&&n(e),a(),r&&r())},[n,a,e,r]);return s.jsx(CH,{callback:i,continuous:!0,showProgress:!0,showSkipButton:!0,disableOverlayClose:!1,disableCloseOnEsc:!1,steps:t,styles:{options:{arrowColor:"var(--primary)",backgroundColor:"var(--background)",primaryColor:"var(--primary)",textColor:"var(--foreground)",zIndex:1e4},buttonNext:{backgroundColor:"var(--primary)",borderRadius:"4px",color:"var(--primary-foreground)"},buttonBack:{marginRight:10,color:"var(--muted-foreground)"},buttonSkip:{color:"var(--muted-foreground)"},spotlight:{backgroundColor:"rgba(0, 0, 0, 0.5)"}}})},lpe={dashboard:[{target:".dashboard-overview",content:"This is your dashboard where you can see an overview of your calendar events and activities.",placement:"center",disableBeacon:!0},{target:".dashboard-stats",content:"Here you can see statistics about your meetings and scheduled events.",placement:"bottom"},{target:".dashboard-actions",content:"Quick actions to help you manage your calendar efficiently.",placement:"right"}],calendar:[{target:".calendar-view",content:"This is your calendar view showing all your scheduled events.",placement:"center",disableBeacon:!0},{target:".calendar-controls",content:"These controls let you navigate between day, week, and month views.",placement:"bottom"},{target:".create-event-button",content:"Click here to create a new calendar event.",placement:"left"}],profile:[{target:".profile-header",content:"Your profile information is displayed here.",placement:"center",disableBeacon:!0},{target:".profile-avatar",content:"Click here to change your profile picture.",placement:"right"},{target:".profile-settings",content:"Manage your account settings and preferences here.",placement:"bottom"}],team:[{target:".team-header",content:"This is your team management section.",placement:"center",disableBeacon:!0},{target:".team-members",content:"Here you can see all members of your team.",placement:"bottom"},{target:".add-member-button",content:"Click here to invite new members to your team.",placement:"left"}],booking:[{target:".booking-links",content:"This is where you manage your booking links.",placement:"center",disableBeacon:!0},{target:".create-booking-link",content:"Create new booking links for others to schedule time with you.",placement:"bottom"},{target:".booking-settings",content:"Configure your availability and booking preferences here.",placement:"right"}],settings:[{target:".settings-panel",content:"This is the settings panel for the application.",placement:"center",disableBeacon:!0},{target:".notification-settings",content:"Configure your notification preferences here.",placement:"bottom"},{target:".calendar-integration",content:"Connect your external calendars for better synchronization.",placement:"right"}]},cpe=({activeTour:e})=>{const{exitFeatureTour:t,markFeatureComplete:r}=hv();if(!e)return null;const n=lpe[e]||[],a=()=>{r(e),t()};return s.jsx(ope,{name:e,steps:n,onComplete:a})},X=p.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Oe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
vendor: 15,574 bytes, line 666
666X.displayName="Card";const ue=p.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Oe("flex flex-col space-y-1.5 p-6",e),...t}));ue.displayName="CardHeader";const fe=p.forwardRef(({className:e,...t},r)=>s.jsx("h3",{ref:r,className:Oe("text-2xl font-semibold leading-none tracking-tight",e),...t}));fe.displayName="CardTitle";const ye=p.forwardRef(({className:e,...t},r)=>s.jsx("p",{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));ye.displayName="CardDescription";const te=p.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Oe("p-6 pt-0",e),...t}));te.displayName="CardContent";const ta=p.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Oe("flex items-center p-6 pt-0",e),...t}));ta.displayName="CardFooter";function dpe(){return s.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:s.jsx(X,{className:"w-full max-w-md mx-4",children:s.jsxs(te,{className:"pt-6",children:[s.jsxs("div",{className:"flex mb-4 gap-2",children:[s.jsx(sn,{className:"h-8 w-8 text-red-500"}),s.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),s.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}const upe=Mu("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 pe({className:e,variant:t,...r}){return s.jsx("div",{className:Oe(upe({variant:t}),e),...r})}var s2="Avatar",[fpe,qQe]=Is(s2),[hpe,tq]=fpe(s2),rq=p.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[a,i]=p.useState("idle");return s.jsx(hpe,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:s.jsx(Ke.span,{...n,ref:t})})});rq.displayName=s2;var nq="AvatarImage",sq=p.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:a=()=>{},...i}=e,o=tq(nq,r),l=mpe(n,i.referrerPolicy),c=nn(d=>{a(d),o.onImageLoadingStatusChange(d)});return Bn(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?s.jsx(Ke.img,{...i,ref:t,src:n}):null});sq.displayName=nq;var aq="AvatarFallback",iq=p.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...a}=e,i=tq(aq,r),[o,l]=p.useState(n===void 0);return p.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>l(!0),n);return()=>window.clearTimeout(c)}},[n]),o&&i.imageLoadingStatus!=="loaded"?s.jsx(Ke.span,{...a,ref:t}):null});iq.displayName=aq;function mpe(e,t){const[r,n]=p.useState("idle");return Bn(()=>{if(!e){n("error");return}let a=!0;const i=new window.Image,o=l=>()=>{a&&n(l)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,t&&(i.referrerPolicy=t),()=>{a=!1}},[e,t]),r}var oq=rq,lq=sq,cq=iq;const yu=p.forwardRef(({className:e,...t},r)=>s.jsx(oq,{ref:r,className:Oe("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));yu.displayName=oq.displayName;const ix=p.forwardRef(({className:e,...t},r)=>s.jsx(lq,{ref:r,className:Oe("aspect-square h-full w-full",e),...t}));ix.displayName=lq.displayName;const bu=p.forwardRef(({className:e,...t},r)=>s.jsx(cq,{ref:r,className:Oe("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));bu.displayName=cq.displayName;var ppe=p.createContext(void 0);function cd(e){const t=p.useContext(ppe);return e||t||"ltr"}const gpe=["top","right","bottom","left"],ed=Math.min,Ea=Math.max,V0=Math.round,Ly=Math.floor,Do=e=>({x:e,y:e}),xpe={left:"right",right:"left",bottom:"top",top:"bottom"},vpe={start:"end",end:"start"};function yT(e,t,r){return Ea(e,ed(t,r))}function Il(e,t){return typeof e=="function"?e(t):e}function Rl(e){return e.split("-")[0]}function km(e){return e.split("-")[1]}function a2(e){return e==="x"?"y":"x"}function i2(e){return e==="y"?"height":"width"}function td(e){return["top","bottom"].includes(Rl(e))?"y":"x"}function o2(e){return a2(td(e))}function ype(e,t,r){r===void 0&&(r=!1);const n=km(e),a=o2(e),i=i2(a);let o=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=H0(o)),[o,H0(o)]}function bpe(e){const t=H0(e);return[bT(e),t,bT(t)]}function bT(e){return e.replace(/start|end/g,t=>vpe[t])}function jpe(e,t,r){const n=["left","right"],a=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return r?t?a:n:t?n:a;case"left":case"right":return t?i:o;default:return[]}}function wpe(e,t,r,n){const a=km(e);let i=jpe(Rl(e),r==="start",n);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map(bT)))),i}function H0(e){return e.replace(/left|right|bottom|top/g,t=>xpe[t])}function Npe(e){return{top:0,right:0,bottom:0,left:0,...e}}function dq(e){return typeof e!="number"?Npe(e):{top:e,right:e,bottom:e,left:e}}function q0(e){const{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function p4(e,t,r){let{reference:n,floating:a}=e;const i=td(t),o=o2(t),l=i2(o),c=Rl(t),d=i==="y",u=n.x+n.width/2-a.width/2,f=n.y+n.height/2-a.height/2,h=n[l]/2-a[l]/2;let m;switch(c){case"top":m={x:u,y:n.y-a.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:f};break;case"left":m={x:n.x-a.width,y:f};break;default:m={x:n.x,y:n.y}}switch(km(t)){case"start":m[o]-=h*(r&&d?-1:1);break;case"end":m[o]+=h*(r&&d?-1:1);break}return m}const Spe=async(e,t,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:o}=r,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:f}=p4(d,n,c),h=n,m={},g=0;for(let x=0;x<l.length;x++){const{name:v,fn:b}=l[x],{x:y,y:j,data:w,reset:N}=await b({x:u,y:f,initialPlacement:n,placement:h,strategy:a,middlewareData:m,rects:d,platform:o,elements:{reference:e,floating:t}});u=y??u,f=j??f,m={...m,[v]:{...m[v],...w}},N&&g<=50&&(g++,typeof N=="object"&&(N.placement&&(h=N.placement),N.rects&&(d=N.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:u,y:f}=p4(d,h,c)),x=-1)}return{x:u,y:f,placement:h,strategy:a,middlewareData:m}};async function ox(e,t){var r;t===void 0&&(t={});const{x:n,y:a,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Il(t,e),g=dq(m),v=l[h?f==="floating"?"reference":"floating":f],b=q0(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),y=f==="floating"?{x:n,y:a,width:o.floating.width,height:o.floating.height}:o.reference,j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),w=await(i.isElement==null?void 0:i.isElement(j))?await(i.getScale==null?void 0:i.getScale(j))||{x:1,y:1}:{x:1,y:1},N=q0(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:j,strategy:c}):y);return{top:(b.top-N.top+g.top)/w.y,bottom:(N.bottom-b.bottom+g.bottom)/w.y,left:(b.left-N.left+g.left)/w.x,right:(N.right-b.right+g.right)/w.x}}const kpe=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:a,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:d,padding:u=0}=Il(e,t)||{};if(d==null)return{};const f=dq(u),h={x:r,y:n},m=o2(a),g=i2(m),x=await o.getDimensions(d),v=m==="y",b=v?"top":"left",y=v?"bottom":"right",j=v?"clientHeight":"clientWidth",w=i.reference[g]+i.reference[m]-h[m]-i.floating[g],N=h[m]-i.reference[m],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let k=S?S[j]:0;(!k||!await(o.isElement==null?void 0:o.isElement(S)))&&(k=l.floating[j]||i.floating[g]);const T=w/2-N/2,C=k/2-x[g]/2-1,E=ed(f[b],C),P=ed(f[y],C),_=E,I=k-x[g]-P,F=k/2-x[g]/2+T,H=yT(_,F,I),W=!c.arrow&&km(a)!=null&&F!==H&&i.reference[g]/2-(F<_?E:P)-x[g]/2<0,z=W?F<_?F-_:F-I:0;return{[m]:h[m]+z,data:{[m]:H,centerOffset:F-H-z,...W&&{alignmentOffset:z}},reset:W}}}),Cpe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:a,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:x=!0,...v}=Il(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const b=Rl(a),y=td(l),j=Rl(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),N=h||(j||!x?[H0(l)]:bpe(l)),S=g!=="none";!h&&S&&N.push(...wpe(l,x,g,w));const k=[l,...N],T=await ox(t,v),C=[];let E=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&C.push(T[b]),f){const F=ype(a,o,w);C.push(T[F[0]],T[F[1]])}if(E=[...E,{placement:a,overflows:C}],!C.every(F=>F<=0)){var P,_;const F=(((P=i.flip)==null?void 0:P.index)||0)+1,H=k[F];if(H)return{data:{index:F,overflows:E},reset:{placement:H}};let W=(_=E.filter(z=>z.overflows[0]<=0).sort((z,R)=>z.overflows[1]-R.overflows[1])[0])==null?void 0:_.placement;if(!W)switch(m){case"bestFit":{var I;const z=(I=E.filter(R=>{if(S){const q=td(R.placement);return q===y||q==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(q=>q>0).reduce((q,V)=>q+V,0)]).sort((R,q)=>R[1]-q[1])[0])==null?void 0:I[0];z&&(W=z);break}case"initialPlacement":W=l;break}if(a!==W)return{reset:{placement:W}}}return{}}}};function g4(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function x4(e){return gpe.some(t=>e[t]>=0)}const Tpe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...a}=Il(e,t);switch(n){case"referenceHidden":{const i=await ox(t,{...a,elementContext:"reference"}),o=g4(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:x4(o)}}}case"escaped":{const i=await ox(t,{...a,altBoundary:!0}),o=g4(i,r.floating);return{data:{escapedOffsets:o,escaped:x4(o)}}}default:return{}}}}};async function _pe(e,t){const{placement:r,platform:n,elements:a}=e,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),o=Rl(r),l=km(r),c=td(r)==="y",d=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,f=Il(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(m=l==="end"?g*-1:g),c?{x:m*u,y:h*d}:{x:h*d,y:m*u}}const Ppe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:a,y:i,placement:o,middlewareData:l}=t,c=await _pe(t,e);return o===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:o}}}}},Epe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:a}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:v=>{let{x:b,y}=v;return{x:b,y}}},...c}=Il(e,t),d={x:r,y:n},u=await ox(t,c),f=td(Rl(a)),h=a2(f);let m=d[h],g=d[f];if(i){const v=h==="y"?"top":"left",b=h==="y"?"bottom":"right",y=m+u[v],j=m-u[b];m=yT(y,m,j)}if(o){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",y=g+u[v],j=g-u[b];g=yT(y,g,j)}const x=l.fn({...t,[h]:m,[f]:g});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[h]:i,[f]:o}}}}}},Ope=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:a,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=Il(e,t),u={x:r,y:n},f=td(a),h=a2(f);let m=u[h],g=u[f];const x=Il(l,t),v=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(c){const j=h==="y"?"height":"width",w=i.reference[h]-i.floating[j]+v.mainAxis,N=i.reference[h]+i.reference[j]-v.mainAxis;m<w?m=w:m>N&&(m=N)}if(d){var b,y;const j=h==="y"?"width":"height",w=["top","left"].includes(Rl(a)),N=i.reference[f]-i.floating[j]+(w&&((b=o.offset)==null?void 0:b[f])||0)+(w?0:v.crossAxis),S=i.reference[f]+i.reference[j]+(w?0:((y=o.offset)==null?void 0:y[f])||0)-(w?v.crossAxis:0);g<N?g=N:g>S&&(g=S)}return{[h]:m,[f]:g}}}},Ape=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:a,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...d}=Il(e,t),u=await ox(t,d),f=Rl(a),h=km(a),m=td(a)==="y",{width:g,height:x}=i.floating;let v,b;f==="top"||f==="bottom"?(v=f,b=h===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(b=f,v=h==="end"?"top":"bottom");const y=x-u.top-u.bottom,j=g-u.left-u.right,w=ed(x-u[v],y),N=ed(g-u[b],j),S=!t.middlewareData.shift;let k=w,T=N;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(T=j),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=y),S&&!h){const E=Ea(u.left,0),P=Ea(u.right,0),_=Ea(u.top,0),I=Ea(u.bottom,0);m?T=g-2*(E!==0||P!==0?E+P:Ea(u.left,u.right)):k=x-2*(_!==0||I!==0?_+I:Ea(u.top,u.bottom))}await c({...t,availableWidth:T,availableHeight:k});const C=await o.getDimensions(l.floating);return g!==C.width||x!==C.height?{reset:{rects:!0}}:{}}}};function nN(){return typeof window<"u"}function Cm(e){return uq(e)?(e.nodeName||"").toLowerCase():"#document"}function Fa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wo(e){var t;return(t=(uq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uq(e){return nN()?e instanceof Node||e instanceof Fa(e).Node:!1}function Gs(e){return nN()?e instanceof Element||e instanceof Fa(e).Element:!1}function Bo(e){return nN()?e instanceof HTMLElement||e instanceof Fa(e).HTMLElement:!1}function v4(e){return!nN()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fa(e).ShadowRoot}function _v(e){const{overflow:t,overflowX:r,overflowY:n,display:a}=fi(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(a)}function Dpe(e){return["table","td","th"].includes(Cm(e))}function sN(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function l2(e){const t=c2(),r=Gs(e)?fi(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Mpe(e){let t=rd(e);for(;Bo(t)&&!Ah(t);){if(l2(t))return t;if(sN(t))return null;t=rd(t)}return null}function c2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ah(e){return["html","body","#document"].includes(Cm(e))}function fi(e){return Fa(e).getComputedStyle(e)}function aN(e){return Gs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rd(e){if(Cm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||v4(e)&&e.host||Wo(e);return v4(t)?t.host:t}function fq(e){const t=rd(e);return Ah(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bo(t)&&_v(t)?t:fq(t)}function lx(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=fq(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),o=Fa(a);if(i){const l=jT(o);
vendor: 7,304 bytes, line 666
666return t.concat(o,o.visualViewport||[],_v(a)?a:[],l&&r?lx(l):[])}return t.concat(a,lx(a,[],r))}function jT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function hq(e){const t=fi(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const a=Bo(e),i=a?e.offsetWidth:r,o=a?e.offsetHeight:n,l=V0(r)!==i||V0(n)!==o;return l&&(r=i,n=o),{width:r,height:n,$:l}}function d2(e){return Gs(e)?e:e.contextElement}function Vf(e){const t=d2(e);if(!Bo(t))return Do(1);const r=t.getBoundingClientRect(),{width:n,height:a,$:i}=hq(t);let o=(i?V0(r.width):r.width)/n,l=(i?V0(r.height):r.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const Ipe=Do(0);function mq(e){const t=Fa(e);return!c2()||!t.visualViewport?Ipe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Rpe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Fa(e)?!1:t}function ju(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),i=d2(e);let o=Do(1);t&&(n?Gs(n)&&(o=Vf(n)):o=Vf(e));const l=Rpe(i,r,n)?mq(i):Do(0);let c=(a.left+l.x)/o.x,d=(a.top+l.y)/o.y,u=a.width/o.x,f=a.height/o.y;if(i){const h=Fa(i),m=n&&Gs(n)?Fa(n):n;let g=h,x=jT(g);for(;x&&n&&m!==g;){const v=Vf(x),b=x.getBoundingClientRect(),y=fi(x),j=b.left+(x.clientLeft+parseFloat(y.paddingLeft))*v.x,w=b.top+(x.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,d*=v.y,u*=v.x,f*=v.y,c+=j,d+=w,g=Fa(x),x=jT(g)}}return q0({width:u,height:f,x:c,y:d})}function u2(e,t){const r=aN(e).scrollLeft;return t?t.left+r:ju(Wo(e)).left+r}function pq(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-(r?0:u2(e,n)),i=n.top+t.scrollTop;return{x:a,y:i}}function $pe(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e;const i=a==="fixed",o=Wo(n),l=t?sN(t.floating):!1;if(n===o||l&&i)return r;let c={scrollLeft:0,scrollTop:0},d=Do(1);const u=Do(0),f=Bo(n);if((f||!f&&!i)&&((Cm(n)!=="body"||_v(o))&&(c=aN(n)),Bo(n))){const m=ju(n);d=Vf(n),u.x=m.x+n.clientLeft,u.y=m.y+n.clientTop}const h=o&&!f&&!i?pq(o,c,!0):Do(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+u.x+h.x,y:r.y*d.y-c.scrollTop*d.y+u.y+h.y}}function Lpe(e){return Array.from(e.getClientRects())}function Fpe(e){const t=Wo(e),r=aN(e),n=e.ownerDocument.body,a=Ea(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ea(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+u2(e);const l=-r.scrollTop;return fi(n).direction==="rtl"&&(o+=Ea(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:o,y:l}}function Bpe(e,t){const r=Fa(e),n=Wo(e),a=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,l=0,c=0;if(a){i=a.width,o=a.height;const d=c2();(!d||d&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:i,height:o,x:l,y:c}}function Upe(e,t){const r=ju(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=Bo(e)?Vf(e):Do(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=a*i.x,d=n*i.y;return{width:o,height:l,x:c,y:d}}function y4(e,t,r){let n;if(t==="viewport")n=Bpe(e,r);else if(t==="document")n=Fpe(Wo(e));else if(Gs(t))n=Upe(t,r);else{const a=mq(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return q0(n)}function gq(e,t){const r=rd(e);return r===t||!Gs(r)||Ah(r)?!1:fi(r).position==="fixed"||gq(r,t)}function zpe(e,t){const r=t.get(e);if(r)return r;let n=lx(e,[],!1).filter(l=>Gs(l)&&Cm(l)!=="body"),a=null;const i=fi(e).position==="fixed";let o=i?rd(e):e;for(;Gs(o)&&!Ah(o);){const l=fi(o),c=l2(o);!c&&l.position==="fixed"&&(a=null),(i?!c&&!a:!c&&l.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||_v(o)&&!c&&gq(e,o))?n=n.filter(u=>u!==o):a=l,o=rd(o)}return t.set(e,n),n}function Wpe(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e;const o=[...r==="clippingAncestors"?sN(t)?[]:zpe(t,this._c):[].concat(r),n],l=o[0],c=o.reduce((d,u)=>{const f=y4(t,u,a);return d.top=Ea(f.top,d.top),d.right=ed(f.right,d.right),d.bottom=ed(f.bottom,d.bottom),d.left=Ea(f.left,d.left),d},y4(t,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Vpe(e){const{width:t,height:r}=hq(e);return{width:t,height:r}}function Hpe(e,t,r){const n=Bo(t),a=Wo(t),i=r==="fixed",o=ju(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=Do(0);if(n||!n&&!i)if((Cm(t)!=="body"||_v(a))&&(l=aN(t)),n){const h=ju(t,!0,i,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else a&&(c.x=u2(a));const d=a&&!n&&!i?pq(a,l):Do(0),u=o.left+l.scrollLeft-c.x-d.x,f=o.top+l.scrollTop-c.y-d.y;return{x:u,y:f,width:o.width,height:o.height}}function IS(e){return fi(e).position==="static"}function b4(e,t){if(!Bo(e)||fi(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Wo(e)===r&&(r=r.ownerDocument.body),r}function xq(e,t){const r=Fa(e);if(sN(e))return r;if(!Bo(e)){let a=rd(e);for(;a&&!Ah(a);){if(Gs(a)&&!IS(a))return a;a=rd(a)}return r}let n=b4(e,t);for(;n&&Dpe(n)&&IS(n);)n=b4(n,t);return n&&Ah(n)&&IS(n)&&!l2(n)?r:n||Mpe(e)||r}const qpe=async function(e){const t=this.getOffsetParent||xq,r=this.getDimensions,n=await r(e.floating);return{reference:Hpe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ype(e){return fi(e).direction==="rtl"}const Gpe={convertOffsetParentRelativeRectToViewportRelativeRect:$pe,getDocumentElement:Wo,getClippingRect:Wpe,getOffsetParent:xq,getElementRects:qpe,getClientRects:Lpe,getDimensions:Vpe,getScale:Vf,isElement:Gs,isRTL:Ype};function Kpe(e,t){let r=null,n;const a=Wo(e);function i(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const{left:d,top:u,width:f,height:h}=e.getBoundingClientRect();if(l||t(),!f||!h)return;const m=Ly(u),g=Ly(a.clientWidth-(d+f)),x=Ly(a.clientHeight-(u+h)),v=Ly(d),y={rootMargin:-m+"px "+-g+"px "+-x+"px "+-v+"px",threshold:Ea(0,ed(1,c))||1};let j=!0;function w(N){const S=N[0].intersectionRatio;if(S!==c){if(!j)return o();S?o(!1,S):n=setTimeout(()=>{o(!1,1e-7)},1e3)}j=!1}try{r=new IntersectionObserver(w,{...y,root:a.ownerDocument})}catch{r=new IntersectionObserver(w,y)}r.observe(e)}return o(!0),i}function vq(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,d=d2(e),u=a||i?[...d?lx(d):[],...lx(t)]:[];u.forEach(b=>{a&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const f=d&&l?Kpe(d,r):null;let h=-1,m=null;o&&(m=new ResizeObserver(b=>{let[y]=b;y&&y.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var j;(j=m)==null||j.observe(t)})),r()}),d&&!c&&m.observe(d),m.observe(t));let g,x=c?ju(e):null;c&&v();function v(){const b=ju(e);x&&(b.x!==x.x||b.y!==x.y||b.width!==x.width||b.height!==x.height)&&r(),x=b,g=requestAnimationFrame(v)}return r(),()=>{var b;u.forEach(y=>{a&&y.removeEventListener("scroll",r),i&&y.removeEventListener("resize",r)}),f==null||f(),(b=m)==null||b.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const Qpe=Ppe,Zpe=Epe,Xpe=Cpe,Jpe=Ape,ege=Tpe,j4=kpe,tge=Ope,rge=(e,t,r)=>{const n=new Map,a={platform:Gpe,...r},i={...a.platform,_c:n};return Spe(e,t,{...a,platform:i})};var Rb=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Y0(e,t){if(e===t)return!0;
vendor: 28,178 bytes, line 666
666if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Y0(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){const i=a[n];if(!(i==="_owner"&&e.$$typeof)&&!Y0(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function yq(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function w4(e,t){const r=yq(e);return Math.round(t*r)/r}function RS(e){const t=p.useRef(e);return Rb(()=>{t.current=e}),t}function bq(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,f]=p.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=p.useState(n);Y0(h,n)||m(n);const[g,x]=p.useState(null),[v,b]=p.useState(null),y=p.useCallback(R=>{R!==S.current&&(S.current=R,x(R))},[]),j=p.useCallback(R=>{R!==k.current&&(k.current=R,b(R))},[]),w=i||g,N=o||v,S=p.useRef(null),k=p.useRef(null),T=p.useRef(u),C=c!=null,E=RS(c),P=RS(a),_=RS(d),I=p.useCallback(()=>{if(!S.current||!k.current)return;const R={placement:t,strategy:r,middleware:h};P.current&&(R.platform=P.current),rge(S.current,k.current,R).then(q=>{const V={...q,isPositioned:_.current!==!1};F.current&&!Y0(T.current,V)&&(T.current=V,Li.flushSync(()=>{f(V)}))})},[h,t,r,P,_]);Rb(()=>{d===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[d]);const F=p.useRef(!1);Rb(()=>(F.current=!0,()=>{F.current=!1}),[]),Rb(()=>{if(w&&(S.current=w),N&&(k.current=N),w&&N){if(E.current)return E.current(w,N,I);I()}},[w,N,I,E,C]);const H=p.useMemo(()=>({reference:S,floating:k,setReference:y,setFloating:j}),[y,j]),W=p.useMemo(()=>({reference:w,floating:N}),[w,N]),z=p.useMemo(()=>{const R={position:r,left:0,top:0};if(!W.floating)return R;const q=w4(W.floating,u.x),V=w4(W.floating,u.y);return l?{...R,transform:"translate("+q+"px, "+V+"px)",...yq(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:q,top:V}},[r,l,W.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:I,refs:H,elements:W,floatingStyles:z}),[u,I,H,W,z])}const nge=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?j4({element:n.current,padding:a}).fn(r):{}:n?j4({element:n,padding:a}).fn(r):{}}}},jq=(e,t)=>({...Qpe(e),options:[e,t]}),sge=(e,t)=>({...Zpe(e),options:[e,t]}),age=(e,t)=>({...tge(e),options:[e,t]}),wq=(e,t)=>({...Xpe(e),options:[e,t]}),ige=(e,t)=>({...Jpe(e),options:[e,t]}),oge=(e,t)=>({...ege(e),options:[e,t]}),Nq=(e,t)=>({...nge(e),options:[e,t]});var lge="Arrow",Sq=p.forwardRef((e,t)=>{const{children:r,width:n=10,height:a=5,...i}=e;return s.jsx(Ke.svg,{...i,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sq.displayName=lge;var cge=Sq;function dge(e,t=[]){let r=[];function n(i,o){const l=p.createContext(o),c=r.length;r=[...r,o];function d(f){const{scope:h,children:m,...g}=f,x=(h==null?void 0:h[e][c])||l,v=p.useMemo(()=>g,Object.values(g));return s.jsx(x.Provider,{value:v,children:m})}function u(f,h){const m=(h==null?void 0:h[e][c])||l,g=p.useContext(m);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return d.displayName=i+"Provider",[d,u]}const a=()=>{const i=r.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 a.scopeName=e,[n,uge(a,...t)]}function uge(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((l,{useScope:c,scopeName:d})=>{const f=c(i)[`__scope${d}`];return{...l,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}function iN(e){const[t,r]=p.useState(void 0);return Bn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,d=Array.isArray(c)?c[0]:c;o=d.inlineSize,l=d.blockSize}else o=e.offsetWidth,l=e.offsetHeight;r({width:o,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var f2="Popper",[kq,Tm]=dge(f2),[fge,Cq]=kq(f2),Tq=e=>{const{__scopePopper:t,children:r}=e,[n,a]=p.useState(null);return s.jsx(fge,{scope:t,anchor:n,onAnchorChange:a,children:r})};Tq.displayName=f2;var _q="PopperAnchor",Pq=p.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...a}=e,i=Cq(_q,r),o=p.useRef(null),l=Ft(t,o);return p.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:s.jsx(Ke.div,{...a,ref:l})});Pq.displayName=_q;var h2="PopperContent",[hge,mge]=kq(h2),Eq=p.forwardRef((e,t)=>{var K,je,ae,de,Ce,B;const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:g,...x}=e,v=Cq(h2,r),[b,y]=p.useState(null),j=Ft(t,me=>y(me)),[w,N]=p.useState(null),S=iN(w),k=(S==null?void 0:S.width)??0,T=(S==null?void 0:S.height)??0,C=n+(i!=="center"?"-"+i:""),E=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},P=Array.isArray(d)?d:[d],_=P.length>0,I={padding:E,boundary:P.filter(gge),altBoundary:_},{refs:F,floatingStyles:H,placement:W,isPositioned:z,middlewareData:R}=bq({strategy:"fixed",placement:C,whileElementsMounted:(...me)=>vq(...me,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[jq({mainAxis:a+T,alignmentAxis:o}),c&&sge({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?age():void 0,...I}),c&&wq({...I}),ige({...I,apply:({elements:me,rects:ne,availableWidth:Be,availableHeight:lt})=>{const{width:ct,height:Y}=ne.reference,J=me.floating.style;J.setProperty("--radix-popper-available-width",`${Be}px`),J.setProperty("--radix-popper-available-height",`${lt}px`),J.setProperty("--radix-popper-anchor-width",`${ct}px`),J.setProperty("--radix-popper-anchor-height",`${Y}px`)}}),w&&Nq({element:w,padding:l}),xge({arrowWidth:k,arrowHeight:T}),h&&oge({strategy:"referenceHidden",...I})]}),[q,V]=Dq(W),se=nn(g);Bn(()=>{z&&(se==null||se())},[z,se]);const oe=(K=R.arrow)==null?void 0:K.x,_e=(je=R.arrow)==null?void 0:je.y,U=((ae=R.arrow)==null?void 0:ae.centerOffset)!==0,[M,G]=p.useState();return Bn(()=>{b&&G(window.getComputedStyle(b).zIndex)},[b]),s.jsx("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:z?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:M,"--radix-popper-transform-origin":[(de=R.transformOrigin)==null?void 0:de.x,(Ce=R.transformOrigin)==null?void 0:Ce.y].join(" "),...((B=R.hide)==null?void 0:B.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(hge,{scope:r,placedSide:q,onArrowChange:N,arrowX:oe,arrowY:_e,shouldHideArrow:U,children:s.jsx(Ke.div,{"data-side":q,"data-align":V,...x,ref:j,style:{...x.style,animation:z?void 0:"none"}})})})});Eq.displayName=h2;var Oq="PopperArrow",pge={top:"bottom",right:"left",bottom:"top",left:"right"},Aq=p.forwardRef(function(t,r){const{__scopePopper:n,...a}=t,i=mge(Oq,n),o=pge[i.placedSide];return s.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:s.jsx(cge,{...a,ref:r,style:{...a.style,display:"block"}})})});Aq.displayName=Oq;function gge(e){return e!==null}var xge=e=>({name:"transformOrigin",options:e,fn(t){var v,b,y;const{placement:r,rects:n,middlewareData:a}=t,o=((v=a.arrow)==null?void 0:v.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[d,u]=Dq(r),f={start:"0%",center:"50%",end:"100%"}[u],h=(((b=a.arrow)==null?void 0:b.x)??0)+l/2,m=(((y=a.arrow)==null?void 0:y.y)??0)+c/2;let g="",x="";return d==="bottom"?(g=o?f:`${h}px`,x=`${-c}px`):d==="top"?(g=o?f:`${h}px`,x=`${n.floating.height+c}px`):d==="right"?(g=`${-c}px`,x=o?f:`${m}px`):d==="left"&&(g=`${n.floating.width+c}px`,x=o?f:`${m}px`),{data:{x:g,y:x}}}});function Dq(e){const[t,r="center"]=e.split("-");return[t,r]}var m2=Tq,oN=Pq,p2=Eq,g2=Aq;function vge(e,t=[]){let r=[];function n(i,o){const l=p.createContext(o),c=r.length;r=[...r,o];function d(f){const{scope:h,children:m,...g}=f,x=(h==null?void 0:h[e][c])||l,v=p.useMemo(()=>g,Object.values(g));return s.jsx(x.Provider,{value:v,children:m})}function u(f,h){const m=(h==null?void 0:h[e][c])||l,g=p.useContext(m);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return d.displayName=i+"Provider",[d,u]}const a=()=>{const i=r.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 a.scopeName=e,[n,yge(a,...t)]}function yge(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((l,{useScope:c,scopeName:d})=>{const f=c(i)[`__scope${d}`];return{...l,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var $S="rovingFocusGroup.onEntryFocus",bge={bubbles:!1,cancelable:!0},lN="RovingFocusGroup",[wT,Mq,jge]=dv(lN),[wge,dd]=vge(lN,[jge]),[Nge,Sge]=wge(lN),Iq=p.forwardRef((e,t)=>s.jsx(wT.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(wT.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(kge,{...e,ref:t})})}));Iq.displayName=lN;var kge=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...f}=e,h=p.useRef(null),m=Ft(t,h),g=cd(i),[x=null,v]=xs({prop:o,defaultProp:l,onChange:c}),[b,y]=p.useState(!1),j=nn(d),w=Mq(r),N=p.useRef(!1),[S,k]=p.useState(0);return p.useEffect(()=>{const T=h.current;if(T)return T.addEventListener($S,j),()=>T.removeEventListener($S,j)},[j]),s.jsx(Nge,{scope:r,orientation:n,dir:g,loop:a,currentTabStopId:x,onItemFocus:p.useCallback(T=>v(T),[v]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>k(T=>T+1),[]),onFocusableItemRemove:p.useCallback(()=>k(T=>T-1),[]),children:s.jsx(Ke.div,{tabIndex:b||S===0?-1:0,"data-orientation":n,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:$e(e.onMouseDown,()=>{N.current=!0}),onFocus:$e(e.onFocus,T=>{const C=!N.current;if(T.target===T.currentTarget&&C&&!b){const E=new CustomEvent($S,bge);if(T.currentTarget.dispatchEvent(E),!E.defaultPrevented){const P=w().filter(W=>W.focusable),_=P.find(W=>W.active),I=P.find(W=>W.id===x),H=[_,I,...P].filter(Boolean).map(W=>W.ref.current);Lq(H,u)}}N.current=!1}),onBlur:$e(e.onBlur,()=>y(!1))})})}),Rq="RovingFocusGroupItem",$q=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,...o}=e,l=La(),c=i||l,d=Sge(Rq,r),u=d.currentTabStopId===c,f=Mq(r),{onFocusableItemAdd:h,onFocusableItemRemove:m}=d;return p.useEffect(()=>{if(n)return h(),()=>m()},[n,h,m]),s.jsx(wT.ItemSlot,{scope:r,id:c,focusable:n,active:a,children:s.jsx(Ke.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...o,ref:t,onMouseDown:$e(e.onMouseDown,g=>{n?d.onItemFocus(c):g.preventDefault()}),onFocus:$e(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:$e(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const x=_ge(g,d.orientation,d.dir);if(x!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=f().filter(y=>y.focusable).map(y=>y.ref.current);if(x==="last")b.reverse();else if(x==="prev"||x==="next"){x==="prev"&&b.reverse();const y=b.indexOf(g.currentTarget);b=d.loop?Pge(b,y+1):b.slice(y+1)}setTimeout(()=>Lq(b))}})})})});$q.displayName=Rq;var Cge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Tge(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _ge(e,t,r){const n=Tge(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Cge[n]}function Lq(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Pge(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var cN=Iq,dN=$q,NT=["Enter"," "],Ege=["ArrowDown","PageUp","Home"],Fq=["ArrowUp","PageDown","End"],Oge=[...Ege,...Fq],Age={ltr:[...NT,"ArrowRight"],rtl:[...NT,"ArrowLeft"]},Dge={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pv="Menu",[cx,Mge,Ige]=dv(Pv),[Ru,Bq]=Is(Pv,[Ige,Tm,dd]),uN=Tm(),Uq=dd(),[Rge,$u]=Ru(Pv),[$ge,Ev]=Ru(Pv),zq=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:i,modal:o=!0}=e,l=uN(t),[c,d]=p.useState(null),u=p.useRef(!1),f=nn(i),h=cd(a);return p.useEffect(()=>{const m=()=>{u.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>u.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),s.jsx(m2,{...l,children:s.jsx(Rge,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:d,children:s.jsx($ge,{scope:t,onClose:p.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:o,children:n})})})};zq.displayName=Pv;var Lge="MenuAnchor",x2=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=uN(r);return s.jsx(oN,{...a,...n,ref:t})});x2.displayName=Lge;var v2="MenuPortal",[Fge,Wq]=Ru(v2,{forceMount:void 0}),Vq=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:a}=e,i=$u(v2,t);return s.jsx(Fge,{scope:t,forceMount:r,children:s.jsx(Jn,{present:r||i.open,children:s.jsx(vm,{asChild:!0,container:a,children:n})})})};Vq.displayName=v2;var ci="MenuContent",[Bge,y2]=Ru(ci),Hq=p.forwardRef((e,t)=>{const r=Wq(ci,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=$u(ci,e.__scopeMenu),o=Ev(ci,e.__scopeMenu);return s.jsx(cx.Provider,{scope:e.__scopeMenu,children:s.jsx(Jn,{present:n||i.open,children:s.jsx(cx.Slot,{scope:e.__scopeMenu,children:o.modal?s.jsx(Uge,{...a,ref:t}):s.jsx(zge,{...a,ref:t})})})})}),Uge=p.forwardRef((e,t)=>{const r=$u(ci,e.__scopeMenu),n=p.useRef(null),a=Ft(t,n);return p.useEffect(()=>{const i=n.current;if(i)return rN(i)},[]),s.jsx(b2,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:$e(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),zge=p.forwardRef((e,t)=>{const r=$u(ci,e.__scopeMenu);return s.jsx(b2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),b2=p.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:g,...x}=e,v=$u(ci,r),b=Ev(ci,r),y=uN(r),j=Uq(r),w=Mge(r),[N,S]=p.useState(null),k=p.useRef(null),T=Ft(t,k,v.onContentChange),C=p.useRef(0),E=p.useRef(""),P=p.useRef(0),_=p.useRef(null),I=p.useRef("right"),F=p.useRef(0),H=g?wv:p.Fragment,W=g?{as:$o,allowPinchZoom:!0}:void 0,z=q=>{var K,je;const V=E.current+q,se=w().filter(ae=>!ae.disabled),oe=document.activeElement,_e=(K=se.find(ae=>ae.ref.current===oe))==null?void 0:K.textValue,U=se.map(ae=>ae.textValue),M=exe(U,V,_e),G=(je=se.find(ae=>ae.textValue===M))==null?void 0:je.ref.current;(function ae(de){E.current=de,window.clearTimeout(C.current),de!==""&&(C.current=window.setTimeout(()=>ae(""),1e3))})(V),G&&setTimeout(()=>G.focus())};p.useEffect(()=>()=>window.clearTimeout(C.current),[]),eN();const R=p.useCallback(q=>{var se,oe;return I.current===((se=_.current)==null?void 0:se.side)&&rxe(q,(oe=_.current)==null?void 0:oe.area)},[]);return s.jsx(Bge,{scope:r,searchRef:E,onItemEnter:p.useCallback(q=>{R(q)&&q.preventDefault()},[R]),onItemLeave:p.useCallback(q=>{var V;R(q)||((V=k.current)==null||V.focus(),S(null))},[R]),onTriggerLeave:p.useCallback(q=>{R(q)&&q.preventDefault()},[R]),pointerGraceTimerRef:P,onPointerGraceIntentChange:p.useCallback(q=>{_.current=q},[]),children:s.jsx(H,{...W,children:s.jsx(jv,{asChild:!0,trapped:a,onMountAutoFocus:$e(i,q=>{var V;q.preventDefault(),(V=k.current)==null||V.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:s.jsx(xm,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:s.jsx(cN,{asChild:!0,...j,dir:b.dir,orientation:"vertical",loop:n,currentTabStopId:N,onCurrentTabStopIdChange:S,onEntryFocus:$e(c,q=>{b.isUsingKeyboardRef.current||q.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(p2,{role:"menu","aria-orientation":"vertical","data-state":oY(v.open),"data-radix-menu-content":"",dir:b.dir,...y,...x,ref:T,style:{outline:"none",...x.style},onKeyDown:$e(x.onKeyDown,q=>{const se=q.target.closest("[data-radix-menu-content]")===q.currentTarget,oe=q.ctrlKey||q.altKey||q.metaKey,_e=q.key.length===1;se&&(q.key==="Tab"&&q.preventDefault(),!oe&&_e&&z(q.key));const U=k.current;if(q.target!==U||!Oge.includes(q.key))return;q.preventDefault();const G=w().filter(K=>!K.disabled).map(K=>K.ref.current);Fq.includes(q.key)&&G.reverse(),Xge(G)}),onBlur:$e(e.onBlur,q=>{q.currentTarget.contains(q.target)||(window.clearTimeout(C.current),E.current="")}),onPointerMove:$e(e.onPointerMove,dx(q=>{const V=q.target,se=F.current!==q.clientX;if(q.currentTarget.contains(V)&&se){const oe=q.clientX>F.current?"right":"left";I.current=oe,F.current=q.clientX}}))})})})})})})});Hq.displayName=ci;var Wge="MenuGroup",j2=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(Ke.div,{role:"group",...n,ref:t})});j2.displayName=Wge;var Vge="MenuLabel",qq=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(Ke.div,{...n,ref:t})});qq.displayName=Vge;var G0="MenuItem",N4="menu.itemSelect",fN=p.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...a}=e,i=p.useRef(null),o=Ev(G0,e.__scopeMenu),l=y2(G0,e.__scopeMenu),c=Ft(t,i),d=p.useRef(!1),u=()=>{const f=i.current;if(!r&&f){const h=new CustomEvent(N4,{bubbles:!0,cancelable:!0});f.addEventListener(N4,m=>n==null?void 0:n(m),{once:!0}),_E(f,h),h.defaultPrevented?d.current=!1:o.onClose()}};return s.jsx(Yq,{...a,ref:c,disabled:r,onClick:$e(e.onClick,u),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),d.current=!0},onPointerUp:$e(e.onPointerUp,f=>{var h;d.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:$e(e.onKeyDown,f=>{const h=l.searchRef.current!=="";r||h&&f.key===" "||NT.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});fN.displayName=G0;var Yq=p.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:a,...i}=e,o=y2(G0,r),l=Uq(r),c=p.useRef(null),d=Ft(t,c),[u,f]=p.useState(!1),[h,m]=p.useState("");return p.useEffect(()=>{const g=c.current;g&&m((g.textContent??"").trim())},[i.children]),s.jsx(cx.ItemSlot,{scope:r,disabled:n,textValue:a??h,children:s.jsx(dN,{asChild:!0,...l,focusable:!n,children:s.jsx(Ke.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:d,onPointerMove:$e(e.onPointerMove,dx(g=>{n?o.onItemLeave(g):(o.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$e(e.onPointerLeave,dx(g=>o.onItemLeave(g))),onFocus:$e(e.onFocus,()=>f(!0)),onBlur:$e(e.onBlur,()=>f(!1))})})})}),Hge="MenuCheckboxItem",Gq=p.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...a}=e;return s.jsx(Jq,{scope:e.__scopeMenu,checked:r,children:s.jsx(fN,{role:"menuitemcheckbox","aria-checked":K0(r)?"mixed":r,...a,ref:t,"data-state":N2(r),onSelect:$e(a.onSelect,()=>n==null?void 0:n(K0(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Gq.displayName=Hge;var Kq="MenuRadioGroup",[qge,Yge]=Ru(Kq,{value:void 0,onValueChange:()=>{}}),Qq=p.forwardRef((e,t)=>{const{value:r,onValueChange:n,...a}=e,i=nn(n);return s.jsx(qge,{scope:e.__scopeMenu,value:r,onValueChange:i,children:s.jsx(j2,{...a,ref:t})})});Qq.displayName=Kq;var Zq="MenuRadioItem",Xq=p.forwardRef((e,t)=>{const{value:r,...n}=e,a=Yge(Zq,e.__scopeMenu),i=r===a.value;return s.jsx(Jq,{scope:e.__scopeMenu,checked:i,children:s.jsx(fN,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":N2(i),onSelect:$e(n.onSelect,()=>{var o;return(o=a.onValueChange)==null?void 0:o.call(a,r)},{checkForDefaultPrevented:!1})})})});Xq.displayName=Zq;var w2="MenuItemIndicator",[Jq,Gge]=Ru(w2,{checked:!1}),eY=p.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...a}=e,i=Gge(w2,r);return s.jsx(Jn,{present:n||K0(i.checked)||i.checked===!0,children:s.jsx(Ke.span,{...a,ref:t,"data-state":N2(i.checked)})})});eY.displayName=w2;var Kge="MenuSeparator",tY=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return s.jsx(Ke.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});tY.displayName=Kge;var Qge="MenuArrow",rY=p.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,a=uN(r);return s.jsx(g2,{...a,...n,ref:t})});rY.displayName=Qge;var Zge="MenuSub",[YQe,nY]=Ru(Zge),Hp="MenuSubTrigger",sY=p.forwardRef((e,t)=>{const r=$u(Hp,e.__scopeMenu),n=Ev(Hp,e.__scopeMenu),a=nY(Hp,e.__scopeMenu),i=y2(Hp,e.__scopeMenu),o=p.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,d={__scopeMenu:e.__scopeMenu},u=p.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return p.useEffect(()=>u,[u]),p.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),s.jsx(x2,{asChild:!0,...d,children:s.jsx(Yq,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":oY(r.open),...e,ref:Vw(t,a.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:$e(e.onPointerMove,dx(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:$e(e.onPointerLeave,dx(f=>{var m,g;u();const h=(m=r.content)==null?void 0:m.getBoundingClientRect();if(h){const x=(g=r.content)==null?void 0:g.dataset.side,v=x==="right",b=v?-5:5,y=h[v?"left":"right"],j=h[v?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+b,y:f.clientY},{x:y,y:h.top},{x:j,y:h.top},{x:j,y:h.bottom},{x:y,y:h.bottom}],side:x}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:$e(e.onKeyDown,f=>{var m;const h=i.searchRef.current!=="";e.disabled||h&&f.key===" "||Age[n.dir].includes(f.key)&&(r.onOpenChange(!0),(m=r.content)==null||m.focus(),f.preventDefault())})})})});sY.displayName=Hp;var aY="MenuSubContent",iY=p.forwardRef((e,t)=>{const r=Wq(ci,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=$u(ci,e.__scopeMenu),o=Ev(ci,e.__scopeMenu),l=nY(aY,e.__scopeMenu),c=p.useRef(null),d=Ft(t,c);return s.jsx(cx.Provider,{scope:e.__scopeMenu,children:s.jsx(Jn,{present:n||i.open,children:s.jsx(cx.Slot,{scope:e.__scopeMenu,children:s.jsx(b2,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:d,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;o.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:$e(e.onFocusOutside,u=>{u.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:$e(e.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:$e(e.onKeyDown,u=>{var m;const f=u.currentTarget.contains(u.target),h=Dge[o.dir].includes(u.key);f&&h&&(i.onOpenChange(!1),(m=l.trigger)==null||m.focus(),u.preventDefault())})})})})})});iY.displayName=aY;function oY(e){return e?"open":"closed"}function K0(e){return e==="indeterminate"}function N2(e){return K0(e)?"indeterminate":e?"checked":"unchecked"}function Xge(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Jge(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function exe(e,t,r){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=Jge(e,Math.max(i,0));a.length===1&&(o=o.filter(d=>d!==r));const c=o.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return c!==r?c:void 0}function txe(e,t){const{x:r,y:n}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i].x,c=t[i].y,d=t[o].x,u=t[o].y;c>n!=u>n&&r<(d-l)*(n-c)/(u-c)+l&&(a=!a)}return a}function rxe(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return txe(r,t)}function dx(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nxe=zq,sxe=x2,axe=Vq,ixe=Hq,oxe=j2,lxe=qq,cxe=fN,dxe=Gq,uxe=Qq,fxe=Xq,hxe=eY,mxe=tY,pxe=rY,gxe=sY,xxe=iY,S2="DropdownMenu",[vxe,GQe]=Is(S2,[Bq]),aa=Bq(),[yxe,lY]=vxe(S2),cY=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=aa(t),d=p.useRef(null),[u=!1,f]=xs({prop:a,defaultProp:i,onChange:o});return s.jsx(yxe,{scope:t,triggerId:La(),triggerRef:d,contentId:La(),open:u,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(h=>!h),[f]),modal:l,children:s.jsx(nxe,{...c,open:u,onOpenChange:f,dir:n,modal:l,children:r})})};cY.displayName=S2;var dY="DropdownMenuTrigger",uY=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,i=lY(dY,r),o=aa(r);return s.jsx(sxe,{asChild:!0,...o,children:s.jsx(Ke.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":n?"":void 0,disabled:n,...a,ref:Vw(t,i.triggerRef),onPointerDown:$e(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:$e(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});uY.displayName=dY;var bxe="DropdownMenuPortal",fY=e=>{const{__scopeDropdownMenu:t,...r}=e,n=aa(t);return s.jsx(axe,{...n,...r})};fY.displayName=bxe;var hY="DropdownMenuContent",mY=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=lY(hY,r),i=aa(r),o=p.useRef(!1);return s.jsx(ixe,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...n,ref:t,onCloseAutoFocus:$e(e.onCloseAutoFocus,l=>{var c;o.current||(c=a.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:$e(e.onInteractOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,u=c.button===2||d;(!a.modal||u)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mY.displayName=hY;var jxe="DropdownMenuGroup",wxe=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);
666return s.jsx(oxe,{...a,...n,ref:t})});wxe.displayName=jxe;var Nxe="DropdownMenuLabel",pY=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);return s.jsx(lxe,{...a,...n,ref:t})});pY.displayName=Nxe;var Sxe="DropdownMenuItem",gY=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);return s.jsx(cxe,{...a,...n,ref:t})});gY.displayName=Sxe;var kxe="DropdownMenuCheckboxItem",xY=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);return s.jsx(dxe,{...a,...n,ref:t})});xY.displayName=kxe;var Cxe="DropdownMenuRadioGroup",Txe=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);return s.jsx(uxe,{...a,...n,ref:t})});Txe.displayName=Cxe;var _xe="DropdownMenuRadioItem",vY=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);return s.jsx(fxe,{...a,...n,ref:t})});vY.displayName=_xe;var Pxe="DropdownMenuItemIndicator",yY=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);return s.jsx(hxe,{...a,...n,ref:t})});yY.displayName=Pxe;var Exe="DropdownMenuSeparator",bY=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);return s.jsx(mxe,{...a,...n,ref:t})});bY.displayName=Exe;var Oxe="DropdownMenuArrow",Axe=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);return s.jsx(pxe,{...a,...n,ref:t})});Axe.displayName=Oxe;var Dxe="DropdownMenuSubTrigger",jY=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);return s.jsx(gxe,{...a,...n,ref:t})});jY.displayName=Dxe;var Mxe="DropdownMenuSubContent",wY=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,a=aa(r);return s.jsx(xxe,{...a,...n,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)"}})});wY.displayName=Mxe;var Ixe=cY,Rxe=uY,$xe=fY,NY=mY,SY=pY,kY=gY,CY=xY,TY=vY,_Y=yY,PY=bY,EY=jY,OY=wY;const k2=Ixe,C2=Rxe,Lxe=p.forwardRef(({className:e,inset:t,children:r,...n},a)=>s.jsxs(EY,{ref:a,className:Oe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...n,children:[r,s.jsx(Wi,{className:"ml-auto h-4 w-4"})]}));Lxe.displayName=EY.displayName;const Fxe=p.forwardRef(({className:e,...t},r)=>s.jsx(OY,{ref:r,className:Oe("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}));Fxe.displayName=OY.displayName;const hN=p.forwardRef(({className:e,sideOffset:t=4,...r},n)=>s.jsx($xe,{children:s.jsx(NY,{ref:n,sideOffset:t,className:Oe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));hN.displayName=NY.displayName;const Vs=p.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(kY,{ref:n,className:Oe("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r}));Vs.displayName=kY.displayName;const ST=p.forwardRef(({className:e,children:t,checked:r,...n},a)=>s.jsxs(CY,{ref:a,className:Oe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(_Y,{children:s.jsx(un,{className:"h-4 w-4"})})}),t]}));
666ST.displayName=CY.displayName;const Bxe=p.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(TY,{ref:n,className:Oe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(_Y,{children:s.jsx(pW,{className:"h-2 w-2 fill-current"})})}),t]}));Bxe.displayName=TY.displayName;const Q0=p.forwardRef(({className:e,inset:t,...r},n)=>s.jsx(SY,{ref:n,className:Oe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Q0.displayName=SY.displayName;const jf=p.forwardRef(({className:e,...t},r)=>s.jsx(PY,{ref:r,className:Oe("-mx-1 my-1 h-px bg-muted",e),...t}));jf.displayName=PY.displayName;const Uxe=r2,zxe=n2,AY=p.forwardRef(({className:e,...t},r)=>s.jsx(Nv,{className:Oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));AY.displayName=Nv.displayName;const Wxe=Mu("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),DY=p.forwardRef(({side:e="right",className:t,children:r,...n},a)=>s.jsxs(zxe,{children:[s.jsx(AY,{}),s.jsxs(Sv,{ref:a,className:Oe(Wxe({side:e}),t),...n,children:[r,s.jsxs(Tv,{className:"absolute right-4 top-4 roun
666ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[s.jsx(Vn,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DY.displayName=Sv.displayName;const MY=({className:e,...t})=>s.jsx("div",{className:Oe("flex flex-col space-y-2 text-center sm:text-left",e),...t});MY.displayName="SheetHeader";const IY=p.forwardRef(({className:e,...t},r)=>s.jsx(kv,{ref:r,className:Oe("text-lg font-semibold text-foreground",e),...t}));IY.displayName=kv.displayName;const Vxe=p.forwardRef(({className:e,...t},r)=>s.jsx(Cv,{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));Vxe.displayName=Cv.displayName;var Hxe="Separator",S4="horizontal",qxe=["horizontal","vertical"],RY=p.forwardRef((e,t)=>{const{decorative:r,orientation:n=S4,...a}=e,i=Yxe(n)?n:S4,l=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return s.jsx(Ke.div,{"data-orientation":i,...l,...a,ref:t})});RY.displayName=Hxe;function Yxe(e){return qxe.includes(e)}var $Y=RY;const Oi=p.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>s.jsx($Y,{ref:a,decorative:r,orientation:t,className:Oe("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Oi.displayName=$Y.displayName;function Gxe({open:e,onOpenChange:t}){const[r]=Nn(),{user:n,isAdmin:a,isCompanyAdmin:i,logout:o}=gn(),l=()=>{o()},c=()=>{t(!1)},d=[{href:"/",label:"Scheduling",icon:Ra,match:["/","/booking"]},{href:"/events",label:"Meetings",icon:Gt,match:["/events"]},{href:"/availability",label:"Availability",icon:dr,match:["/availability"]},{href:"/contacts",label:"Contacts",icon:ir,match:["/contacts"]}
666,{href:"/workflows",label:"Workflows",icon:og,match:["/workflows"]},{href:"/integrations",label:"Integrations & apps",icon:k0,match:["/integrations"]},{href:"/settings",label:"Settings",icon:ym,match:["/settings"]}],u=[{href:"/analytics",label:"Analytics",icon:qc,match:["/analytics"]},{href:"/help",label:"Help",icon:Kw,match:["/help"]}],f=a?[{href:"/admin",label:"Admin Dashboard",icon:Eo},{href:"/user-management",label:"User Management",icon:ir},{href:"/admin/organizations",label:"Organizations",icon:Eo}]:[],h=m=>m.some(g=>r===g||r.startsWith(g));return s.jsx(Uxe,{open:e,onOpenChange:t,children:s.jsxs(DY,{side:"left",className:"w-80 p-0 flex flex-col",children:[s.jsx(MY,{className:"p-6 pb-4",children:s.jsx(IY,{className:"text-left",children:"Navigation"})}),n&&s.jsx("div",{className:"px-6 pb-4",children:s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-neutral-50 dark:bg-slate-800",children:[s.jsx("div",{className:"h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(yl,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:n.displayName||n.username}),s.jsx("p",{className:"text-xs text-neutral-500 dark:text-slate-400 truncate",children:n.email})]})]})}),s.jsx(Oi,{}),s.jsx("nav",{className:"flex-1 overflow-y-auto py-4",children:s.jsxs("div",{className:"px-4",children:[s.jsx("ul",{className:"space-y-1",children:d.map(m=>{const g=m.icon,x=h(m.match);return s.jsx("li",{children:s.jsxs(Te,{href:m.href,onClick:c,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${x?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,children:[s.jsx(g,{className:"h-5 w-5 flex-shrink-0"}),s.jsx("span",{children:m.label})]})},m.href)})}),s.jsx(Oi,{className:"my-4"}),s.jsx("ul",{className:"space-y-1",children:u.map(m=>{const g=m.icon,x=h(m.match);return s.jsx("li",{children:s.jsxs(Te,{href:m.href,onClick:c,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${x?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,children:[s.jsx(g,{className:"h-5 w-5 flex-shrink-0"}),s.jsx("span",{children:m.label})]})},m.href)})}),a&&f.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Oi,{className:"my-4"}),s.jsx("div",{className:"mb-2",children:s.jsx("p",{className:"px-4 text-xs font-semibold text-neutral-500 dark:text-slate-400 uppercase tracking-wider",children:"Admin Center"})}),s.jsx("ul",{className:"space-y-1",children:f.map(m=>{const g=m.icon;return s.jsx("li",{children:s.jsxs(Te,{href:m.href,onClick:c,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${r===m.href||r.startsWith(m.href.split("?")[0])?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,children:[s.jsx(g,{className:"h-5 w-5 flex-shrink-0"}),s.jsx("span",{children:m.label})]})},m.href)})})]}),i&&!a&&s.jsxs(s.Fragment,{children:[s.jsx(Oi,{className:"my-4"}),s.jsxs("ul",{className:"space-y-1",children:[s.jsx("li",{children:s.jsxs(Te,{href:"/admin/organizations",onClick:c,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${r==="/admin/organizations"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,children:[s.jsx(Eo,{className:"h-5 w-5 flex-shrink-0"}),s.jsx("span",{children:"Organization"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/organization/teams",onClick:c,className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${r==="/organization/teams"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,children:[s.jsx(ir,{className:"h-5 w-5 flex-shrink-0"}),s.jsx("span",{children:"Manage Teams"})]})})]})]})]})}),s.jsx(Oi,{}),s.jsx("div",{className:"p-4",children:s.jsxs(D,{variant:"outline",className:"w-full flex items-center justify-center gap-2",onClick:l,children:[s.jsx(yW,{className:"h-4 w-4"}),s.jsx("span",{children:"Logout"})]})})]})})}function LY({size:e=32,className:t=""}){return s.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",f
666ill:"none",width:e,height:e,className:t,children:[s.jsx("rect",{x:"4",y:"10",width:"56",height:"48",rx:"6",fill:"hsl(180, 70%, 35%)"}),s.jsx("rect",{x:"4",y:"10",width:"56",height:"14",rx:"6",fill:"hsl(180, 70%, 28%)"}),s.jsx("rect",{x:"4",y:"18",width:"56",height:"6",fill:"hsl(180, 70%, 28%)"}),s.jsx("rect",{x:"16",y:"4",width:"4",height:"14",rx:"2",fill:"hsl(180, 70%, 28%)"}),s.jsx("rect",{x:"44",y:"4",width:"4",height:"14",rx:"2",fill:"hsl(180, 70%, 28%)"}),s.jsx("rect",{x:"14",y:"32",width:"8",height:"6",rx:"1.5",fill:"white",opacity:"0.9"}),s.jsx("rect",{x:"28",y:"32",width:"8",height:"6",rx:"1.5",fill:"white",opacity:"0.9"}),s.jsx("rect",{x:"42",y:"32",width:"8",height:"6",rx:"1.5",fill:"white",opacity:"0.9"}),s.jsx("rect",{x:"14",y:"44",width:"8",height:"6",rx:"1.5",fill:"white",opacity:"0.9"}),s.jsx("rect",{x:"28",y:"44",width:"8",height:"6",rx:"1.5",fill:"white",opacity:"0.9"}),s.jsx("circle",{cx:"46",cy:"47",r:"3.5",fill:"hsl(180, 70%, 85%)"}),s.jsx("path",{d:"M44.5 47L45.5 48L47.5 46",stroke:"hsl(180, 70%, 28%)",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}function tr({onCreateEvent:e}){const[t,r]=Nn(),[n,a]=p.useState(!1),{user:i,organization:o,team:l,isAdmin:c,isCompanyAdmin:d,isTeamManager:u,logout:f,loading:h}=gn(),m=()=>{a(!n)},g=()=>c?"Admin":d?"Company Admin":u?"Team Manager":"User";return s.jsxs("header",{className:"bg-white border-b border-neutral-200 shadow-sm z-20 dark:bg-slate-900 dark:border-slate-700",children:[s.jsxs("div",{className:"px-6 py-3 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("button",{onClick:m,className:"md:hidden text-neutral-600 hover:text-neutral-800 dark:text-slate-400 dark:hover:text-slate-300 min-h-[44px] min-w-[44px] flex items-center justify-center -ml-2","aria-label":"Toggle navigation menu",children:s.jsx(bW,{className:"h-6 w-6"})}),s.jsxs(Te,{href:"/",className:"flex items-center gap-2",children:[s.jsx(LY,{size:28}),s.jsx("h1",{className:"text-xl font-semibold text-neutral-800 dark:text-slate-100",children:"SmartScheduler"})]})]}),s.jsx("div",{className:"flex items-center space-x-3",children:i?s.jsxs(s.Fragment,{children:[s.jsx(pe,{variant:"secondary",className:"hidden sm:inline-flex",children:g()}),s.jsxs(k2,{children:[s.jsx(C2,{asChild:!0,children:s.jsx("button",{className:"w-9 h-9 overflow-hidden rounded-full hover:opacity-80 transition-opacity",children:s.jsx(yu,{className:"w-full h-full",children:i&&i.profilePicture?s.jsx(ix,{src:i.profilePicture,alt:i.displayName||i.username,className:"object-cover"}):s.jsx(bu,{style:{backgroundColor:(i==null?void 0:i.avatarColor)||"#3f51b5"},className:"text-white font-medium",children:T0((i==null?void 0:i.displayName)||(i==null?void 0:i.username)||"U")})})})}),s.jsxs(hN,{align:"end",className:"w-56",children:[s.jsx(Q0,{className:"font-normal",children:s.jsxs("div",{className:"flex flex-col space-y-1",children:[s.jsx("p",{className:"text-sm font-medium leading-none",children:i.displayName||i.username}),s.jsx("p",{className:"text-xs leading-none text-neutral-500 dark:text-slate-400",children:i.email}),o&&s.jsxs("p",{className:"text-xs leading-none text-neutral-500 dark:text-slate-400 mt-1",children:[o.name,l&&` ⢠${l.name}`]})]})}),s.jsx(jf,{}),c&&s.jsxs(s.Fragment,{children:[s.jsxs(Vs,{onSelect:()=>r("/admin/users"),className:"cursor-pointer",children:[s.jsx(ir,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Manage Users"})]}),s.jsxs(Vs,{onSelect:()=>r("/admin/organizations"),className:"cursor-pointer",children:[s.jsx(Eo,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Manage Organizations"})]}),s.jsx(jf,{})]}),d&&!c&&s.jsxs(s.Fragment,{children:[s.jsxs(Vs,{onSelect:()=>r("/organization/teams"),className:"cursor-pointer",children:[s.jsx(ir,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Manage Teams"})]}),s.jsx(jf,{})]}),s.jsxs(Vs,{onSelect:()=>r("/profile"),className:"cursor-pointer",children:[s.jsx(yl,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Profile"})]}),s.jsxs(Vs,{onSelect:()=>r("/settings"),className:"cursor-pointer",children:[s.jsx(ym,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Settings"})]}),s.jsx(jf,{}),s.jsxs(Vs,{onClick:f,className:"cursor-pointer",children:[s.jsx(yW,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Logout"})]})]})]})]}):h?s.jsx("div",{className:"w-8 h-8"}):s.jsxs("div",{className:"flex space-x-3",children:[s.jsx(Te,{href:"/login",children:s.jsx(D,{variant:"outline",size:"sm",children:"Login"})}),s.jsx(Te,{href:"/register",children:s.jsx(D,{size:"sm",children:"Register"})})]})})]}),s.jsx(Gxe,{open:n,onOpenChange:a})]})}var T2="Collapsible",[Kxe,FY]=Is(T2),[Qxe,_2]=Kxe(T2),BY=p.forwardRef((e,t)=>
666{const{__scopeCollapsible:r,open:n,defaultOpen:a,disabled:i,onOpenChange:o,...l}=e,[c=!1,d]=xs({prop:n,defaultProp:a,onChange:o});return s.jsx(Qxe,{scope:r,disabled:i,contentId:La(),open:c,onOpenToggle:p.useCallback(()=>d(u=>!u),[d]),children:s.jsx(Ke.div,{"data-state":A2(c),"data-disabled":i?"":void 0,...l,ref:t})})});BY.displayName=T2;var UY="CollapsibleTrigger",P2=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,a=_2(UY,r);return s.jsx(Ke.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":A2(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...n,ref:t,onClick:$e(e.onClick,a.onOpenToggle)})});P2.displayName=UY;var E2="CollapsibleContent",O2=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=_2(E2,e.__scopeCollapsible);return s.jsx(Jn,{present:r||a.open,children:({present:i})=>s.jsx(Zxe,{...n,ref:t,present:i})})});O2.displayName=E2;var Zxe=p.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:a,...i}=e,o=_2(E2,r),[l,c]=p.useState(n),d=p.useRef(null),u=Ft(t,d),f=p.useRef(0),h=f.current,m=p.useRef(0),g=m.current,x=o.open||l,v=p.useRef(x),b=p.useRef();return p.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Bn(()=>{const y=d.current;if(y){b.current=b.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const j=y.getBoundingClientRect();f.current=j.height,m.current=j.width,v.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),c(n)}},[o.open,n]),s.jsx(Ke.div,{"data-state":A2(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!x,...i,ref:u,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:x&&a})});function A2(e){return e?"open":"closed"}var zY=BY,Xxe=P2,Jxe=O2;const Z0=zY,X0=P2,J0=O2;function Or({onCreateEvent:e,className:t=""}){const[r]=Nn(),[n,a]=p.useState(!1),[i,o]=p.useState(!0),[l,c]=p.useState(!1),{user:d,isAdmin:u,isCompanyAdmin:f}=gn();return p.useEffect(()=>{const h=()=>{o(window.innerWidth>=768)},m=()=>{o(g=>!g)};return h(),window.addEventListener("resize",h),window.addEventListener("toggle-sidebar",m),()=>{window.removeEventListener("resize",h),window.removeEventListener("toggle-sidebar",m)}},[]),i?s.jsxs("aside",{className:`hidden md:flex flex-col bg-white dark:bg-slate-900 border-r border-neutral-200 dark:border-slate-700 flex-shrink-0 overflow-y-auto transition-all duration-300 ${n?"w-16":"w-60"} ${t}`,children:[s.jsx("div",{className:"flex items-center justify-end p-4 border-b border-neutral-200 dark:border-slate-700",children:s.jsx("button",{onClick:()=>a(!n),className:"p-2 rounded-lg hover:bg-neutral-100 dark:hover:bg-slate-800 transition-colors",title:n?"Expand sidebar":"Collapse sidebar",children:s.jsx(as,{className:`h-4 w-4 text-neutral-600 dar
666k:text-slate-400 transition-transform ${n?"rotate-180":""}`})})}),s.jsxs("div",{className:"flex-1 py-4 px-2",children:[s.jsx("div",{className:"px-2 mb-4",children:s.jsxs(D,{onClick:()=>{e&&e()},className:`w-full flex items-center justify-center gap-2 bg-primary text-white rounded-lg font-medium shadow-sm hover:bg-primary/90 transition-colors ${n?"px-2 py-2":"px-4 py-3"}`,title:"Create Event",children:[s.jsx("span",{className:"text-xl",children:"+"}),!n&&s.jsx("span",{children:"Create"})]})}),s.jsx("nav",{children:s.jsxs("ul",{className:"space-y-1",children:[s.jsx("li",{children:s.jsxs(Te,{href:"/",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/"||r==="/booking"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Scheduling",children:[s.jsx(Ra,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Scheduling"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/events",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/events"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Meetings",children:[s.jsx(Gt,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Meetings"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/bookings",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/bookings"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Bookings",children:[s.jsx(Lg,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Bookings"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/availability",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/availability"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Availability",children:[s.jsx(dr,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Availability"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/contacts",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/contacts"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Contacts",children:[s.jsx(ir,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Contacts"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/workflows",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/workflows"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Workflows",children:[s.jsx(og,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Workflows"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/meeting-polls",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/meeting-polls"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Meeting Polls",children:[s.jsx(jh,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Meeting Polls"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/routing",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/routing"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Routing Forms",children:[s.jsx(yh,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Routing"})]})}),(f||u)&&s.jsx("li",{children:s.jsxs(Te,{href:"/team-scheduling",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/team-scheduling"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Team Scheduling",children:[s.jsx(kW,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Team Scheduling"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/integrations",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/integrations"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dar
666k:hover:bg-slate-800"}`,title:"Integrations & apps",children:[s.jsx(k0,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Integrations & apps"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/settings",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/settings"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Settings",children:[s.jsx(ym,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Settings"})]})})]})})]}),s.jsx("div",{className:"border-t border-neutral-200 dark:border-slate-700 py-3 px-2",children:s.jsx("nav",{children:s.jsxs("ul",{className:"space-y-1",children:[s.jsx("li",{children:s.jsxs(Te,{href:"/analytics",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/analytics"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Analytics",children:[s.jsx(qc,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Analytics"})]})}),u&&s.jsx("li",{children:s.jsxs(Z0,{open:l,onOpenChange:c,children:[s.jsxs(X0,{className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors w-full ${r.startsWith("/admin")?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Admin center",children:[s.jsx(Eo,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"Admin center"}),s.jsx("div",{className:"ml-auto",children:l?s.jsx(Dl,{className:"h-4 w-4"}):s.jsx(Wi,{className:"h-4 w-4"})})]})]}),!n&&s.jsx(J0,{children:s.jsxs("div",{className:"ml-6 mt-1 space-y-1",children:[s.jsx(Te,{href:"/admin",className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm ${r==="/admin"?"bg-primary/10 text-primary font-medium":"text-neutral-600 dar
666k:text-slate-400 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,children:s.jsx("span",{children:"Dashboard"})}),s.jsx(Te,{href:"/admin/users",className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm ${r==="/admin/users"?"bg-primary/10 text-primary font-medium":"text-neutral-600 dark:text-slate-400 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,children:s.jsx("span",{children:"Users"})}),s.jsx(Te,{href:"/admin/organizations",className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm ${r==="/admin/organizations"?"bg-primary/10 text-primary font-medium":"text-neutral-600 dark:text-slate-400 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,children:s.jsx("span",{children:"Organizations"})}),s.jsx(Te,{href:"/admin/audit",className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm ${r==="/admin/audit"?"bg-primary/10 text-primary font-medium":"text-neutral-600 dark:text-slate-400 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,children:s.jsx("span",{children:"Audit Log"})}),s.jsx(Te,{href:"/admin/enterprise",className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm ${r==="/admin/enterprise"?"bg-primary/10 text-primary font-medium":"text-neutral-600 dar
666k:text-slate-400 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,children:s.jsx("span",{children:"Enterprise"})})]})})]})}),f&&!u&&s.jsxs(s.Fragment,{children:[s.jsx("li",{children:s.jsxs(Te,{href:"/admin/organizations",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/admin/organizations"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Organization",children:[s.jsx(Eo,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Organization"})]})}),s.jsx("li",{children:s.jsxs(Te,{href:"/organization/teams",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/organization/teams"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Manage Teams",children:[s.jsx(ir,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Manage Teams"})]})})]}),s.jsx("li",{children:s.jsxs(Te,{href:"/help",className:`flex items-center gap-3 px-4 py-2.5 mx-2 rounded-lg transition-colors ${r==="/help"?"bg-primary/10 text-primary font-medium":"text-neutral-700 dark:text-slate-300 hover:bg-neutral-100 dark:hover:bg-slate-800"}`,title:"Help",children:[s.jsx(Kw,{className:"h-5 w-5 flex-shrink-0"}),!n&&s.jsx("span",{children:"Help"})]})})]})})})]}):null}function Ds({onCreateEventClick:e}){const[t]=Nn();return s.jsxs("nav",{className:"md:hidden fixed bottom-0 left-0 right-0 flex items-center justify-around border-t border-neutral-200 py-1 pb-[max(0.25rem,env(safe-area-inset-bottom))] bg-white dark:bg-slate-900 dark:border-slate-700 z-50 shadow-lg",children:[s.jsxs(Te,{href:"/",className:`flex flex-col items-center min-w-[48px] min-h-[48px] justify-center px-2 ${t==="/"||t==="/booking"?"text-primary":"text-neutral-500 hover:text-neutral-700 dark:text-slate-400 dark:hover:text-slate-300"}`,children:[s.jsx(Ra,{className:"h-5 w-5"}),s.jsx("span",{className:"text-[10px] mt-0.5 leading-tight",children:"Schedule"})]}),s.jsxs(Te,{href:"/events",className:`flex flex-col items-center min-w-[48px] min-h-[48px] justify-center px-2 ${t==="/events"?"text-primary":"text-neutral-500 hover:text-neutral-700 dark:text-slate-400 dark:hover:text-slate-300"}`,children:[s.jsx(Gt,{className:"h-5 w-5"}),s.jsx("span",{className:"text-[10px] mt-0.5 leading-tight",children:"Meetings"})]}),s.jsx("button",{onClick:e,className:"flex flex-col items-center px-2 -mt-3",children:s.jsx("div",{className:"w-12 h-12 rounded-full bg-primary text-white flex items-center justify-center shadow-lg active:scale-95 transition-transform",children:s.jsx("span",{className:"text-2xl font-light",children:"+"})})}),s.jsxs(Te,{href:"/availability",className:`flex flex-col items-center min-w-[48px] min-h-[48px] justify-center px-2 ${t==="/availability"?"text-primary":"text-neutral-500 hover:text-neutral-700 dark:text-slate-400 dark:hover:text-slate-300"}`,children:[s.jsx(dr,{className:"h-5 w-5"}),s.jsx("span",{className:"text-[10px] mt-0.5 leading-tight",children:"Availability"})]}),s.jsxs(Te,{href:"/settings",className:`flex flex-col items-center min-w-[48px] min-h-[48px] justify-center px-2 ${t==="/settings"?"text-primary":"text-neutral-500 hover:text-neutral-700 dark:text-slate-400 dark:hover:text-slate-300"}`,children:[s.jsx(ym,{className:"h-5 w-5"}),s.jsx("span",{className:"text-[10px] mt-0.5 leading-tight",children:"Settings"})]})]})}function hi(){const e=new Date().getFullYear();return s.jsx("footer",{className:"py-3 bg-white border-t border-neutral-200 dark:bg-slate-950 dark:border-slate-800 text-neutral-500 dark:text-slate-400 text-sm mt-auto",children:s.jsx("div",{className:"container mx-auto px-4 flex flex-col sm:flex-row justify-center items-center space-y-2 sm:space-y-0",children:s.jsxs("div",{className:"text-center",children:["© ",e," SmartScheduler | Find a Business Pro! | ",s.jsx(Te,{href:"/privacy-policy",className:"hover:text-primary hover:underline transition-colors",children:"Privacy Policy"})," | ",s.jsx(Te,{href:"/terms-of-service",className:"hover:text-primary hover:underline transition-colors",children:"Terms of Service"}),". All rights reserved."]})})})}function eve(){const e=new Date,t=e.getFullYear(),r=e.getMonth(),n=e.toLocaleDateString("en-US",{month:"long",year:"numeric"}),a=new Date(t,r,1).getDay(),i=new Date(t,r+1,0).getDate();return s.jsxs("div",{className:"bg-gradient-to-b from-white to-neutral-100 dar
666k:from-slate-950 dark:to-slate-900",children:[s.jsx("section",{className:"py-16 md:py-24",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"flex flex-col md:flex-row items-center",children:[s.jsxs("div",{className:"md:w-1/2 mb-8 md:mb-0",children:[s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-neutral-900 dark:text-white mb-4",children:"Smart Calendar for Teams"}),s.jsx("p",{className:"text-xl text-neutral-700 dark:text-slate-300 mb-8",children:"SmartScheduler helps teams organize their time with powerful role-based permissions, organization management, and seamless calendar integrations."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[s.jsx(Te,{href:"/login",children:s.jsx(D,{size:"lg",className:"w-full sm:w-auto",children:"Login"})}),s.jsx(Te,{href:"/register",children:s.jsx(D,{size:"lg",variant:"outline",className:"w-full sm:w-auto",children:"Create Account"})})]})]}),s.jsx("div",{className:"md:w-1/2 flex justify-end",children:s.jsxs("div",{className:"w-full max-w-md bg-white dark:bg-slate-800 shadow-lg rounded-lg overflow-hidden border border-neutral-200 dark:border-slate-700",children:[s.jsx("div",{className:"p-4 bg-primary/10 dark:bg-primary/20 border-b border-neutral-200 dark:border-slate-700",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"font-semibold text-neutral-900 dark:text-white",children:n}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(D,{size:"sm",variant:"outline",className:"h-8 w-8 p-0",children:[s.jsx("span",{className:"sr-only",children:"Previous month"}),s.jsx("span",{"aria-hidden":"true",children:"<"})]}),s.jsxs(D,{size:"sm",variant:"outline",className:"h-8 w-8 p-0",children:[s.jsx("span",{className:"sr-only",children:"Next month"}),s.jsx("span",{"aria-hidden":"true",children:">"})]})]})]})}),s.jsxs("div",{className:"grid grid-cols-7 text-center text-sm p-2",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(o=>s.jsx("div",{className:"py-2 text-neutral-500 dark:text-slate-400",children:o},o)),[...Array(a)].map((o,l)=>s.jsx("div",{className:"p-2"},`empty-${l}`)),[...Array(i)].map((o,l)=>{const c=l+1,d=c===e.getDate(),u=new Date(t,r,c).getDay()===1;return s.jsxs("div",{className:`p-2 ${d?"bg-primary text-white rounded-full":u?"text-primary font-semibold":"text-neutral-800 dark:text-slate-300"}`,children:[c,u&&s.jsx("div",{className:"h-1 w-1 bg-primary rounded-full mx-auto mt-1"})]},c)})]}),s.jsx("div",{className:"p-4 border-t border-neutral-200 dark:border-slate-700",children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center p-2 rounded-md bg-primary/10 dark:bg-primary/20",children:[s.jsx("div",{className:"w-2 h-full bg-blue-500 rounded-full mr-2"}),s.jsx("span",{className:"text-sm",children:"10:00 AM - Team Standup"})]}),s.jsxs("div",{className:"flex items-center p-2 rounded-md",children:[s.jsx("div",{className:"w-2 h-full bg-green-500 rounded-full mr-2"}),s.jsx("span",{className:"text-sm",children:"2:00 PM - Project Review"})]})]})})]})})]})})}),s.jsx("section",{className:"py-16 bg-white dark:bg-slate-900",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h2",{className:"text-3xl font-bold text-center mb-12 text-neutral-900 dark:text-white",children:"Powerful Features for Teams"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:[s.jsx(Fy,{icon:s.jsx(Gt,{className:"h-8 w-8"}),title:"Smart Scheduling",description:"Intelligent scheduling that respects working hours and prevents conflicts."}),s.jsx(Fy,{icon:s.jsx(ir,{className:"h-8 w-8"}),title:"Role-Based Access",description:"Multi-tiered permissions for admins, company leaders, team managers, and users."}),s.jsx(Fy,{icon:s.jsx(dr,{className:"h-8 w-8"}),title:"Calendar Integrations",description:"Seamlessly connect with Google Calendar, Outlook, and more."}),s.jsx(Fy,{icon:s.jsx(Ooe,{className:"h-8 w-8"}),title:"Team Organization",description:"Manage organizations and teams with hierarchical structures."})]})]})}
666),s.jsx("section",{className:"py-16 bg-neutral-100 dark:bg-slate-800",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsx("h2",{className:"text-3xl font-bold text-center mb-12 text-neutral-900 dark:text-white",children:"How SmartScheduler Works"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[s.jsx(LS,{step:"1",title:"Connect your calendar",description:"Link Google Calendar or Outlook. SmartScheduler reads your existing events so it knows when you are genuinely free."}),s.jsx(LS,{step:"2",title:"Publish a booking link",description:"Set your working hours, buffer times, minimum notice, and daily meeting limits, then share a personal or team booking link."}),s.jsx(LS,{step:"3",title:"Let meetings book themselves",description:"Invitees pick a slot that actually works. The event is written to your calendar and everyone receives a confirmation."})]})]})}),s.jsx("section",{className:"py-16 bg-white dark:bg-slate-900",children:s.jsx("div",{className:"container mx-auto px-4 max-w-3xl",children:s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx("div",{className:"text-primary mb-4",children:s.jsx(NW,{className:"h-10 w-10"})}),s.jsx("h2",{className:"text-3xl font-bold mb-4 text-neutral-900 dark:text-white",children:"Your Calendar Data"}),s.jsx("p",{className:"text-neutral-700 dark:text-slate-300 mb-4",children:"SmartScheduler requests access to your Google Calendar for two reasons: to read your existing events so it never offers a time slot you are already busy for, and to create, update, and cancel the meetings booked through your links."}),s.jsx("p",{className:"text-neutral-700 dark:text-slate-300 mb-4",children:"We do not sell your data, use it for advertising, or use it to train AI models. You can disconnect a calendar at any time from the Integrations page, which revokes our access with Google and deletes the stored tokens and synced events."}),s.jsxs("p",{className:"text-neutral-700 dark:text-slate-300 mb-6",children:["Our use and transfer of information received from Google APIs adheres to the"," ",s.jsx("a",{href:"https://developers.google.com/terms/api-services-user-data-policy",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Google API Services User Data Policy"}),", including the Limited Use requirements."]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[s.jsx(Te,{href:"/privacy-policy",children:s.jsx(D,{variant:"outline",className:"w-full sm:w-auto",children:"Read our Privacy Policy"})}),s.jsx(Te,{href:"/terms-of-service",children:s.jsx(D,{variant:"outline",className:"w-full sm:w-auto",children:"Terms of Service"})})]})]})})}),s.jsx("section",{className:"py-16 bg-primary text-white",children:s.jsxs("div",{className:"container mx-auto px-4 text-center",children:[s.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Ready to get started?"}),s.jsx("p",{className:"text-xl mb-8 opacity-90",children:"Create an account, connect your calendar, and share your first booking link in minutes."}),s.jsxs("div",{className:"flex flex-col sm:flex-row justify-center gap-4",children:[s.jsx(Te,{href:"/register",children:s.jsx(D,{size:"lg",variant:"secondary",className:"w-full sm:w-auto",children:"Create Free Account"})}),s.jsx(Te,{href:"/login",children:s.jsx(D,{size:"lg",variant:"outline",className:"text-white border-white bg-transparent hover:bg-white/10 w-full sm:w-auto",children:"Login"})})]})]})})]})}function Fy({icon:e,title:t,description:r}){return s.jsxs("div",{className:"bg-neutral-50 dark:bg-slate-800 p-6 rounded-lg border border-neutral-200 dark:border-slate-700 hover:shadow-md transition-shadow",children:[s.jsx("div",{className:"text-primary mb-4",children:e}),s.jsx("h3",{className:"font-semibold text-xl mb-2 text-neutral-900 dark:text-white",children:t}
666),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:r})]})}function LS({step:e,title:t,description:r}){return s.jsxs("div",{className:"bg-white dark:bg-slate-900 p-6 rounded-lg border border-neutral-200 dark:border-slate-700 shadow-sm",children:[s.jsx("div",{className:"flex items-center justify-center h-10 w-10 rounded-full bg-primary text-white font-semibold mb-4",children:e}),s.jsx("h3",{className:"font-semibold text-xl mb-2 text-neutral-900 dark:text-white",children:t}),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:r})]})}function mN(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 D2="Checkbox",[tve,KQe]=Is(D2),[rve,nve]=tve(D2),WY=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:a,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:d,form:u,...f}=e,[h,m]=p.useState(null),g=Ft(t,w=>m(w)),x=p.useRef(!1),v=h?u||!!h.closest("form"):!0,[b=!1,y]=xs({prop:a,defaultProp:i,onChange:d}),j=p.useRef(b);return p.useEffect(()=>{const w=h==null?void 0:h.form;if(w){const N=()=>y(j.current);return w.addEventListener("reset",N),()=>w.removeEventListener("reset",N)}},[h,y]),s.jsxs(rve,{scope:r,state:b,disabled:l,children:[s.jsx(Ke.button,{type:"button",role:"checkbox","aria-checked":Fc(b)?"mixed":b,"aria-required":o,"data-state":qY(b),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:g,onKeyDown:$e(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:$e(e.onClick,w=>{y(N=>Fc(N)?!0:!N),v&&(x.current=w.isPropagationStopped(),x.current||w.stopPropagation())})}),v&&s.jsx(sve,{control:h,bubbles:!x.current,name:n,value:c,checked:b,required:o,disabled:l,form:u,style:{transform:"translateX(-100%)"},defaultChecked:Fc(i)?!1:i})]})});WY.displayName=D2;var VY="CheckboxIndicator",HY=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...a}=e,i=nve(VY,r);return s.jsx(Jn,{present:n||Fc(i.state)||i.state===!0,children:s.jsx(Ke.span,{"data-state":qY(i.state),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});HY.displayName=VY;var sve=e=>{const{control:t,checked:r,bubbles:n=!0,defaultChecked:a,...i}=e,o=p.useRef(null),l=mN(r),c=iN(t);p.useEffect(()=>{const u=o.current,f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==r&&m){const g=new Event("click",{bubbles:n});u.indeterminate=Fc(r),m.call(u,Fc(r)?!1:r),u.dispatchEvent(g)}},[l,r,n]);const d=p.useRef(Fc(r)?!1:r);return s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??d.current,...i,tabIndex:-1,ref:o,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Fc(e){return e==="indeterminate"}function qY(e){return Fc(e)?"indeterminate":e?"checked":"unchecked"}var YY=WY,ave=HY;const Gn=p.forwardRef(({className:e,...t},r)=>s.jsx(YY,{ref:r,className:Oe("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:s.jsx(ave,{className:Oe("flex items-center justify-center text-current"),children:s.jsx(un,{className:"h-4 w-4"})})}));Gn.displayName=YY.displayName;const k4=["border-l-blue-500","border-l-purple-500","border-l-green-500","border-l-yellow-500","border-l-red-500","border-l-pink-500","border-l-indigo-500","border-l-teal-500"];function ive({link:e,onEdit:t,onDelete:r,onCopyLink:n,selected:a=!1,onSelect:i,colorIndex:o=0}){const{toast:l}=Qt(),c=k4[o%k4.length],d=()=>{if(!e.availability||typeof e.availability!="object")return"Weekdays";const g=e.availability;if(!g.days||!Array.isArray(g.days))return"Weekdays";const x={0:"Sun",1:"Mon",2:"Tue",3:"Wed",4:"Thu",5:"Fri",6:"Sat"};return g.days.map(v=>x[v]||v).join(", ")},u=()=>{if(!e.availability||typeof e.availability!="object")return"9 am - 6 pm";const g=e.availability;return g.hours?`${g.hours.start} - ${g.hours.end}`:"9 am - 6 pm"},f=()=>e.meetingType==="zoom"?"Zoom":e.meetingType==="google-meet"?"Google Meet":e.meetingType==="custom"?"Custom Meeting URL":e.location?e.location:"In-person meeting",h=()=>"One-on-One",m=async()=>
666{if(n)n(e.slug);else try{const g=window.location.protocol,x=window.location.hostname,v=window.location.port?`:${window.location.port}`:"",b=`${g}//${x}${v}`;let y;if(e.isTeamBooking&&e.teamId){const j=await fetch(`/api/teams/${e.teamId}/public-page-path`);if(j.ok){const w=await j.json();y=`${b}${w.path}/${e.slug}`}else y=`${b}/booking/${e.slug}`}else y=`${b}/booking/${e.slug}`;await navigator.clipboard.writeText(y),l({title:"Link Copied",description:"Booking link copied to clipboard"})}catch(g){console.error("Error copying link:",g),l({title:"Error",description:"Could not copy booking link",variant:"destructive"})}};return s.jsxs("div",{className:`group relative flex flex-col sm:flex-row sm:items-center bg-white border border-neutral-200 dark:border-slate-700 rounded-lg hover:shadow-md transition-shadow ${c} border-l-4`,children:[s.jsx("div",{className:"sm:hidden absolute top-4 left-4",children:s.jsx(Gn,{checked:a,onCheckedChange:g=>i==null?void 0:i(g),className:"data-[state=checked]:bg-primary data-[state=checked]:border-primary"})}),s.jsx("div",{className:"hidden sm:block pl-4 pr-3",children:s.jsx(Gn,{checked:a,onCheckedChange:g=>i==null?void 0:i(g),className:"data-[state=checked]:bg-primary data-[state=checked]:border-primary"})}),s.jsxs("div",{className:"flex-1 py-4 pr-4 pl-12 sm:pl-0",children:[s.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[s.jsx("h3",{className:"text-sm sm:text-base font-semibold text-neutral-900 dark:text-slate-100",children:e.title}),s.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-600 dark:bg-green-400 mr-1"}),"Active"]})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 sm:gap-x-4 gap-y-1 text-xs sm:text-sm text-neutral-600 dar
666k:text-slate-400",children:[s.jsx("span",{children:e.duration>=60?`${Math.floor(e.duration/60)} hr${e.duration>=120?"s":""}${e.duration%60?` ${e.duration%60} min`:""}`:`${e.duration} min`}),s.jsx("span",{className:"hidden sm:inline",children:"â¢"}),s.jsx("span",{className:"truncate max-w-[150px] sm:max-w-none",children:f()}),s.jsx("span",{className:"hidden sm:inline",children:"â¢"}),s.jsx("span",{className:"hidden sm:inline",children:h()})]}),s.jsxs("div",{className:"mt-2 text-xs sm:text-sm text-neutral-600 dark:text-slate-400",children:[d(),", ",u()]})]}),s.jsxs("div",{className:"flex items-center gap-2 px-4 pb-4 sm:pb-0 sm:pr-4 sm:pl-0",children:[s.jsxs(D,{variant:"outline",size:"sm",onClick:m,className:"flex-1 sm:flex-none flex items-center justify-center gap-2 min-h-[44px] sm:min-h-0",children:[s.jsx(ea,{className:"h-4 w-4"}),s.jsx("span",{children:"Copy link"})]}),s.jsxs(k2,{children:[s.jsx(C2,{asChild:!0,children:s.jsx(D,{variant:"ghost",size:"sm",className:"h-[44px] w-[44px] sm:h-8 sm:w-8 p-0",children:s.jsx(Toe,{className:"h-4 w-4"})})}),s.jsxs(hN,{align:"end",children:[t&&s.jsxs(Vs,{onClick:()=>t(e),className:"cursor-pointer",children:[s.jsx(FE,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Edit"})]}),s.jsxs(Vs,{onClick:m,className:"cursor-pointer",children:[s.jsx($E,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Share"})]}),s.jsxs(Vs,{onClick:async()=>{try{const g=window.location.protocol,x=window.location.hostname,v=window.location.port?`:${window.location.port}`:"",b=`${g}//${x}${v}`;if(e.isTeamBooking&&e.teamId){const j=await fetch(`/api/teams/${e.teamId}/public-page-path`);if(j.ok){const w=await j.json(),N=`${b}${w.path}/${e.slug}`;window.open(N,"_blank");return}}const y=await fetch("/api/users/current");if(y.ok){const j=await y.json();let w="";if(j.firstName&&j.lastName)w=`${j.firstName.toLowerCase()}.${j.lastName.toLowerCase()}`;else if(j.displayName&&j.displayName.includes(" ")){const S=j.displayName.split(" ");S.length>=2&&(w=`${S[0].toLowerCase()}.${S[S.length-1].toLowerCase()}`)}w||(w=j.username.toLowerCase());const N=`${b}/${w}/booking/${e.slug}`;window.open(N,"_blank")}else{const j=`${b}/booking/${e.slug}`;window.open(j,"_blank")}}catch(g){console.error("Error opening booking page:",g);const x=window.location.protocol,v=window.location.hostname,b=window.location.port?`:${window.location.port}`:"",y=`${x}//${v}${b}/booking/${e.slug}`;window.open(y,"_blank")}},className:"cursor-pointer",children:[s.jsx(Zr,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"View booking page"})]}),r&&s.jsx(s.Fragment,{children:s.jsxs(Vs,{onClick:()=>r(e.id),className:"cursor-pointer text-red-600 focus:text-red-600",children:[s.jsx(Pr,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Delete"})]})})]})]})]})]})}function ove(e,t=[]){let r=[];function n(i,o){const l=p.createContext(o),c=r.length;r=[...r,o];function d(f){const{scope:h,children:m,...g}=f,x=(h==null?void 0:h[e][c])||l,v=p.useMemo(()=>g,Object.values(g));return s.jsx(x.Provider,{value:v,children:m})}function u(f,h){const m=(h==null?void 0:h[e][c])||l,g=p.useContext(m);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return d.displayName=i+"Provider",[d,u]}const a=()=>{const i=r.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 a.scopeName=e,[n,lve(a,...t)]}function lve(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((l,{useScope:c,scopeName:d})=>{const f=c(i)[`__scope${d}`];return{...l,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var M2="Progress",I2=100,[cve,QQe]=ove(M2),[dve,uve]=cve(M2),GY=p.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:a,getValueLabel:i=fve,...o}=e;(a||a===0)&&!C4(a)&&console.error(hve(`${a}`,"Progress"));const l=C4(a)?a:I2;n!==null&&!T4(n,l)&&console.error(mve(`${n}`,"Progress"));const c=T4(n,l)?n:null,d=ej(c)?i(c,l):void 0;return s.jsx(dve,{scope:r,value:c,max:l,children:s.jsx(Ke.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":ej(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":ZY(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});GY.displayName=M2;var KY="ProgressIndicator",QY=p.forwardRef((e,t)=>
666{const{__scopeProgress:r,...n}=e,a=uve(KY,r);return s.jsx(Ke.div,{"data-state":ZY(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:t})});QY.displayName=KY;function fve(e,t){return`${Math.round(e/t*100)}%`}function ZY(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ej(e){return typeof e=="number"}function C4(e){return ej(e)&&!isNaN(e)&&e>0}function T4(e,t){return ej(e)&&!isNaN(e)&&e<=t&&e>=0}function hve(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${I2}\`.`}function mve(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 667 - a positive number 668 - less than the value passed to \`max\` (or ${I2} if no \`max\` prop is set) 669 - \`null\` or \`undefined\` if the progress is indeterminate. 670 671Defaulting to \`null\`.`}var XY=GY,pve=QY;const JY=p.forwardRef(({className:e,value:t,...r},n)=>s.jsx(XY,{ref:n,className:Oe("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:s.jsx(pve,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));JY.displayName=XY.displayName;function gve({onDismiss:e}){const{user:t}=gn(),[r,n]=p.useState(!1),{data:a}=ut({queryKey:["/api/user/onboarding-progress"],queryFn:async()=>(await Ue("GET","/api/user/onboarding-progress")).json(),enabled:!!t}),{data:i=[]}=ut({queryKey:["/api/booking"],queryFn:async()=>(await Ue("GET","/api/booking")).json(),enabled:!!t}),{data:o=[]}=ut({queryKey:["/api/integrations"],queryFn:async()=>(await Ue("GET","/api/integrations")).json(),enabled:!!t}),{data:l}=ut({queryKey:["/api/settings"],queryFn:async()=>(await Ue("GET","/api/settings")).json(),enabled:!!t}),c=dt({mutationFn:async j=>{await Ue("PATCH","/api/user/onboarding-progress",j)},onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/user/onboarding-progress"]})}}),d=Array.isArray(o)&&o.some(j=>j.isConnected),u=Array.isArray(i)&&i.length>0,f=l&&l.workingHours&&Object.keys(l.workingHours).length>0,h=t&&(t.profilePicture||t.bio),m=[{id:"connect-calendar",title:"Connect your first calendar",description:"Sync your Google, Outlook, or iCal calendar",link:"/integrations",icon:s.jsx(Gt,{className:"h-5 w-5"}),completed:d},{id:"create-booking-link",title:"Create your first booking link",description:"Set up a scheduling link for others to book time",link:"/booking",icon:s.jsx(Ra,{className:"h-5 w-5"}),completed:u},{id:"set-availability",title:"Set your availability",description:"Configure your working hours and preferences",link:"/availability",icon:s.jsx(dr,{className:"h-5 w-5"}),completed:f},{id:"customize-profile",title:"Customize your profile",description:"Add a photo and bio to personalize your page",link:"/profile",icon:s.jsx(yl,{className:"h-5 w-5"}),completed:h}],g=m.filter(j=>j.completed).length,x=m.length,v=g/x*100,b=g===x;p.useEffect(()=>{b&&!(a!=null&&a.completed)&&c.mutate({completed:!0})},[b]);const y=()=>{n(!0),c.mutate({dismissed:!0}),e&&e()};return r||a!=null&&a.dismissed||b?null:s.jsxs(X,{className:"fixed bottom-6 right-6 w-96 shadow-2xl z-50 border-2 border-primary/20",children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(fe,{className:"text-lg font-semibold",children:"Getting Started"}),s.jsx(D,{variant:"ghost",size:"sm",onClick:y,className:"h-6 w-6 p-0",children:s.jsx(Vn,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"mt-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-sm text-neutral-600 dar
671k:text-slate-400 mb-2",children:[s.jsxs("span",{children:[g," of ",x," completed"]}),s.jsxs("span",{children:[Math.round(v),"%"]})]}),s.jsx(JY,{value:v,className:"h-2"})]})]}),s.jsxs(te,{className:"space-y-3",children:[m.map(j=>s.jsx(Te,{href:j.link,children:s.jsxs("div",{className:`flex items-start gap-3 p-3 rounded-lg border transition-colors cursor-pointer ${j.completed?"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800":"bg-neutral-50 dark:bg-slate-800 border-neutral-200 dark:border-slate-700 hover:bg-neutral-100 dark:hover:bg-slate-750"}`,children:[s.jsx("div",{className:`flex-shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${j.completed?"bg-green-500 text-white":"bg-neutral-200 dark:bg-slate-700 text-neutral-600 dark:text-slate-400"}`,children:j.completed?s.jsx(un,{className:"h-5 w-5"}):j.icon}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h4",{className:`font-medium text-sm ${j.completed?"text-green-900 dark:text-green-100":"text-neutral-900 dark:text-slate-100"}`,children:j.title}),s.jsx("p",{className:`text-xs mt-0.5 ${j.completed?"text-green-700 dark:text-green-300":"text-neutral-500 dark:text-slate-400"}`,children:j.description})]})]})},j.id)),g>0&&g<x&&s.jsx(D,{variant:"link",onClick:y,className:"w-full text-sm text-neutral-500 hover:text-neutral-700 dark:text-slate-400 dark:hover:text-slate-300",children:"Remind me later"})]})]})}var Ov=e=>e.type==="checkbox",Id=e=>e instanceof Date,zs=e=>e==null;const eG=e=>typeof e=="object";var An=e=>!zs(e)&&!Array.isArray(e)&&eG(e)&&!Id(e),tG=e=>An(e)&&e.target?Ov(e.target)?e.target.checked:e.target.value:e,xve=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rG=(e,t)=>e.has(xve(t)),vve=e=>{const t=e.constructor&&e.constructor.prototype;return An(t)&&t.hasOwnProperty("isPrototypeOf")},R2=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function la(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(R2&&(e instanceof Blob||e instanceof FileList))&&(r||An(e)))if(t=r?[]:{},!r&&!vve(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=la(e[n]));else return e;return t}var pN=e=>Array.isArray(e)?e.filter(Boolean):[],yn=e=>e===void 0,He=(e,t,r)=>{if(!t||!An(e))return r;const n=pN(t.split(/[,[\].]+?/)).reduce((a,i)=>zs(a)?a:a[i],e);return yn(n)||n===e?yn(e[t])?r:e[t]:n},Ja=e=>typeof e=="boolean",$2=e=>/^\w*$/.test(e),nG=e=>pN(e.replace(/["|']|\]/g,"").split(/\.|\[/)),jr=(e,t,r)=>{let n=-1;const a=$2(t)?[t]:nG(t),i=a.length,o=i-1;for(;++n<i;){const l=a[n];let c=r;if(n!==o){const d=e[l];c=An(d)||Array.isArray(d)?d:isNaN(+a[n+1])?{}:[]}if(l==="__proto__")return;e[l]=c,e=e[l]}return e};const tj={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ai={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Zo={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},sG=O.createContext(null),gN=()=>O.useContext(sG),yve=e=>{const{children:t,...r}=e;return O.createElement(sG.Provider,{value:r},t)};var aG=(e,t,r,n=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const o=i;return t._proxyFormState[o]!==Ai.all&&(t._proxyFormState[o]=!n||Ai.all),r&&(r[o]=!0),e[o]}});return a},ua=e=>An(e)&&!Object.keys(e).length,iG=(e,t,r,n)=>{r(e);const{name:a,...i}=e;return ua(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!n||Ai.all))},cg=e=>Array.isArray(e)?e:[e],oG=(e,t,r)=>!e||!t||e===t||cg(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function L2(e){const t=O.useRef(e);t.current=e,O.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function bve(e){const t=gN(),{control:r=t.control,disabled:n,name:a,exact:i}=e||{},[o,l]=O.useState(r._formState),c=O.useRef(!0),d=O.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=O.useRef(a);return u.current=a,L2({disabled:n,next:f=>
vendor: 24,307 bytes, line 671
671c.current&&oG(u.current,f.name,i)&&iG(f,d.current,r._updateFormState)&&l({...r._formState,...f}),subject:r._subjects.state}),O.useEffect(()=>(c.current=!0,d.current.isValid&&r._updateValid(!0),()=>{c.current=!1}),[r]),aG(o,r,d.current,!1)}var So=e=>typeof e=="string",lG=(e,t,r,n,a)=>So(e)?(n&&t.watch.add(e),He(r,e,a)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),He(r,i))):(n&&(t.watchAll=!0),r);function jve(e){const t=gN(),{control:r=t.control,name:n,defaultValue:a,disabled:i,exact:o}=e||{},l=O.useRef(n);l.current=n,L2({disabled:i,subject:r._subjects.values,next:u=>{oG(l.current,u.name,o)&&d(la(lG(l.current,r._names,u.values||r._formValues,!1,a)))}});const[c,d]=O.useState(r._getWatch(n,a));return O.useEffect(()=>r._removeUnmounted()),c}function wve(e){const t=gN(),{name:r,disabled:n,control:a=t.control,shouldUnregister:i}=e,o=rG(a._names.array,r),l=jve({control:a,name:r,defaultValue:He(a._formValues,r,He(a._defaultValues,r,e.defaultValue)),exact:!0}),c=bve({control:a,name:r,exact:!0}),d=O.useRef(a.register(r,{...e.rules,value:l,...Ja(e.disabled)?{disabled:e.disabled}:{}}));return O.useEffect(()=>{const u=a._options.shouldUnregister||i,f=(h,m)=>{const g=He(a._fields,h);g&&g._f&&(g._f.mount=m)};if(f(r,!0),u){const h=la(He(a._options.defaultValues,r));jr(a._defaultValues,r,h),yn(He(a._formValues,r))&&jr(a._formValues,r,h)}return()=>{(o?u&&!a._state.action:u)?a.unregister(r):f(r,!1)}},[r,a,o,i]),O.useEffect(()=>{He(a._fields,r)&&a._updateDisabledField({disabled:n,fields:a._fields,name:r,value:He(a._fields,r)._f.value})},[n,r,a]),{field:{name:r,value:l,...Ja(n)||c.disabled?{disabled:c.disabled||n}:{},onChange:O.useCallback(u=>d.current.onChange({target:{value:tG(u),name:r},type:tj.CHANGE}),[r]),onBlur:O.useCallback(()=>d.current.onBlur({target:{value:He(a._formValues,r),name:r},type:tj.BLUR}),[r,a]),ref:O.useCallback(u=>{const f=He(a._fields,r);f&&u&&(f._f.ref={focus:()=>u.focus(),select:()=>u.select(),setCustomValidity:h=>u.setCustomValidity(h),reportValidity:()=>u.reportValidity()})},[a._fields,r])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!He(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!He(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!He(c.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!He(c.validatingFields,r)},error:{enumerable:!0,get:()=>He(c.errors,r)}})}}const Nve=e=>e.render(wve(e));var cG=(e,t,r,n,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:a||!0}}:{},_4=e=>({isOnSubmit:!e||e===Ai.onSubmit,isOnBlur:e===Ai.onBlur,isOnChange:e===Ai.onChange,isOnAll:e===Ai.all,isOnTouch:e===Ai.onTouched}),P4=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const dg=(e,t,r,n)=>{for(const a of r||Object.keys(e)){const i=He(e,a);if(i){const{_f:o,...l}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],a)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(dg(l,t))break}else if(An(l)&&dg(l,t))break}}};var Sve=(e,t,r)=>{const n=cg(He(e,r));return jr(n,"root",t[r]),jr(e,r,n),e},F2=e=>e.type==="file",ul=e=>typeof e=="function",rj=e=>{if(!R2)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},$b=e=>So(e),B2=e=>e.type==="radio",nj=e=>e instanceof RegExp;const E4={value:!1,isValid:!1},O4={value:!0,isValid:!0};var dG=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!yn(e[0].attributes.value)?yn(e[0].value)||e[0].value===""?O4:{value:e[0].value,isValid:!0}:O4:E4}return E4};const A4={isValid:!1,value:null};var uG=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,A4):A4;function D4(e,t,r="validate"){if($b(e)||Array.isArray(e)&&e.every($b)||Ja(e)&&!e)return{type:r,message:$b(e)?e:"",ref:t}}var Qu=e=>An(e)&&!nj(e)?e:{value:e,message:""},M4=async(e,t,r,n,a)=>{const{ref:i,refs:o,required:l,maxLength:c,minLength:d,min:u,max:f,pattern:h,validate:m,name:g,valueAsNumber:x,mount:v,disabled:b}=e._f,y=He(t,g);if(!v||b)return{};const j=o?o[0]:i,w=_=>{n&&j.reportValidity&&(j.setCustomValidity(Ja(_)?"":_||""),j.reportValidity())},N={},S=B2(i),k=Ov(i),T=S||k,C=(x||F2(i))&&yn(i.value)&&yn(y)||rj(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length,E=cG.bind(null,g,r,N),P=(_,I,F,H=Zo.maxLength,W=Zo.minLength)=>{const z=_?I:F;N[g]={type:_?H:W,message:z,ref:i,...E(_?H:W,z)}};if(a?!Array.isArray(y)||!y.length:l&&(!T&&(C||zs(y))||Ja(y)&&!y||k&&!dG(o).isValid||S&&!uG(o).isValid)){const{value:_,message:I}=$b(l)?{value:!!l,message:l}:Qu(l);if(_&&(N[g]={type:Zo.required,message:I,ref:j,...E(Zo.required,I)},!r))return w(I),N}if(!C&&(!zs(u)||!zs(f))){let _,I;const F=Qu(f),H=Qu(u);if(!zs(y)&&!isNaN(y)){const W=i.valueAsNumber||y&&+y;zs(F.value)||(_=W>F.value),zs(H.value)||(I=W<H.value)}else{const W=i.valueAsDate||new Date(y),z=V=>new Date(new Date().toDateString()+" "+V),R=i.type=="time",q=i.type=="week";So(F.value)&&y&&(_=R?z(y)>z(F.value):q?y>F.value:W>new Date(F.value)),So(H.value)&&y&&(I=R?z(y)<z(H.value):q?y<H.value:W<new Date(H.value))}if((_||I)&&(P(!!_,F.message,H.message,Zo.max,Zo.min),!r))return w(N[g].message),N}if((c||d)&&!C&&(So(y)||a&&Array.isArray(y))){const _=Qu(c),I=Qu(d),F=!zs(_.value)&&y.length>+_.value,H=!zs(I.value)&&y.length<+I.value;if((F||H)&&(P(F,_.message,I.message),!r))return w(N[g].message),N}if(h&&!C&&So(y)){const{value:_,message:I}=Qu(h);if(nj(_)&&!y.match(_)&&(N[g]={type:Zo.pattern,message:I,ref:i,...E(Zo.pattern,I)},!r))return w(I),N}if(m){if(ul(m)){const _=await m(y,t),I=D4(_,j);if(I&&(N[g]={...I,...E(Zo.validate,I.message)},!r))return w(I.message),N}else if(An(m)){let _={};for(const I in m){if(!ua(_)&&!r)break;const F=D4(await m[I](y,t),j,I);F&&(_={...F,...E(I,F.message)},w(F.message),r&&(N[g]=_))}if(!ua(_)&&(N[g]={ref:j,..._},!r))return N}}return w(!0),N};function kve(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=yn(e)?n++:e[t[n++]];return e}function Cve(e){for(const t in e)if(e.hasOwnProperty(t)&&!yn(e[t]))return!1;return!0}function Wn(e,t){const r=Array.isArray(t)?t:$2(t)?[t]:nG(t),n=r.length===1?e:kve(e,r),a=r.length-1,i=r[a];return n&&delete n[i],a!==0&&(An(n)&&ua(n)||Array.isArray(n)&&Cve(n))&&Wn(e,r.slice(0,-1)),e}var FS=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}},kT=e=>zs(e)||!eG(e);function pc(e,t){if(kT(e)||kT(t))return e===t;if(Id(e)&&Id(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const a of r){const i=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const o=t[a];if(Id(i)&&Id(o)||An(i)&&An(o)||Array.isArray(i)&&Array.isArray(o)?!pc(i,o):i!==o)return!1}}return!0}var fG=e=>e.type==="select-multiple",Tve=e=>B2(e)||Ov(e),BS=e=>rj(e)&&e.isConnected,hG=e=>{for(const t in e)if(ul(e[t]))return!0;return!1};function sj(e,t={}){const r=Array.isArray(e);if(An(e)||r)for(const n in e)Array.isArray(e[n])||An(e[n])&&!hG(e[n])?(t[n]=Array.isArray(e[n])?[]:{},sj(e[n],t[n])):zs(e[n])||(t[n]=!0);return t}function mG(e,t,r){const n=Array.isArray(e);if(An(e)||n)for(const a in e)Array.isArray(e[a])||An(e[a])&&!hG(e[a])?yn(t)||kT(r[a])?r[a]=Array.isArray(e[a])?sj(e[a],[]):{...sj(e[a])}:mG(e[a],zs(t)?{}:t[a],r[a]):r[a]=!pc(e[a],t[a]);return r}var hp=(e,t)=>mG(e,t,sj(t)),pG=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>yn(e)?e:t?e===""?NaN:e&&+e:r&&So(e)?new Date(e):n?n(e):e;function US(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return F2(t)?t.files:B2(t)?uG(e.refs).value:fG(t)?[...t.selectedOptions].map(({value:r})=>r):Ov(t)?dG(e.refs).value:pG(yn(t.value)?e.ref.value:t.value,e)}var _ve=(e,t,r,n)=>{const a={};for(const i of e){const o=He(t,i);o&&jr(a,i,o._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:n}},mp=e=>yn(e)?e:nj(e)?e.source:An(e)?nj(e.value)?e.value.source:e.value:e;const I4="AsyncFunction";var Pve=e=>(!e||!e.validate)&&!!(ul(e.validate)&&e.validate.constructor.name===I4||An(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===I4)),Eve=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function R4(e,t,r){const n=He(e,r);if(n||$2(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const i=a.join("."),o=He(t,i),l=He(e,i);if(o&&!Array.isArray(o)&&r!==i)return{name:r};if(l&&l.type)return{name:i,error:l};a.pop()}return{name:r}}var Ove=(e,t,r,n,a)=>a.isOnAll?!1:!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:(r?n.isOnChange:a.isOnChange)?e:!0,Ave=(e,t)=>!pN(He(e,t)).length&&Wn(e,t);const Dve={mode:Ai.onSubmit,reValidateMode:Ai.onChange,shouldFocusError:!0};function Mve(e={}){let t={...Dve,...e},r={submitCount:0,isDirty:!1,isLoading:ul(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},n={},a=An(t.defaultValues)||An(t.values)?la(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:la(a),o={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:FS(),array:FS(),state:FS()},h=_4(t.mode),m=_4(t.reValidateMode),g=t.criteriaMode===Ai.all,x=Y=>J=>{clearTimeout(d),d=setTimeout(Y,J)},v=async Y=>{if(!e.disabled&&(u.isValid||Y)){const J=t.resolver?ua((await T()).errors):await E(n,!0);J!==r.isValid&&f.state.next({isValid:J})}},b=(Y,J)=>{!e.disabled&&(u.isValidating||u.validatingFields)&&((Y||Array.from(l.mount)).forEach(le=>{le&&(J?jr(r.validatingFields,le,J):Wn(r.validatingFields,le))}),f.state.next({validatingFields:r.validatingFields,isValidating:!ua(r.validatingFields)}))},y=(Y,J=[],le,Le,L=!0,he=!0)=>{if(Le&&le&&!e.disabled){if(o.action=!0,he&&Array.isArray(He(n,Y))){const Me=le(He(n,Y),Le.argA,Le.argB);L&&jr(n,Y,Me)}if(he&&Array.isArray(He(r.errors,Y))){const Me=le(He(r.errors,Y),Le.argA,Le.argB);L&&jr(r.errors,Y,Me),Ave(r.errors,Y)}if(u.touchedFields&&he&&Array.isArray(He(r.touchedFields,Y))){const Me=le(He(r.touchedFields,Y),Le.argA,Le.argB);L&&jr(r.touchedFields,Y,Me)}u.dirtyFields&&(r.dirtyFields=hp(a,i)),f.state.next({name:Y,isDirty:_(Y,J),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else jr(i,Y,J)},j=(Y,J)=>{jr(r.errors,Y,J),f.state.next({errors:r.errors})},w=Y=>{r.errors=Y,f.state.next({errors:r.errors,isValid:!1})},N=(Y,J,le,Le)=>{const L=He(n,Y);if(L){const he=He(i,Y,yn(le)?He(a,Y):le);yn(he)||Le&&Le.defaultChecked||J?jr(i,Y,J?he:US(L._f)):H(Y,he),o.mount&&v()}},S=(Y,J,le,Le,L)=>{let he=!1,Me=!1;const Ne={name:Y};if(!e.disabled){const Re=!!(He(n,Y)&&He(n,Y)._f&&He(n,Y)._f.disabled);if(!le||Le){u.isDirty&&(Me=r.isDirty,r.isDirty=Ne.isDirty=_(),he=Me!==Ne.isDirty);const or=Re||pc(He(a,Y),J);Me=!!(!Re&&He(r.dirtyFields,Y)),or||Re?Wn(r.dirtyFields,Y):jr(r.dirtyFields,Y,!0),Ne.dirtyFields=r.dirtyFields,he=he||u.dirtyFields&&Me!==!or}if(le){const or=He(r.touchedFields,Y);or||(jr(r.touchedFields,Y,le),Ne.touchedFields=r.touchedFields,he=he||u.touchedFields&&or!==le)}he&&L&&f.state.next(Ne)}return he?Ne:{}},k=(Y,J,le,Le)=>{const L=He(r.errors,Y),he=u.isValid&&Ja(J)&&r.isValid!==J;if(e.delayError&&le?(c=x(()=>j(Y,le)),c(e.delayError)):(clearTimeout(d),c=null,le?jr(r.errors,Y,le):Wn(r.errors,Y)),(le?!pc(L,le):L)||!ua(Le)||he){const Me={...Le,...he&&Ja(J)?{isValid:J}:{},errors:r.errors,name:Y};r={...r,...Me},f.state.next(Me)}},T=async Y=>{b(Y,!0);const J=await t.resolver(i,t.context,_ve(Y||l.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(Y),J},C=async Y=>{const{errors:J}=await T(Y);if(Y)for(const le of Y){const Le=He(J,le);Le?jr(r.errors,le,Le):Wn(r.errors,le)}else r.errors=J;return J},E=async(Y,J,le={valid:!0})=>{for(const Le in Y){const L=Y[Le];if(L){const{_f:he,...Me}=L;if(he){const Ne=l.array.has(he.name),Re=L._f&&Pve(L._f);Re&&u.validatingFields&&b([Le],!0);const or=await M4(L,i,g,t.shouldUseNativeValidation&&!J,Ne);if(Re&&u.validatingFields&&b([Le]),or[he.name]&&(le.valid=!1,J))break;!J&&(He(or,he.name)?Ne?Sve(r.errors,or,he.name):jr(r.errors,he.name,or[he.name]):Wn(r.errors,he.name))}!ua(Me)&&await E(Me,J,le)}}return le.valid},P=()=>{for(const Y of l.unMount){const J=He(n,Y);J&&(J._f.refs?J._f.refs.every(le=>!BS(le)):!BS(J._f.ref))&&G(Y)}l.unMount=new Set},_=(Y,J)=>!e.disabled&&(Y&&J&&jr(i,Y,J),!pc(se(),a)),I=(Y,J,le)=>lG(Y,l,{...o.mount?i:yn(J)?a:So(Y)?{[Y]:J}:J},le,J),F=Y=>pN(He(o.mount?i:a,Y,e.shouldUnregister?He(a,Y,[]):[])),H=(Y,J,le={})=>{const Le=He(n,Y);let L=J;if(Le){const he=Le._f;he&&(!he.disabled&&jr(i,Y,pG(J,he)),L=rj(he.ref)&&zs(J)?"":J,fG(he.ref)?[...he.ref.options].forEach(Me=>Me.selected=L.includes(Me.value)):he.refs?Ov(he.ref)?he.refs.length>1?he.refs.forEach(Me=>(!Me.defaultChecked||!Me.disabled)&&(Me.checked=Array.isArray(L)?!!L.find(Ne=>Ne===Me.value):L===Me.value)):he.refs[0]&&(he.refs[0].checked=!!L):he.refs.forEach(Me=>Me.checked=Me.value===L):F2(he.ref)?he.ref.value="":(he.ref.value=L,he.ref.type||f.values.next({name:Y,values:{...i}})))}(le.shouldDirty||le.shouldTouch)&&S(Y,L,le.shouldTouch,le.shouldDirty,!0),le.shouldValidate&&V(Y)},W=(Y,J,le)=>{for(const Le in J){const L=J[Le],he=`${Y}.${Le}`,Me=He(n,he);(l.array.has(Y)||An(L)||Me&&!Me._f)&&!Id(L)?W(he,L,le):H(he,L,le)}},z=(Y,J,le={})=>{const Le=He(n,Y),L=l.array.has(Y),he=la(J);jr(i,Y,he),L?(f.array.next({name:Y,values:{...i}}),(u.isDirty||u.dirtyFields)&&le.shouldDirty&&f.state.next({name:Y,dirtyFields:hp(a,i),isDirty:_(Y,he)})):Le&&!Le._f&&!zs(he)?W(Y,he,le):H(Y,he,le),P4(Y,l)&&f.state.next({...r}),f.values.next({name:o.mount?Y:void 0,values:{...i}})},R=async Y=>{o.mount=!0;const J=Y.target;let le=J.name,Le=!0;const L=He(n,le),he=()=>J.type?US(L._f):tG(Y),Me=Ne=>{Le=Number.isNaN(Ne)||Id(Ne)&&isNaN(Ne.getTime())||pc(Ne,He(i,le,Ne))};if(L){let Ne,Re;const or=he(),Jr=Y.type===tj.BLUR||Y.type===tj.FOCUS_OUT,be=!Eve(L._f)&&!t.resolver&&!He(r.errors,le)&&!L._f.deps||Ove(Jr,He(r.touchedFields,le),r.isSubmitted,m,h),it=P4(le,l,Jr);jr(i,le,or),Jr?(L._f.onBlur&&L._f.onBlur(Y),c&&c(0)):L._f.onChange&&L._f.onChange(Y);const vt=S(le,or,Jr,!1),In=!ua(vt)||it;if(!Jr&&f.values.next({name:le,type:Y.type,values:{...i}}),be)return u.isValid&&(e.mode==="onBlur"?Jr&&v():v()),In&&f.state.next({name:le,...it?{}:vt});if(!Jr&&it&&f.state.next({...r}),t.resolver){const{errors:Un}=await T([le]);if(Me(or),Le){const vs=R4(r.errors,n,le),ia=R4(Un,n,vs.name||le);Ne=ia.error,le=ia.name,Re=ua(Un)}}else b([le],!0),Ne=(await M4(L,i,g,t.shouldUseNativeValidation))[le],b([le]),Me(or),Le&&(Ne?Re=!1:u.isValid&&(Re=await E(n,!0)));Le&&(L._f.deps&&V(L._f.deps),k(le,Re,Ne,vt))}},q=(Y,J)=>{if(He(r.errors,J)&&Y.focus)return Y.focus(),1},V=async(Y,J={})=>{let le,Le;const L=cg(Y);if(t.resolver){const he=await C(yn(Y)?Y:L);le=ua(he),Le=Y?!L.some(Me=>He(he,Me)):le}else Y?(Le=(await Promise.all(L.map(async he=>{const Me=He(n,he);return await E(Me&&Me._f?{[he]:Me}:Me)}))).every(Boolean),!(!Le&&!r.isValid)&&v()):Le=le=await E(n);return f.state.next({...!So(Y)||u.isValid&&le!==r.isValid?{}:{name:Y},...t.resolver||!Y?{isValid:le}:{},errors:r.errors}),J.shouldFocus&&!Le&&dg(n,q,Y?L:l.mount),Le},se=Y=>{const J={...o.mount?i:a};return yn(Y)?J:So(Y)?He(J,Y):Y.map(le=>He(J,le))},oe=(Y,J)=>({invalid:!!He((J||r).errors,Y),isDirty:!!He((J||r).dirtyFields,Y),error:He((J||r).errors,Y),isValidating:!!He(r.validatingFields,Y),isTouched:!!He((J||r).touchedFields,Y)}),_e=Y=>{Y&&cg(Y).forEach(J=>Wn(r.errors,J)),f.state.next({errors:Y?r.errors:{}})},U=(Y,J,le)=>{const Le=(He(n,Y,{_f:{}})._f||{}).ref,L=He(r.errors,Y)||{},{ref:he,message:Me,type:Ne,...Re}=L;jr(r.errors,Y,{...Re,...J,ref:Le}),f.state.next({name:Y,errors:r.errors,isValid:!1}),le&&le.shouldFocus&&Le&&Le.focus&&Le.focus()},M=(Y,J)=>ul(Y)?f.values.subscribe({next:le=>Y(I(void 0,J),le)}):I(Y,J,!0),G=(Y,J={})=>{for(const le of Y?cg(Y):l.mount)l.mount.delete(le),l.array.delete(le),J.keepValue||(Wn(n,le),Wn(i,le)),!J.keepError&&Wn(r.errors,le),!J.keepDirty&&Wn(r.dirtyFields,le),!J.keepTouched&&Wn(r.touchedFields,le),!J.keepIsValidating&&Wn(r.validatingFields,le),!t.shouldUnregister&&!J.keepDefaultValue&&Wn(a,le);f.values.next({values:{...i}}),f.state.next({...r,...J.keepDirty?{isDirty:_()}:{}}),!J.keepIsValid&&v()},K=({disabled:Y,name:J,field:le,fields:Le,value:L})=>{if(Ja(Y)&&o.mount||Y){const he=Y?void 0:yn(L)?US(le?le._f:He(Le,J)._f):L;jr(i,J,he),S(J,he,!1,!1,!0)}},je=(Y,J={})=>{let le=He(n,Y);const Le=Ja(J.disabled)||Ja(e.disabled);return jr(n,Y,{...le||{},_f:{...le&&le._f?le._f:{ref:{name:Y}},name:Y,mount:!0,...J}}),l.mount.add(Y),le?K({field:le,disabled:Ja(J.disabled)?J.disabled:e.disabled,name:Y,value:J.value}):N(Y,!0,J.value),{...Le?{disabled:J.disabled||e.disabled}:{},...t.progressive?{required:!!J.required,min:mp(J.min),max:mp(J.max),minLength:mp(J.minLength),maxLength:mp(J.maxLength),pattern:mp(J.pattern)}:{},name:Y,onChange:R,onBlur:R,ref:L=>{if(L){je(Y,J),le=He(n,Y);const he=yn(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,Me=Tve(he),Ne=le._f.refs||[];if(Me?Ne.find(Re=>Re===he):he===le._f.ref)return;jr(n,Y,{_f:{...le._f,...Me?{refs:[...Ne.filter(BS),he,...Array.isArray(He(a,Y))?[{}]:[]],ref:{type:he.type,name:Y}}:{ref:he}}}),N(Y,!1,void 0,he)}else le=He(n,Y,{}),le._f&&(le._f.mount=!1),(t.shouldUnregister||J.shouldUnregister)&&!(rG(l.array,Y)&&o.action)&&l.unMount.add(Y)}}},ae=()=>t.shouldFocusError&&dg(n,q,l.mount),de=Y=>{Ja(Y)&&(f.state.next({disabled:Y}),dg(n,(J,le)=>{const Le=He(n,le);Le&&(J.disabled=Le._f.disabled||Y,Array.isArray(Le._f.refs)&&Le._f.refs.forEach(L=>{L.disabled=Le._f.disabled||Y}))},0,!1))},Ce=(Y,J)=>async le=>{let Le;le&&(le.preventDefault&&le.preventDefault(),le.persist&&le.persist());let L=la(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:he,values:Me}=await T();r.errors=he,L=Me}else await E(n);if(Wn(r.errors,"root"),ua(r.errors)){f.state.next({errors:{}});try{await Y(L,le)}catch(he){Le=he}}else J&&await J({...r.errors},le),ae(),setTimeout(ae);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ua(r.errors)&&!Le,submitCount:r.submitCount+1,errors:r.errors}),Le)throw Le},B=(Y,J={})=>{He(n,Y)&&(yn(J.defaultValue)?z(Y,la(He(a,Y))):(z(Y,J.defaultValue),jr(a,Y,la(J.defaultValue))),J.keepTouched||Wn(r.touchedFields,Y),J.keepDirty||(Wn(r.dirtyFields,Y),r.isDirty=J.defaultValue?_(Y,la(He(a,Y))):_()),J.keepError||(Wn(r.errors,Y),u.isValid&&v()),f.state.next({...r}))},me=(Y,J={})=>{const le=Y?la(Y):a,Le=la(le),L=ua(Y),he=L?a:Le;if(J.keepDefaultValues||(a=le),!J.keepValues){if(J.keepDirtyValues){const Me=new Set([...l.mount,...Object.keys(hp(a,i))]);for(const Ne of Array.from(Me))He(r.dirtyFields,Ne)?jr(he,Ne,He(i,Ne)):z(Ne,He(he,Ne))}else{if(R2&&yn(Y))for(const Me of l.mount){const Ne=He(n,Me);if(Ne&&Ne._f){const Re=Array.isArray(Ne._f.refs)?Ne._f.refs[0]:Ne._f.ref;if(rj(Re)){const or=Re.closest("form");if(or){or.reset();break}}}}n={}}i=e.shouldUnregister?J.keepDefaultValues?la(a):{}:la(he),f.array.next({values:{...he}}),f.values.next({values:{...he}})}l={mount:J.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!J.keepIsValid||!!J.keepDirtyValues,o.watch=!!e.shouldUnregister,f.state.next({submitCount:J.keepSubmitCount?r.submitCount:0,isDirty:L?!1:J.keepDirty?r.isDirty:!!(J.keepDefaultValues&&!pc(Y,a)),isSubmitted:J.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:L?{}:J.keepDirtyValues?J.keepDefaultValues&&i?hp(a,i):r.dirtyFields:J.keepDefaultValues&&Y?hp(a,Y):J.keepDirty?r.dirtyFields:{},touchedFields:J.keepTouched?r.touchedFields:{},errors:J.keepErrors?r.errors:{},isSubmitSuccessful:J.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},ne=(Y,J)=>me(ul(Y)?Y(i):Y,J);return{control:{register:je,unregister:G,getFieldState:oe,handleSubmit:Ce,setError:U,_executeSchema:T,_getWatch:I,_getDirty:_,_updateValid:v,_removeUnmounted:P,_updateFieldArray:y,_updateDisabledField:K,_getFieldArray:F,_reset:me,_resetDefaultValues:()=>ul(t.defaultValues)&&t.defaultValues().then(Y=>{ne(Y,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:Y=>{r={...r,...Y}},_disableForm:de,_subjects:f,_proxyFormState:u,_setErrors:w,get _fields(){return n},get _formValues(){return i},get _state(){return o},set _state(Y){o=Y},get _defaultValues(){return a},get _names(){return l},set _names(Y){l=Y},get _formState(){return r},set _formState(Y){r=Y},get _options(){return t},set _options(Y){t={...t,...Y}}},trigger:V,register:je,handleSubmit:Ce,watch:M,setValue:z,getValues:se,reset:ne,resetField:B,clearErrors:_e,unregister:G,setError:U,setFocus:(Y,J={})=>{const le=He(n,Y),Le=le&&le._f;if(Le){const L=Le.refs?Le.refs[0]:Le.ref;L.focus&&(L.focus(),J.shouldSelect&&L.select())}},getFieldState:oe}}function Lu(e={}){const t=O.useRef(),r=O.useRef(),[n,a]=O.useState({isDirty:!1,isValidating:!1,isLoading:ul(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ul(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Mve(e),formState:n});const i=t.current.control;return i._options=e,L2({subject:i._subjects.state,next:o=>{iG(o,i._proxyFormState,i._updateFormState,!0)&&a({...i._formState})}}),O.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),O.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==n.isDirty&&i._subjects.state.next({isDirty:o})}},[i,n.isDirty]),O.useEffect(()=>{e.values&&!pc(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values,a(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),O.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),O.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),O.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),O.useEffect(()=>{t.current&&(t.current.watch=t.current.watch.bind({}))},[n]),t.current.formState=aG(n,i),t.current}const $4=(e,t,r)=>{if(e&&"reportValidity"in e){const n=He(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},gG=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?$4(n.ref,r,e):n.refs&&n.refs.forEach(a=>$4(a,r,e))}},Ive=(e,t)=>{t.shouldUseNativeValidation&&gG(e,t);const r={};for(const n in e){const a=He(t.fields,n),i=Object.assign(e[n]||{},{ref:a&&a.ref});if(Rve(t.names||Object.keys(e),n)){const o=Object.assign({},He(r,n));jr(o,"root",i),jr(r,n,o)}else jr(r,n,i)}return r},Rve=(e,t)=>e.some(r=>r.startsWith(t+"."));var $ve=function(e,t){for(var r={};e.length;){var n=e[0],a=n.code,i=n.message,o=n.path.join(".");if(!r[o])if("unionErrors"in n){var l=n.unionErrors[0].errors[0];r[o]={message:l.message,type:l.code}}else r[o]={message:i,type:a};if("unionErrors"in n&&n.unionErrors.forEach(function(u){return u.errors.forEach(function(f){return e.push(f)})}),t){var c=r[o].types,d=c&&c[n.code];r[o]=cG(o,t,r,a,d?[].concat(d,n.message):n.message)}e.shift()}return r},_m=function(e,t,r){return r===void 0&&(r={}),function(n,a,i){try{return Promise.resolve(function(o,l){try{var c=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(d){return i.shouldUseNativeValidation&&gG({},i),{errors:{},values:r.raw?n:d}})}catch(d){return l(d)}return c&&c.then?c.then(void 0,l):c}(0,function(o){if(function(l){return Array.isArray(l==null?void 0:l.errors)}(o))return{values:{},errors:Ive($ve(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}};function Rt(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 Lr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function bn(e,t){const r=Rt(e);return isNaN(t)?Lr(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Wa(e,t){const r=Rt(e);
671if(isNaN(t))return Lr(e,NaN);if(!t)return r;const n=r.getDate(),a=Lr(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return n>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),n),r)}function Lve(e,t){const r=+Rt(e);return Lr(e,r+t)}const U2=6048e5,Fve=864e5,xN=6e4,z2=36e5,Bve=1e3;let Uve={};function Fu(){return Uve}function Ms(e,t){var l,c,d,u;const r=Fu(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,a=Rt(e),i=a.getDay(),o=(i<n?7:0)+i-n;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function $l(e){return Ms(e,{weekStartsOn:1})}function xG(e){const t=Rt(e),r=t.getFullYear(),n=Lr(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const a=$l(n),i=Lr(e,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const o=$l(i);return t.getTime()>=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function Hs(e){const t=Rt(e);return t.setHours(0,0,0,0),t}function Dh(e){const t=Rt(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function ko(e,t){const r=Hs(e),n=Hs(t),a=+r-Dh(r),i=+n-Dh(n);return Math.round((a-i)/Fve)}function zve(e){const t=xG(e),r=Lr(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),$l(r)}function Wve(e,t){return Lve(e,t*xN)}function CT(e,t){const r=t*7;return bn(e,r)}function Vve(e,t){return Wa(e,t*12)}function Hve(e){let t;return e.forEach(function(r){const n=Rt(r);(t===void 0||t<n||isNaN(Number(n)))&&(t=n)}),t||new Date(NaN)}function qve(e){let t;return e.forEach(r=>{const n=Rt(r);(!t||t>n||isNaN(+n))&&(t=n)}),t||new Date(NaN)}function Zn(e,t){const r=Hs(e),n=Hs(t);return+r==+n}function W2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Yve(e){if(!W2(e)&&typeof e!="number")return!1;const t=Rt(e);return!isNaN(Number(t))}function ux(e,t){const r=Rt(e),n=Rt(t),a=r.getFullYear()-n.getFullYear(),i=r.getMonth()-n.getMonth();return a*12+i}function Gve(e,t,r){const n=Ms(e,r),a=Ms(t,r),i=+n-Dh(n),o=+a-Dh(a);return Math.round((i-o)/U2)}function V2(e){const t=Rt(e);return t.setHours(23,59,59,999),t}function Av(e){const t=Rt(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function Kve(e,t){const r=Rt(e.start),n=Rt(e.end);let a=+r>+n;const i=a?+r:+n,o=a?n:r;o.setHours(0,0,0,0);let l=1;const c=[];for(;+o<=i;)c.push(Rt(o)),o.setDate(o.getDate()+l),o.setHours(0,0,0,0);return a?c.reverse():c}function Ps(e){const t=Rt(e);return t.setDate(1),t.setHours(0,0,0,0),t}function vG(e){const t=Rt(e),r=Lr(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Dv(e,t){var l,c,d,u;const r=Fu(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,a=Rt(e),i=a.getDay(),o=(i<n?-7:0)+6-(i-n);return a.setDate(a.getDate()+o),a.setHours(23,59,59,999),a}function yG(e){return Dv(e,{weekStartsOn:1})}const Qve={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"}},Zve=(e,t,r)=>{let n;const a=Qve[e];
vendor: 12,839 bytes, line 671
671return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function zS(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Xve={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Jve={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},eye={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tye={date:zS({formats:Xve,defaultWidth:"full"}),time:zS({formats:Jve,defaultWidth:"full"}),dateTime:zS({formats:eye,defaultWidth:"full"})},rye={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nye=(e,t,r,n)=>rye[e];function pp(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):o;a=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const sye={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},aye={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},iye={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"]},oye={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","Friday","Saturday"]},lye={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"}},cye={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"}},dye=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},uye={ordinalNumber:dye,era:pp({values:sye,defaultWidth:"wide"}),quarter:pp({values:aye,defaultWidth:"wide",argumentCallback:e=>e-1}),month:pp({values:iye,defaultWidth:"wide"}),day:pp({values:oye,defaultWidth:"wide"}),dayPeriod:pp({values:lye,defaultWidth:"wide",formattingValues:cye,defaultFormattingWidth:"wide"})};function gp(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?hye(l,f=>f.test(o)):fye(l,f=>f.test(o));let d;d=e.valueCallback?e.valueCallback(c):c,d=r.valueCallback?r.valueCallback(d):d;const u=t.slice(o.length);return{value:d,rest:u}}}function fye(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function hye(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function mye(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;const l=t.slice(a.length);return{value:o,rest:l}}}const pye=/^(\d+)(th|st|nd|rd)?/i,gye=/\d+/i,xye={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},vye={any:[/^b/i,/^(a|c)/i]},yye={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bye={any:[/1/i,/2/i,/3/i,/4/i]},jye={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},wye={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]},Nye={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},Sye={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]},kye={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},Cye={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}},Tye={ordinalNumber:mye({matchPattern:pye,parsePattern:gye,valueCallback:e=>parseInt(e,10)}),era:gp({matchPatterns:xye,defaultMatchWidth:"wide",parsePatterns:vye,defaultParseWidth:"any"}),quarter:gp({matchPatterns:yye,defaultMatchWidth:"wide",parsePatterns:bye,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gp({matchPatterns:jye,defaultMatchWidth:"wide",parsePatterns:wye,defaultParseWidth:"any"}),day:gp({matchPatterns:Nye,defaultMatchWidth:"wide",parsePatterns:Sye,defaultParseWidth:"any"}),dayPeriod:gp({matchPatterns:kye,defaultMatchWidth:"any",parsePatterns:Cye,defaultParseWidth:"any"})},H2={code:"en-US",formatDistance:Zve,formatLong:tye,formatRelative:nye,localize:uye,match:Tye,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _ye(e){const t=Rt(e);return ko(t,vG(t))+1}function q2(e){const t=Rt(e),r=+$l(t)-+zve(t);return Math.round(r/U2)+1}function Y2(e,t){var u,f,h,m;const r=Rt(e),n=r.getFullYear(),a=Fu(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(h=a.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,o=Lr(e,0);o.setFullYear(n+1,0,i),o.setHours(0,0,0,0);const l=Ms(o,t),c=Lr(e,0);c.setFullYear(n,0,i),c.setHours(0,0,0,0);const d=Ms(c,t);return r.getTime()>=l.getTime()?n+1:r.getTime()>=d.getTime()?n:n-1}function Pye(e,t){var l,c,d,u;const r=Fu(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,a=Y2(e,t),i=Lr(e,0);return i.setFullYear(a,0,n),i.setHours(0,0,0,0),Ms(i,t)}function G2(e,t){const r=Rt(e),n=+Ms(r,t)-+Pye(r,t);return Math.round(n/U2)+1}function Tr(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const nc={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return Tr(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):Tr(r+1,2)},d(e,t){return Tr(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Tr(e.getHours()%12||12,t.length)},H(e,t){return Tr(e.getHours(),t.length)},m(e,t){return Tr(e.getMinutes(),t.length)},s(e,t){return Tr(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return Tr(a,t.length)}},Zu={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},L4={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return nc.y(e,t)},Y:function(e,t,r,n){const a=Y2(e,n),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return Tr(o,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):Tr(i,t.length)},R:function(e,t){const r=xG(e);return Tr(r,t.length)},u:function(e,t){const r=e.getFullYear();return Tr(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Tr(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Tr(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return nc.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return Tr(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=G2(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):Tr(a,t.length)},I:function(e,t,r){const n=q2(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):Tr(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):nc.d(e,t)},D:function(e,t,r){const n=_ye(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):Tr(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Tr(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Tr(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return Tr(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=Zu.noon:n===0?a=Zu.midnight:a=n/12>
vendor: 4,386 bytes, line 671
671=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=Zu.evening:n>=12?a=Zu.afternoon:n>=4?a=Zu.morning:a=Zu.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return nc.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):nc.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):Tr(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):Tr(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):nc.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):nc.s(e,t)},S:function(e,t){return nc.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return B4(n);case"XXXX":case"XX":return Sd(n);case"XXXXX":case"XXX":default:return Sd(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return B4(n);case"xxxx":case"xx":return Sd(n);case"xxxxx":case"xxx":default:return Sd(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+F4(n,":");case"OOOO":default:return"GMT"+Sd(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+F4(n,":");case"zzzz":default:return"GMT"+Sd(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return Tr(n,t.length)},T:function(e,t,r){const n=e.getTime();return Tr(n,t.length)}};function F4(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return i===0?r+String(a):r+String(a)+t+Tr(i,2)}function B4(e,t){return e%60===0?(e>0?"-":"+")+Tr(Math.abs(e)/60,2):Sd(e,t)}function Sd(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Tr(Math.trunc(n/60),2),i=Tr(n%60,2);return r+a+t+i}const U4=(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"})}},bG=(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"})}},Eye=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return U4(e,t);let i;switch(n){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}}",U4(n,t)).replace("{{time}}",bG(a,t))},TT={p:bG,P:Eye},Oye=/^D+$/,Aye=/^Y+$/,Dye=["D","DD","YY","YYYY"];function jG(e){return Oye.test(e)}function wG(e){return Aye.test(e)}function _T(e,t,r){const n=Mye(e,t,r);if(console.warn(n),Dye.includes(e))throw new RangeError(n)}function Mye(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Iye=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rye=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$ye=/^'([^]*?)'?$/,Lye=/''/g,Fye=/[a-zA-Z]/;function pt(e,t,r){var u,f,h,m,g,x,v,b;const n=Fu(),a=(r==null?void 0:r.locale)??n.locale??H2,i=(r==null?void 0:r.firstWeekContainsDate)??((f=(u=r==null?void 0:r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,o=(r==null?void 0:r.weekStartsOn)??((x=(g=r==null?void 0:r.locale)==null?void 0:g.options)==null?void 0:x.weekStartsOn)??n.weekStartsOn??((b=(v=n.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,l=Rt(e);
vendor: 32,138 bytes, line 671
671if(!Yve(l))throw new RangeError("Invalid time value");let c=t.match(Rye).map(y=>{const j=y[0];if(j==="p"||j==="P"){const w=TT[j];return w(y,a.formatLong)}return y}).join("").match(Iye).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const j=y[0];if(j==="'")return{isToken:!1,value:Bye(y)};if(L4[j])return{isToken:!0,value:y};if(j.match(Fye))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return{isToken:!1,value:y}});a.localize.preprocessor&&(c=a.localize.preprocessor(l,c));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return c.map(y=>{if(!y.isToken)return y.value;const j=y.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&wG(j)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&jG(j))&&_T(j,t,String(e));const w=L4[j[0]];return w(l,j,a.localize,d)}).join("")}function Bye(e){const t=e.match($ye);return t?t[1].replace(Lye,"'"):e}function Uye(e){return Rt(e).getDate()}function zye(e){return Rt(e).getDay()}function Wye(e){const t=Rt(e),r=t.getFullYear(),n=t.getMonth(),a=Lr(e,0);return a.setFullYear(r,n+1,0),a.setHours(0,0,0,0),a.getDate()}function Vye(){return Object.assign({},Fu())}function Hye(e){let r=Rt(e).getDay();return r===0&&(r=7),r}function qye(e){return Math.trunc(+Rt(e)/1e3)}function Yye(e){const t=Rt(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function Gye(e,t){return Gve(Yye(e),Ps(e),t)+1}function Bc(e,t){const r=Rt(e),n=Rt(t);return r.getTime()>n.getTime()}function wu(e,t){const r=Rt(e),n=Rt(t);return+r<+n}function WS(e,t){const r=Rt(e),n=Rt(t);return+r==+n}function Kye(e,t){const r=t instanceof Date?Lr(t,0):new t(0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),r}const Qye=10;let NG=class{constructor(){$(this,"subPriority",0)}validate(t,r){return!0}},Zye=class extends NG{constructor(t,r,n,a,i){super(),this.value=t,this.validateValue=r,this.setValue=n,this.priority=a,i&&(this.subPriority=i)}validate(t,r){return this.validateValue(t,this.value,r)}set(t,r,n){return this.setValue(t,r,this.value,n)}};class Xye extends NG{constructor(){super(...arguments);$(this,"priority",Qye);$(this,"subPriority",-1)}set(r,n){return n.timestampIsSet?r:Lr(r,Kye(r,Date))}}let yr=class{run(t,r,n,a){const i=this.parse(t,r,n,a);return i?{setter:new Zye(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,r,n){return!0}},Jye=class extends yr{constructor(){super(...arguments);$(this,"priority",140);$(this,"incompatibleTokens",["R","u","t","T"])}parse(r,n,a){switch(n){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"})||a.era(r,{width:"narrow"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})||a.era(r,{width:"abbreviated"})||a.era(r,{width:"narrow"})}}set(r,n,a){return n.era=a,r.setFullYear(a,0,1),r.setHours(0,0,0,0),r}};const _n={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},mo={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Pn(e,t){return e&&{value:t(e.value),rest:e.rest}}function fn(e,t){const r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function po(e,t){const r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};const n=r[1]==="+"?1:-1,a=r[2]?parseInt(r[2],10):0,i=r[3]?parseInt(r[3],10):0,o=r[5]?parseInt(r[5],10):0;return{value:n*(a*z2+i*xN+o*Bve),rest:t.slice(r[0].length)}}function SG(e){return fn(_n.anyDigitsSigned,e)}function Sn(e,t){switch(e){case 1:return fn(_n.singleDigit,t);case 2:return fn(_n.twoDigits,t);case 3:return fn(_n.threeDigits,t);case 4:return fn(_n.fourDigits,t);default:return fn(new RegExp("^\\d{1,"+e+"}"),t)}}function aj(e,t){switch(e){case 1:return fn(_n.singleDigitSigned,t);case 2:return fn(_n.twoDigitsSigned,t);case 3:return fn(_n.threeDigitsSigned,t);case 4:return fn(_n.fourDigitsSigned,t);default:return fn(new RegExp("^-?\\d{1,"+e+"}"),t)}}function K2(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function kG(e,t){const r=t>0,n=r?t:1-t;let a;if(n<=50)a=e||100;else{const i=n+50,o=Math.trunc(i/100)*100,l=e>=i%100;a=e+o-(l?100:0)}return r?a:1-a}function CG(e){return e%400===0||e%4===0&&e%100!==0}let ebe=class extends yr{constructor(){super(...arguments);$(this,"priority",130);$(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(r,n,a){const i=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return Pn(Sn(4,r),i);case"yo":return Pn(a.ordinalNumber(r,{unit:"year"}),i);default:return Pn(Sn(n.length,r),i)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,a){const i=r.getFullYear();if(a.isTwoDigitYear){const l=kG(a.year,i);return r.setFullYear(l,0,1),r.setHours(0,0,0,0),r}const o=!("era"in n)||n.era===1?a.year:1-a.year;return r.setFullYear(o,0,1),r.setHours(0,0,0,0),r}},tbe=class extends yr{constructor(){super(...arguments);$(this,"priority",130);$(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(r,n,a){const i=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Pn(Sn(4,r),i);case"Yo":return Pn(a.ordinalNumber(r,{unit:"year"}),i);default:return Pn(Sn(n.length,r),i)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,a,i){const o=Y2(r,i);if(a.isTwoDigitYear){const c=kG(a.year,o);return r.setFullYear(c,0,i.firstWeekContainsDate),r.setHours(0,0,0,0),Ms(r,i)}const l=!("era"in n)||n.era===1?a.year:1-a.year;return r.setFullYear(l,0,i.firstWeekContainsDate),r.setHours(0,0,0,0),Ms(r,i)}},rbe=class extends yr{constructor(){super(...arguments);$(this,"priority",130);$(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(r,n){return aj(n==="R"?4:n.length,r)}set(r,n,a){const i=Lr(r,0);return i.setFullYear(a,0,4),i.setHours(0,0,0,0),$l(i)}},nbe=class extends yr{constructor(){super(...arguments);$(this,"priority",130);$(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(r,n){return aj(n==="u"?4:n.length,r)}set(r,n,a){return r.setFullYear(a,0,1),r.setHours(0,0,0,0),r}},sbe=class extends yr{constructor(){super(...arguments);$(this,"priority",120);$(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"Q":case"QQ":return Sn(n.length,r);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"})||a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})||a.quarter(r,{width:"abbreviated",context:"formatting"})||a.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=1&&n<=4}set(r,n,a){return r.setMonth((a-1)*3,1),r.setHours(0,0,0,0),r}},abe=class extends yr{constructor(){super(...arguments);$(this,"priority",120);$(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"q":case"qq":return Sn(n.length,r);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"})||a.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})||a.quarter(r,{width:"abbreviated",context:"standalone"})||a.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=1&&n<=4}set(r,n,a){return r.setMonth((a-1)*3,1),r.setHours(0,0,0,0),r}},ibe=class extends yr{constructor(){super(...arguments);$(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);$(this,"priority",110)}parse(r,n,a){const i=o=>o-1;switch(n){case"M":return Pn(fn(_n.month,r),i);case"MM":return Pn(Sn(2,r),i);case"Mo":return Pn(a.ordinalNumber(r,{unit:"month"}),i);case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"})||a.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})||a.month(r,{width:"abbreviated",context:"formatting"})||a.month(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=11}set(r,n,a){return r.setMonth(a,1),r.setHours(0,0,0,0),r}},obe=class extends yr{constructor(){super(...arguments);$(this,"priority",110);$(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(r,n,a){const i=o=>o-1;switch(n){case"L":return Pn(fn(_n.month,r),i);case"LL":return Pn(Sn(2,r),i);case"Lo":return Pn(a.ordinalNumber(r,{unit:"month"}),i);case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"})||a.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})||a.month(r,{width:"abbreviated",context:"standalone"})||a.month(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=11}set(r,n,a){return r.setMonth(a,1),r.setHours(0,0,0,0),r}};function lbe(e,t,r){const n=Rt(e),a=G2(n,r)-t;return n.setDate(n.getDate()-a*7),n}let cbe=class extends yr{constructor(){super(...arguments);$(this,"priority",100);$(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(r,n,a){switch(n){case"w":return fn(_n.week,r);case"wo":return a.ordinalNumber(r,{unit:"week"});default:return Sn(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,a,i){return Ms(lbe(r,a,i),i)}};function dbe(e,t){const r=Rt(e),n=q2(r)-t;return r.setDate(r.getDate()-n*7),r}let ube=class extends yr{constructor(){super(...arguments);$(this,"priority",100);$(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(r,n,a){switch(n){case"I":return fn(_n.week,r);case"Io":return a.ordinalNumber(r,{unit:"week"});default:return Sn(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,a){return $l(dbe(r,a))}};const fbe=[31,28,31,30,31,30,31,31,30,31,30,31],hbe=[31,29,31,30,31,30,31,31,30,31,30,31];let mbe=class extends yr{constructor(){super(...arguments);$(this,"priority",90);$(this,"subPriority",1);$(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"d":return fn(_n.date,r);case"do":return a.ordinalNumber(r,{unit:"date"});default:return Sn(n.length,r)}}validate(r,n){const a=r.getFullYear(),i=CG(a),o=r.getMonth();return i?n>=1&&n<=hbe[o]:n>=1&&n<=fbe[o]}set(r,n,a){return r.setDate(a),r.setHours(0,0,0,0),r}},pbe=class extends yr{constructor(){super(...arguments);$(this,"priority",90);$(this,"subpriority",1);$(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(r,n,a){switch(n){case"D":case"DD":return fn(_n.dayOfYear,r);case"Do":return a.ordinalNumber(r,{unit:"date"});default:return Sn(n.length,r)}}validate(r,n){const a=r.getFullYear();return CG(a)?n>=1&&n<=366:n>=1&&n<=365}set(r,n,a){return r.setMonth(0,a),r.setHours(0,0,0,0),r}};function Q2(e,t,r){var f,h,m,g;const n=Fu(),a=(r==null?void 0:r.weekStartsOn)??((h=(f=r==null?void 0:r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??n.weekStartsOn??((g=(m=n.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,i=Rt(e),o=i.getDay(),c=(t%7+7)%7,d=7-a,u=t<0||t>6?t-(o+d)%7:(c+d)%7-(o+d)%7;return bn(i,u)}let gbe=class extends yr{constructor(){super(...arguments);$(this,"priority",90);$(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})||a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,a,i){return r=Q2(r,a,i),r.setHours(0,0,0,0),r}},xbe=class extends yr{constructor(){super(...arguments);$(this,"priority",90);$(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(r,n,a,i){const o=l=>{const c=Math.floor((l-1)/7)*7;return(l+i.weekStartsOn+6)%7+c};switch(n){case"e":case"ee":return Pn(Sn(n.length,r),o);case"eo":return Pn(a.ordinalNumber(r,{unit:"day"}),o);case"eee":return a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"eeeee":return a.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(r,{width:"wide",context:"formatting"})||a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,a,i){return r=Q2(r,a,i),r.setHours(0,0,0,0),r}},vbe=class extends yr{constructor(){super(...arguments);$(this,"priority",90);$(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(r,n,a,i){const o=l=>{const c=Math.floor((l-1)/7)*7;return(l+i.weekStartsOn+6)%7+c};switch(n){case"c":case"cc":return Pn(Sn(n.length,r),o);case"co":return Pn(a.ordinalNumber(r,{unit:"day"}),o);case"ccc":return a.day(r,{width:"abbreviated",context:"standalone"})||a.day(r,{width:"short",context:"standalone"})||a.day(r,{width:"narrow",context:"standalone"});case"ccccc":return a.day(r,{width:"narrow",context:"standalone"});case"cccccc":return a.day(r,{width:"short",context:"standalone"})||a.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(r,{width:"wide",context:"standalone"})||a.day(r,{width:"abbreviated",context:"standalone"})||a.day(r,{width:"short",context:"standalone"})||a.day(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=6}set(r,n,a,i){return r=Q2(r,a,i),r.setHours(0,0,0,0),r}};function ybe(e,t){const r=Rt(e),n=Hye(r),a=t-n;return bn(r,a)}let bbe=class extends yr{constructor(){super(...arguments);$(this,"priority",90);$(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(r,n,a){const i=o=>o===0?7:o;switch(n){case"i":case"ii":return Sn(n.length,r);case"io":return a.ordinalNumber(r,{unit:"day"});case"iii":return Pn(a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"}),i);case"iiiii":return Pn(a.day(r,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Pn(a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Pn(a.day(r,{width:"wide",context:"formatting"})||a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"}),i)}}validate(r,n){return n>=1&&n<=7}set(r,n,a){return r=ybe(r,a),r.setHours(0,0,0,0),r}},jbe=class extends yr{constructor(){super(...arguments);$(this,"priority",80);$(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(r,n,a){switch(n){case"a":case"aa":case"aaa":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})||a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,a){return r.setHours(K2(a),0,0,0),r}},wbe=class extends yr{constructor(){super(...arguments);$(this,"priority",80);$(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(r,n,a){switch(n){case"b":case"bb":case"bbb":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})||a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,a){return r.setHours(K2(a),0,0,0),r}},Nbe=class extends yr{constructor(){super(...arguments);$(this,"priority",80);$(this,"incompatibleTokens",["a","b","t","T"])}parse(r,n,a){switch(n){case"B":case"BB":case"BBB":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})||a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,a){return r.setHours(K2(a),0,0,0),r}},Sbe=class extends yr{constructor(){super(...arguments);$(this,"priority",70);$(this,"incompatibleTokens",["H","K","k","t","T"])}parse(r,n,a){switch(n){case"h":return fn(_n.hour12h,r);case"ho":return a.ordinalNumber(r,{unit:"hour"});default:return Sn(n.length,r)}}validate(r,n){return n>=1&&n<=12}set(r,n,a){const i=r.getHours()>=12;return i&&a<12?r.setHours(a+12,0,0,0):!i&&a===12?r.setHours(0,0,0,0):r.setHours(a,0,0,0),r}},kbe=class extends yr{constructor(){super(...arguments);$(this,"priority",70);$(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(r,n,a){switch(n){case"H":return fn(_n.hour23h,r);case"Ho":return a.ordinalNumber(r,{unit:"hour"});default:return Sn(n.length,r)}}validate(r,n){return n>=0&&n<=23}set(r,n,a){return r.setHours(a,0,0,0),r}},Cbe=class extends yr{constructor(){super(...arguments);$(this,"priority",70);$(this,"incompatibleTokens",["h","H","k","t","T"])}parse(r,n,a){switch(n){case"K":return fn(_n.hour11h,r);case"Ko":return a.ordinalNumber(r,{unit:"hour"});default:return Sn(n.length,r)}}validate(r,n){return n>=0&&n<=11}set(r,n,a){return r.getHours()>=12&&a<12?r.setHours(a+12,0,0,0):r.setHours(a,0,0,0),r}},Tbe=class extends yr{constructor(){super(...arguments);$(this,"priority",70);$(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(r,n,a){switch(n){case"k":return fn(_n.hour24h,r);case"ko":return a.ordinalNumber(r,{unit:"hour"});default:return Sn(n.length,r)}}validate(r,n){return n>=1&&n<=24}set(r,n,a){const i=a<=24?a%24:a;return r.setHours(i,0,0,0),r}},_be=class extends yr{constructor(){super(...arguments);$(this,"priority",60);$(this,"incompatibleTokens",["t","T"])}parse(r,n,a){switch(n){case"m":return fn(_n.minute,r);case"mo":return a.ordinalNumber(r,{unit:"minute"});default:return Sn(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,a){return r.setMinutes(a,0,0),r}},Pbe=class extends yr{constructor(){super(...arguments);$(this,"priority",50);$(this,"incompatibleTokens",["t","T"])}parse(r,n,a){switch(n){case"s":return fn(_n.second,r);case"so":return a.ordinalNumber(r,{unit:"second"});default:return Sn(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,a){return r.setSeconds(a,0),r}},Ebe=class extends yr{constructor(){super(...arguments);$(this,"priority",30);$(this,"incompatibleTokens",["t","T"])}parse(r,n){const a=i=>Math.trunc(i*Math.pow(10,-n.length+3));return Pn(Sn(n.length,r),a)}set(r,n,a){return r.setMilliseconds(a),r}},Obe=class extends yr{constructor(){super(...arguments);$(this,"priority",10);$(this,"incompatibleTokens",["t","T","x"])}parse(r,n){switch(n){case"X":return po(mo.basicOptionalMinutes,r);case"XX":return po(mo.basic,r);case"XXXX":return po(mo.basicOptionalSeconds,r);case"XXXXX":return po(mo.extendedOptionalSeconds,r);case"XXX":default:return po(mo.extended,r)}}set(r,n,a){return n.timestampIsSet?r:Lr(r,r.getTime()-Dh(r)-a)}},Abe=class extends yr{constructor(){super(...arguments);$(this,"priority",10);$(this,"incompatibleTokens",["t","T","X"])}parse(r,n){switch(n){case"x":return po(mo.basicOptionalMinutes,r);case"xx":return po(mo.basic,r);case"xxxx":return po(mo.basicOptionalSeconds,r);case"xxxxx":return po(mo.extendedOptionalSeconds,r);case"xxx":default:return po(mo.extended,r)}}set(r,n,a){return n.timestampIsSet?r:Lr(r,r.getTime()-Dh(r)-a)}},Dbe=class extends yr{constructor(){super(...arguments);$(this,"priority",40);$(this,"incompatibleTokens","*")}parse(r){return SG(r)}set(r,n,a){return[Lr(r,a*1e3),{timestampIsSet:!0}]}},Mbe=class extends yr{constructor(){super(...arguments);$(this,"priority",20);$(this,"incompatibleTokens","*")}parse(r){return SG(r)}set(r,n,a){return[Lr(r,a),{timestampIsSet:!0}]}};const Ibe={G:new Jye,y:new ebe,Y:new tbe,R:new rbe,u:new nbe,Q:new sbe,q:new abe,M:new ibe,L:new obe,w:new cbe,I:new ube,d:new mbe,D:new pbe,E:new gbe,e:new xbe,c:new vbe,i:new bbe,a:new jbe,b:new wbe,B:new Nbe,h:new Sbe,H:new kbe,K:new Cbe,k:new Tbe,m:new _be,s:new Pbe,S:new Ebe,X:new Obe,x:new Abe,t:new Dbe,T:new Mbe},Rbe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$be=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Lbe=/^'([^]*?)'?$/,Fbe=/''/g,Bbe=/\S/,Ube=/[a-zA-Z]/;function z4(e,t,r,n){var x,v,b,y;const a=Vye(),i=a.locale??H2,o=a.firstWeekContainsDate??((v=(x=a.locale)==null?void 0:x.options)==null?void 0:v.firstWeekContainsDate)??1,l=a.weekStartsOn??((y=(b=a.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??0,c={firstWeekContainsDate:o,weekStartsOn:l,locale:i},d=[new Xye],u=t.match($be).map(j=>{const w=j[0];if(w in TT){const N=TT[w];return N(j,i.formatLong)}return j}).join("").match(Rbe),f=[];for(let j of u){wG(j)&&_T(j,t,e),jG(j)&&_T(j,t,e);const w=j[0],N=Ibe[w];if(N){const{incompatibleTokens:S}=N;if(Array.isArray(S)){const T=f.find(C=>S.includes(C.token)||C.token===w);if(T)throw new RangeError(`The format string mustn't contain \`${T.fullToken}\` and \`${j}\` at the same time`)}else if(N.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${j}\` and any other token at the same time`);f.push({token:w,fullToken:j});const k=N.run(e,j,i.match,c);if(!k)return Lr(r,NaN);d.push(k.setter),e=k.rest}else{if(w.match(Ube))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(j==="''"?j="'":w==="'"&&(j=zbe(j)),e.indexOf(j)===0)e=e.slice(j.length);else return Lr(r,NaN)}}if(e.length>0&&Bbe.test(e))return Lr(r,NaN);const h=d.map(j=>j.priority).sort((j,w)=>w-j).filter((j,w,N)=>N.indexOf(j)===w).map(j=>d.filter(w=>w.priority===j).sort((w,N)=>N.subPriority-w.subPriority)).map(j=>j[0]);let m=Rt(r);if(isNaN(m.getTime()))return Lr(r,NaN);const g={};for(const j of h){if(!j.validate(m,c))return Lr(r,NaN);const w=j.set(m,g,c);Array.isArray(w)?(m=w[0],Object.assign(g,w[1])):m=w}return Lr(r,m)}function zbe(e){return e.match(Lbe)[1].replace(Fbe,"'")}function vN(e,t){const r=Rt(e),n=Rt(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function Wbe(e,t){const r=Rt(e),n=Rt(t);return r.getFullYear()===n.getFullYear()}function ug(e,t){return bn(e,-t)}function wf(e,t){const n=Ybe(e);let a;if(n.date){const c=Gbe(n.date,2);a=Kbe(c.restDateString,c.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,l;if(n.time&&(o=Qbe(n.time),isNaN(o)))return new Date(NaN);if(n.timezone){if(l=Zbe(n.timezone),isNaN(l))return new Date(NaN)}else{const c=new Date(i+o),d=new Date(0);return d.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),d.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),d}return new Date(i+o+l)}const By={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Vbe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Hbe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,qbe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ybe(e){const t={},r=e.split(By.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],By.timeZoneDelimiter.test(t.date)&&(t.date=e.split(By.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const a=By.timezone.exec(n);a?(t.time=n.replace(a[1],""),t.timezone=a[1]):t.time=n}return t}function Gbe(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const a=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((n[1]||n[2]).length)}}function Kbe(e,t){if(t===null)return new Date(NaN);const r=e.match(Vbe);if(!r)return new Date(NaN);const n=!!r[4],a=xp(r[1]),i=xp(r[2])-1,o=xp(r[3]),l=xp(r[4]),c=xp(r[5])-1;if(n)return r0e(t,l,c)?Xbe(t,l,c):new Date(NaN);{const d=new Date(0);return!e0e(t,i,o)||!t0e(t,a)?new Date(NaN):(d.setUTCFullYear(t,i,Math.max(a,o)),d)}}function xp(e){return e?parseInt(e):1}function Qbe(e){const t=e.match(Hbe);if(!t)return NaN;const r=VS(t[1]),n=VS(t[2]),a=VS(t[3]);return n0e(r,n,a)?r*z2+n*xN+a*1e3:NaN}function VS(e){return e&&parseFloat(e.replace(",","."))||0}function Zbe(e){if(e==="Z")return 0;const t=e.match(qbe);if(!t)return 0;const r=t[1]==="+"?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return s0e(n,a)?r*(n*z2+a*xN):NaN}function Xbe(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const a=n.getUTCDay()||7,i=(t-1)*7+r+1-a;return n.setUTCDate(n.getUTCDate()+i),n}const Jbe=[31,null,31,30,31,30,31,31,30,31,30,31];function TG(e){return e%400===0||e%4===0&&e%100!==0}function e0e(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(Jbe[t]||(TG(e)?29:28))}function t0e(e,t){return t>=1&&t<=(TG(e)?366:365)}function r0e(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function n0e(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function s0e(e,t){return t>=0&&t<=59}function HS(e,t){const r=Rt(e),n=r.getFullYear(),a=r.getDate(),i=Lr(e,0);i.setFullYear(n,t,15),i.setHours(0,0,0,0);const o=Wye(i);return r.setMonth(t,Math.min(a,o)),r}function W4(e,t){const r=Rt(e);return isNaN(+r)?Lr(e,NaN):(r.setFullYear(t),r)}function a0e(e,t){return Wa(e,-t)}function i0e(e,t){const r=u0e(t);return"formatToParts"in r?l0e(r,e):c0e(r,e)}const o0e={year:0,month:1,day:2,hour:3,minute:4,second:5};function l0e(e,t){try{const r=e.formatToParts(t),n=[];for(let a=0;a<r.length;a++){const i=o0e[r[a].type];i!==void 0&&(n[i]=parseInt(r[a].value,10))}return n}catch(r){if(r instanceof RangeError)return[NaN];throw r}}function c0e(e,t){const r=e.format(t),n=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r);return[parseInt(n[3],10),parseInt(n[1],10),parseInt(n[2],10),parseInt(n[4],10),parseInt(n[5],10),parseInt(n[6],10)]}const qS={},V4=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),d0e=V4==="06/25/2014, 00:00:00"||V4==="â06â/â25â/â2014â â00â:â00â:â00";function u0e(e){return qS[e]||(qS[e]=d0e?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),qS[e]}function Z2(e,t,r,n,a,i,o){const l=new Date(0);return l.setUTCFullYear(e,t,r),l.setUTCHours(n,a,i,o),l}const H4=36e5,f0e=6e4,YS={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function X2(e,t,r){if(!e)return 0;let n=YS.timezoneZ.exec(e);if(n)return 0;let a,i;if(n=YS.timezoneHH.exec(e),n)return a=parseInt(n[1],10),q4(a)?-(a*H4):NaN;if(n=YS.timezoneHHMM.exec(e),n){a=parseInt(n[2],10);const o=parseInt(n[3],10);return q4(a,o)?(i=Math.abs(a)*H4+o*f0e,n[1]==="+"?-i:i):NaN}if(p0e(e)){t=new Date(t||Date.now());const o=r?t:h0e(t),l=PT(o,e);return-(r?l:m0e(t,l,e))}return NaN}function h0e(e){return Z2(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function PT(e,t){const r=i0e(e,t),n=Z2(r[0],r[1]-1,r[2],r[3]%24,r[4],r[5],0).getTime();let a=e.getTime();const i=a%1e3;return a-=i>=0?i:1e3+i,n-a}function m0e(e,t,r){let a=e.getTime()-t;const i=PT(new Date(a),r);if(t===i)return t;a-=i-t;const o=PT(new Date(a),r);return i===o?i:Math.max(i,o)}function q4(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}const Y4={};function p0e(e){if(Y4[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Y4[e]=!0,!0}catch{return!1}}function G4(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const _G=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,GS=36e5,K4=6e4,g0e=2,qs={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:_G};function ET(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);const r=t.additionalDigits==null?g0e:Number(t.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(Object.prototype.toString.call(e)!=="[object String]")return new Date(NaN);const n=x0e(e),{year:a,restDateString:i}=v0e(n.date,r),o=y0e(i,a);if(o===null||isNaN(o.getTime()))return new Date(NaN);if(o){const l=o.getTime();let c=0,d;if(n.time&&(c=b0e(n.time),c===null||isNaN(c)))return new Date(NaN);if(n.timeZone||t.timeZone){if(d=X2(n.timeZone||t.timeZone,new Date(l+c)),isNaN(d))return new Date(NaN)}else d=G4(new Date(l+c)),d=G4(new Date(l+c+d));return new Date(l+c+d)}else return new Date(NaN)}function x0e(e){const t={};let r=qs.dateTimePattern.exec(e),n;if(r?(t.date=r[1],n=r[3]):(r=qs.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e)),n){const a=qs.timeZone.exec(n);a?(t.time=n.replace(a[1],""),t.timeZone=a[1].trim()):t.time=n}return t}function v0e(e,t){if(e){const r=qs.YYY[t],n=qs.YYYYY[t];let a=qs.YYYY.exec(e)||n.exec(e);if(a){const i=a[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(a=qs.YY.exec(e)||r.exec(e),a){const i=a[1];return{year:parseInt(i,10)*100,restDateString:e.slice(i.length)}}}return{year:null}}function y0e(e,t){if(t===null)return null;let r,n,a;if(!e||!e.length)return r=new Date(0),r.setUTCFullYear(t),r;let i=qs.MM.exec(e);if(i)return r=new Date(0),n=parseInt(i[1],10)-1,Z4(t,n)?(r.setUTCFullYear(t,n),r):new Date(NaN);if(i=qs.DDD.exec(e),i){r=new Date(0);const o=parseInt(i[1],10);return N0e(t,o)?(r.setUTCFullYear(t,0,o),r):new Date(NaN)}if(i=qs.MMDD.exec(e),i){r=new Date(0),n=parseInt(i[1],10)-1;const o=parseInt(i[2],10);
671return Z4(t,n,o)?(r.setUTCFullYear(t,n,o),r):new Date(NaN)}if(i=qs.Www.exec(e),i)return a=parseInt(i[1],10)-1,X4(a)?Q4(t,a):new Date(NaN);if(i=qs.WwwD.exec(e),i){a=parseInt(i[1],10)-1;const o=parseInt(i[2],10)-1;return X4(a,o)?Q4(t,a,o):new Date(NaN)}return null}function b0e(e){let t,r,n=qs.HH.exec(e);if(n)return t=parseFloat(n[1].replace(",",".")),KS(t)?t%24*GS:NaN;if(n=qs.HHMM.exec(e),n)return t=parseInt(n[1],10),r=parseFloat(n[2].replace(",",".")),KS(t,r)?t%24*GS+r*K4:NaN;if(n=qs.HHMMSS.exec(e),n){t=parseInt(n[1],10),r=parseInt(n[2],10);const a=parseFloat(n[3].replace(",","."));return KS(t,r,a)?t%24*GS+r*K4+a*1e3:NaN}return null}function Q4(e,t,r){t=t||0,r=r||0;const n=new Date(0);n.setUTCFullYear(e,0,4);const a=n.getUTCDay()||7,i=t*7+r+1-a;return n.setUTCDate(n.getUTCDate()+i),n}const j0e=[31,28,31,30,31,30,31,31,30,31,30,31],w0e=[31,29,31,30,31,30,31,31,30,31,30,31];function PG(e){return e%400===0||e%4===0&&e%100!==0}function Z4(e,t,r){if(t<0||t>11)return!1;if(r!=null){if(r<1)return!1;const n=PG(e);if(n&&r>w0e[t]||!n&&r>j0e[t])return!1}return!0}function N0e(e,t){if(t<1)return!1;const r=PG(e);return!(r&&t>366||!r&&t>365)}function X4(e,t){return!(e<0||e>52||t!=null&&(t<0||t>6))}function KS(e,t,r){return!(e<0||e>=25||t!=null&&(t<0||t>=60)||r!=null&&(r<0||r>=60))}function ij(e,t,r){e=ET(e,r);const n=X2(t,e,!0),a=new Date(e.getTime()-n),i=new Date(0);return i.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),i.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),i}function J4(e,t,r){if(typeof e=="string"&&!e.match(_G))return ET(e,{...r,timeZone:t});e=ET(e,r);const n=Z2(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()).getTime(),a=X2(t,new Date(n));return new Date(n+a)}function sf(e,t="UTC",r="PPpp"){if(!e)return"";try{const n=typeof e=="string"?new Date(e):e,a=ij(n,t);return pt(a,r)}catch(n){return console.error("Error formatting date:",n),typeof e=="string"?e:e.toString()}}function Lb(e,t,r="UTC",n={}){if(!e||!t)return"";const a=typeof e=="string"?new Date(e):e,i=typeof t=="string"?new Date(t):t,o=ij(a,r),l=ij(i,r),c=n.dateFormat||"MMM d, yyyy",d=n.timeFormat||"h:mm a",u=pt(o,"yyyy-MM-dd"),f=pt(l,"yyyy-MM-dd");return u===f&&n.sameDayTimeOnly?`${pt(o,c)}, ${pt(o,d)} - ${pt(l,d)}`:`${pt(o,c)}, ${pt(o,d)} - ${pt(l,c)}, ${pt(l,d)}`}function J2(){const[e,t]=p.useState(Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"),[r,n]=p.useState(!0),[a,i]=p.useState("UTC+0"),[o,l]=p.useState(null);return p.useEffect(()=>{async function c(){try{const d=await fetch("/api/timezones/detect");if(d.ok){const{timezone:u,offset:f}=await d.json();t(u),i(f)}else{const u=Intl.DateTimeFormat().resolvedOptions().timeZone;t(u);const h=-new Date().getTimezoneOffset(),m=Math.abs(Math.floor(h/60)),g=Math.abs(h%60),x=`${h>=0?"+":"-"}${m.toString().padStart(2,"0")}:${g.toString().padStart(2,"0")}`;i(`UTC${x}`)}}catch(d){console.error("Error detecting timezone:",d),l(d);const u=Intl.DateTimeFormat().resolvedOptions().timeZone;t(u)}finally{n(!1)}}c()},[]),{timeZone:e,timeZoneOffset:a,isLoading:r,error:o}}function eO(){const[e,t]=p.useState([]),[r,n]=p.useState(!0),[a,i]=p.useState(!1),[o,l]=p.useState("UTC");return p.useEffect(()=>{async function c(){try{const d=await fetch("/api/timezones/detect");if(d.ok){const{timezone:f}=await d.json();l(f)}const u=await fetch("/api/timezones");if(u.ok){const f=await u.json();t(f)}else throw new Error("Failed to fetch timezones")}catch(d){console.error("Error fetching timezones:",d),i(!0)}finally{n(!1)}}c()},[]),{data:e,isLoading:r,isError:a,userTimeZone:o}}function tO(e,t,r,n,a,i){let o="";return e&&(o+=`start=${e.toISOString()}`),t&&(o+=`${o?"&":""}end=${t.toISOString()}`),a&&(o+=`${o?"&":""}organizationId=${a}`),i&&(o+=`${o?"&":""}teamId=${i}`),ut({queryKey:["/api/events",e==null?void 0:e.toISOString(),t==null?void 0:t.toISOString(),r,n,a,i]})}function EG(e=new Date,t,r,n,a){const i=e.getDay(),o=Hs(bn(e,-i)),l=V2(bn(o,6));return tO(o,l,t,r,n,a)}function S0e(){const{toast:e}=Qt(),t=ld();return dt({mutationFn:async r=>{const n={...r,startTime:r.startTime instanceof Date?r.startTime.toISOString():r.startTime,endTime:r.endTime instanceof Date?r.endTime.toISOString():r.endTime};console.log("Sending event data:",n);const a=await Ue("POST","/api/events",n);if(!a.ok){const i=await a.json();throw console.error("Event creation error:",i),new Error(i.message||"Failed to create event")}return a.json()},onSuccess:r=>{e({title:"Event created",description:"Your event has been successfully created"}),t.invalidateQueries({queryKey:["/api/events"]}),r&&r.calendarType&&t.invalidateQueries({queryKey:["/api/events",void 0,void 0,void 0,r.calendarType]}),r&&r.calendarIntegrationId&&t.invalidateQueries({queryKey:["/api/events",void 0,void 0,r.calendarIntegrationId]})},onError:r=>{console.error("Event creation error:",r),e({title:"Error creating event",description:r.message,variant:"destructive"})}})}function k0e(e){const{toast:t}=Qt(),r=ld();return dt({mutationFn:async n=>{const a={...n,startTime:n.startTime instanceof Date?n.startTime.toISOString():n.startTime,endTime:n.endTime instanceof Date?n.endTime.toISOString():n.endTime};return(await Ue("PUT",`/api/events/${e}`,a)).json()},onSuccess:n=>{t({title:"Event updated",description:"Your event has been successfully updated"}),r.invalidateQueries({queryKey:["/api/events"]}),r.invalidateQueries({queryKey:["/api/events",e]}),n&&n.calendarType&&r.invalidateQueries({queryKey:["/api/events",void 0,void 0,void 0,n.calendarType]}),n&&n.calendarIntegrationId&&r.invalidateQueries({queryKey:["/api/events",void 0,void 0,n.calendarIntegrationId]})},onError:n=>{t({title:"Error updating event",description:n.message,variant:"destructive"})}})}function C0e(){const{toast:e}=Qt(),t=ld();let r=null;return dt({mutationFn:async n=>{const a=typeof n=="number"?n:n.id;return typeof n!="number"&&(r=n),(await Ue("DELETE",`/api/events/${a}`,null)).json()},onSuccess:()=>{e({title:"Event deleted",description:"Your event has been successfully deleted"}),t.invalidateQueries({queryKey:["/api/events"]}),r&&(r.calendarType&&t.invalidateQueries({queryKey:["/api/events",void 0,void 0,void 0,r.calendarType]}),r.calendarIntegrationId&&t.invalidateQueries({queryKey:["/api/events",void 0,void 0,r.calendarIntegrationId]}))},onError:n=>{e({title:"Error deleting event",description:n.message,variant:"destructive"})}})}function Fb(e){switch(e){case"google":return{bg:"bg-blue-100",border:"border-l-4 border-primary",text:"text-primary"};case"outlook":return{bg:"bg-purple-100",border:"border-l-4 border-purple-700",text:"text-purple-700"};case"ical":return{bg:"bg-amber-100",border:"border-l-4 border-amber-700",text:"text-amber-700"};default:return{bg:"bg-green-100",border:"border-l-4 border-secondary",text:"text-secondary"}}}function OG(){return ut({queryKey:["/api/settings"]})}function AG(){const{toast:e}=Qt();return dt({mutationFn:async t=>(await Ue("PUT","/api/settings",t)).json(),onSuccess:()=>{e({title:"Settings updated",description:"Your settings have been successfully updated"}),Wt.invalidateQueries({queryKey:["/api/settings"]})},onError:t=>{e({title:"Error updating settings",description:t.message,variant:"destructive"})}})}function DG(){return[{value:0,label:"At time of event"},{value:5,label:"5 minutes before"},{value:10,label:"10 minutes before"},{value:15,label:"15 minutes before"},{value:30,label:"30 minutes before"},{value:60,label:"1 hour before"},{value:120,label:"2 hours before"},{value:1440,label:"1 day before"},{value:2880,label:"2 days before"},{value:10080,label:"1 week before"}]}function OT(e){return e===0?"At time of event":e<60?`${e} minutes before`:e===60?"1 hour before":e<24*60?`${Math.floor(e/60)} hours before`:e===24*60?"1 day before":`${Math.floor(e/(24*60))} days before`}
vendor: 2,302 bytes, line 671
671function T0e(e){return!e||e.length===0?"No reminders":e.sort((t,r)=>t-r).map(OT).join(", ")}var _0e="Label",MG=p.forwardRef((e,t)=>s.jsx(Ke.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));MG.displayName=_0e;var IG=MG;const P0e=Mu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ee=p.forwardRef(({className:e,...t},r)=>s.jsx(IG,{ref:r,className:Oe(P0e(),e),...t}));ee.displayName=IG.displayName;const RG=yve,$G=p.createContext({}),Et=({...e})=>s.jsx($G.Provider,{value:{name:e.name},children:s.jsx(Nve,{...e})}),yN=()=>{const e=p.useContext($G),t=p.useContext(LG),{getFieldState:r,formState:n}=gN(),a=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},LG=p.createContext({}),wt=p.forwardRef(({className:e,...t},r)=>{const n=p.useId();return s.jsx(LG.Provider,{value:{id:n},children:s.jsx("div",{ref:r,className:Oe("space-y-2",e),...t})})});wt.displayName="FormItem";const gt=p.forwardRef(({className:e,...t},r)=>{const{error:n,formItemId:a}=yN();return s.jsx(ee,{ref:r,className:Oe(n&&"text-destructive",e),htmlFor:a,...t})});gt.displayName="FormLabel";const wr=p.forwardRef(({...e},t)=>{const{error:r,formItemId:n,formDescriptionId:a,formMessageId:i}=yN();return s.jsx($o,{ref:t,id:n,"aria-describedby":r?`${a} ${i}`:`${a}`,"aria-invalid":!!r,...e})});wr.displayName="FormControl";const E0e=p.forwardRef(({className:e,...t},r)=>{const{formDescriptionId:n}=yN();return s.jsx("p",{ref:r,id:n,className:Oe("text-sm text-muted-foreground",e),...t})});E0e.displayName="FormDescription";const Mr=p.forwardRef(({className:e,children:t,...r},n)=>{const{error:a,formMessageId:i}=yN(),o=a?String(a==null?void 0:a.message):t;return o?s.jsx("p",{ref:n,id:i,className:Oe("text-sm font-medium text-destructive",e),...r,children:o}):null});Mr.displayName="FormMessage";const ie=p.forwardRef(({className:e,type:t,...r},n)=>s.jsx("input",{type:t,className:Oe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
671ing-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",e),ref:n,...r}));ie.displayName="Input";const Es=p.forwardRef(({className:e,...t},r)=>s.jsx("textarea",{className:Oe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-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:r,...t}));Es.displayName="Textarea";function AT(e,[t,r]){return Math.min(r,Math.max(t,e))}var O0e=[" ","Enter","ArrowUp","ArrowDown"],A0e=[" ","Enter"],Mv="Select",[bN,jN,D0e]=dv(Mv),[Pm,OZe]=Is(Mv,[D0e,Tm]),wN=Tm(),[M0e,ud]=Pm(Mv),[I0e,R0e]=Pm(Mv),FG=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:a,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:d,name:u,autoComplete:f,disabled:h,required:m,form:g}=e,x=wN(t),[v,b]=p.useState(null),[y,j]=p.useState(null),[w,N]=p.useState(!1),S=cd(d),[k=!1,T]=xs({prop:n,defaultProp:a,onChange:i}),[C,E]=xs({prop:o,defaultProp:l,onChange:c}),P=p.useRef(null),_=v?g||!!v.closest("form"):!0,[I,F]=p.useState(new Set),H=Array.from(I).map(W=>W.props.value).join(";");return s.jsx(m2,{...x,children:s.jsxs(M0e,{required:m,scope:t,trigger:v,onTriggerChange:b,valueNode:y,onValueNodeChange:j,valueNodeHasChildren:w,onValueNodeHasChildrenChange:N,contentId:La(),value:C,onValueChange:E,open:k,onOpenChange:T,dir:S,triggerPointerDownPosRef:P,disabled:h,children:[s.jsx(bN.Provider,{scope:t,children:s.jsx(I0e,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(W=>{F(z=>new Set(z).add(W))},[]),onNativeOptionRemove:p.useCallback(W=>{F(z=>{const R=new Set(z);return R.delete(W),R})},[]),children:r})}),_?s.jsxs(dK,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:f,value:C,onChange:W=>E(W.target.value),disabled:h,form:g,children:[C===void 0?s.jsx("option",{value:""}):null,Array.from(I)]},H):null]})})};FG.displayName=Mv;var BG="SelectTrigger",UG=p.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...a}=e,i=wN(r),o=ud(BG,r),l=o.disabled||n,c=Ft(t,o.onTriggerChange),d=jN(r),u=p.useRef("touch"),[f,h,m]=uK(x=>{const v=d().filter(j=>!j.disabled),b=v.find(j=>j.value===o.value),y=fK(v,x,b);y!==void 0&&o.onValueChange(y.value)}),g=x=>{l||(o.onOpenChange(!0),m()),x&&(o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return s.jsx(oN,{asChild:!0,...i,children:s.jsx(Ke.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":cK(o.value)?"":void 0,...a,ref:c,onClick:$e(a.onClick,x=>{x.currentTarget.focus(),u.current!=="mouse"&&g(x)}),onPointerDown:$e(a.onPointerDown,x=>{u.current=x.pointerType;
vendor: 15,900 bytes, line 671
671const v=x.target;v.hasPointerCapture(x.pointerId)&&v.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(g(x),x.preventDefault())}),onKeyDown:$e(a.onKeyDown,x=>{const v=f.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&h(x.key),!(v&&x.key===" ")&&O0e.includes(x.key)&&(g(),x.preventDefault())})})})});UG.displayName=BG;var zG="SelectValue",WG=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:a,children:i,placeholder:o="",...l}=e,c=ud(zG,r),{onValueNodeHasChildrenChange:d}=c,u=i!==void 0,f=Ft(t,c.onValueNodeChange);return Bn(()=>{d(u)},[d,u]),s.jsx(Ke.span,{...l,ref:f,style:{pointerEvents:"none"},children:cK(c.value)?s.jsx(s.Fragment,{children:o}):i})});WG.displayName=zG;var $0e="SelectIcon",VG=p.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...a}=e;return s.jsx(Ke.span,{"aria-hidden":!0,...a,ref:t,children:n||"â¼"})});VG.displayName=$0e;var L0e="SelectPortal",HG=e=>s.jsx(vm,{asChild:!0,...e});HG.displayName=L0e;var Nu="SelectContent",qG=p.forwardRef((e,t)=>{const r=ud(Nu,e.__scopeSelect),[n,a]=p.useState();if(Bn(()=>{a(new DocumentFragment)},[]),!r.open){const i=n;return i?Li.createPortal(s.jsx(YG,{scope:e.__scopeSelect,children:s.jsx(bN.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),i):null}return s.jsx(GG,{...e,ref:t})});qG.displayName=Nu;var bi=10,[YG,fd]=Pm(Nu),F0e="SelectContentImpl",GG=p.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:x,avoidCollisions:v,...b}=e,y=ud(Nu,r),[j,w]=p.useState(null),[N,S]=p.useState(null),k=Ft(t,K=>w(K)),[T,C]=p.useState(null),[E,P]=p.useState(null),_=jN(r),[I,F]=p.useState(!1),H=p.useRef(!1);p.useEffect(()=>{if(j)return rN(j)},[j]),eN();const W=p.useCallback(K=>{const[je,...ae]=_().map(B=>B.ref.current),[de]=ae.slice(-1),Ce=document.activeElement;for(const B of K)if(B===Ce||(B==null||B.scrollIntoView({block:"nearest"}),B===je&&N&&(N.scrollTop=0),B===de&&N&&(N.scrollTop=N.scrollHeight),B==null||B.focus(),document.activeElement!==Ce))return},[_,N]),z=p.useCallback(()=>W([T,j]),[W,T,j]);p.useEffect(()=>{I&&z()},[I,z]);const{onOpenChange:R,triggerPointerDownPosRef:q}=y;p.useEffect(()=>{if(j){let K={x:0,y:0};const je=de=>{var Ce,B;K={x:Math.abs(Math.round(de.pageX)-(((Ce=q.current)==null?void 0:Ce.x)??0)),y:Math.abs(Math.round(de.pageY)-(((B=q.current)==null?void 0:B.y)??0))}},ae=de=>{K.x<=10&&K.y<=10?de.preventDefault():j.contains(de.target)||R(!1),document.removeEventListener("pointermove",je),q.current=null};return q.current!==null&&(document.addEventListener("pointermove",je),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",je),document.removeEventListener("pointerup",ae,{capture:!0})}}},[j,R,q]),p.useEffect(()=>{const K=()=>R(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[R]);const[V,se]=uK(K=>{const je=_().filter(Ce=>!Ce.disabled),ae=je.find(Ce=>Ce.ref.current===document.activeElement),de=fK(je,K,ae);de&&setTimeout(()=>de.ref.current.focus())}),oe=p.useCallback((K,je,ae)=>{const de=!H.current&&!ae;(y.value!==void 0&&y.value===je||de)&&(C(K),de&&(H.current=!0))},[y.value]),_e=p.useCallback(()=>j==null?void 0:j.focus(),[j]),U=p.useCallback((K,je,ae)=>{const de=!H.current&&!ae;(y.value!==void 0&&y.value===je||de)&&P(K)},[y.value]),M=n==="popper"?DT:KG,G=M===DT?{side:l,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:x,avoidCollisions:v}:{};return s.jsx(YG,{scope:r,content:j,viewport:N,onViewportChange:S,itemRefCallback:oe,selectedItem:T,onItemLeave:_e,itemTextRefCallback:U,focusSelectedItem:z,selectedItemText:E,position:n,isPositioned:I,searchRef:V,children:s.jsx(wv,{as:$o,allowPinchZoom:!0,children:s.jsx(jv,{asChild:!0,trapped:y.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:$e(a,K=>{var je;(je=y.trigger)==null||je.focus({preventScroll:!0}),K.preventDefault()}),children:s.jsx(xm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:s.jsx(M,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:K=>K.preventDefault(),...b,...G,onPlaced:()=>F(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:$e(b.onKeyDown,K=>{const je=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!je&&K.key.length===1&&se(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let de=_().filter(Ce=>!Ce.disabled).map(Ce=>Ce.ref.current);if(["ArrowUp","End"].includes(K.key)&&(de=de.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const Ce=K.target,B=de.indexOf(Ce);de=de.slice(B+1)}setTimeout(()=>W(de)),K.preventDefault()}})})})})})})});GG.displayName=F0e;var B0e="SelectItemAlignedPosition",KG=p.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...a}=e,i=ud(Nu,r),o=fd(Nu,r),[l,c]=p.useState(null),[d,u]=p.useState(null),f=Ft(t,k=>u(k)),h=jN(r),m=p.useRef(!1),g=p.useRef(!0),{viewport:x,selectedItem:v,selectedItemText:b,focusSelectedItem:y}=o,j=p.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&d&&x&&v&&b){const k=i.trigger.getBoundingClientRect(),T=d.getBoundingClientRect(),C=i.valueNode.getBoundingClientRect(),E=b.getBoundingClientRect();if(i.dir!=="rtl"){const Ce=E.left-T.left,B=C.left-Ce,me=k.left-B,ne=k.width+me,Be=Math.max(ne,T.width),lt=window.innerWidth-bi,ct=AT(B,[bi,Math.max(bi,lt-Be)]);l.style.minWidth=ne+"px",l.style.left=ct+"px"}else{const Ce=T.right-E.right,B=window.innerWidth-C.right-Ce,me=window.innerWidth-k.right-B,ne=k.width+me,Be=Math.max(ne,T.width),lt=window.innerWidth-bi,ct=AT(B,[bi,Math.max(bi,lt-Be)]);l.style.minWidth=ne+"px",l.style.right=ct+"px"}const P=h(),_=window.innerHeight-bi*2,I=x.scrollHeight,F=window.getComputedStyle(d),H=parseInt(F.borderTopWidth,10),W=parseInt(F.paddingTop,10),z=parseInt(F.borderBottomWidth,10),R=parseInt(F.paddingBottom,10),q=H+W+I+R+z,V=Math.min(v.offsetHeight*5,q),se=window.getComputedStyle(x),oe=parseInt(se.paddingTop,10),_e=parseInt(se.paddingBottom,10),U=k.top+k.height/2-bi,M=_-U,G=v.offsetHeight/2,K=v.offsetTop+G,je=H+W+K,ae=q-je;if(je<=U){const Ce=P.length>0&&v===P[P.length-1].ref.current;l.style.bottom="0px";const B=d.clientHeight-x.offsetTop-x.offsetHeight,me=Math.max(M,G+(Ce?_e:0)+B+z),ne=je+me;l.style.height=ne+"px"}else{const Ce=P.length>0&&v===P[0].ref.current;l.style.top="0px";const me=Math.max(U,H+x.offsetTop+(Ce?oe:0)+G)+ae;l.style.height=me+"px",x.scrollTop=je-U+x.offsetTop}l.style.margin=`${bi}px 0`,l.style.minHeight=V+"px",l.style.maxHeight=_+"px",n==null||n(),requestAnimationFrame(()=>m.current=!0)}},[h,i.trigger,i.valueNode,l,d,x,v,b,i.dir,n]);Bn(()=>j(),[j]);const[w,N]=p.useState();Bn(()=>{d&&N(window.getComputedStyle(d).zIndex)},[d]);const S=p.useCallback(k=>{k&&g.current===!0&&(j(),y==null||y(),g.current=!1)},[j,y]);return s.jsx(z0e,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:S,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:s.jsx(Ke.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});KG.displayName=B0e;var U0e="SelectPopperPosition",DT=p.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:a=bi,...i}=e,o=wN(r);return s.jsx(p2,{...o,...i,ref:t,align:n,collisionPadding:a,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)"}})});DT.displayName=U0e;var[z0e,rO]=Pm(Nu,{}),MT="SelectViewport",QG=p.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...a}=e,i=fd(MT,r),o=rO(MT,r),l=Ft(t,i.onViewportChange),c=p.useRef(0);return s.jsxs(s.Fragment,{children:[s.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:n}),s.jsx(bN.Slot,{scope:r,children:s.jsx(Ke.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:$e(a.onScroll,d=>{const u=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const m=Math.abs(c.current-u.scrollTop);if(m>0){const g=window.innerHeight-bi*2,x=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),b=Math.max(x,v);if(b<g){const y=b+m,j=Math.min(g,y),w=y-j;f.style.height=j+"px",f.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});QG.displayName=MT;var ZG="SelectGroup",[W0e,V0e]=Pm(ZG),H0e=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=La();return s.jsx(W0e,{scope:r,id:a,children:s.jsx(Ke.div,{role:"group","aria-labelledby":a,...n,ref:t})})});H0e.displayName=ZG;var XG="SelectLabel",JG=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=V0e(XG,r);return s.jsx(Ke.div,{id:a.id,...n,ref:t})});JG.displayName=XG;var oj="SelectItem",[q0e,eK]=Pm(oj),tK=p.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:a=!1,textValue:i,...o}=e,l=ud(oj,r),c=fd(oj,r),d=l.value===n,[u,f]=p.useState(i??""),[h,m]=p.useState(!1),g=Ft(t,y=>{var j;return(j=c.itemRefCallback)==null?void 0:j.call(c,y,n,a)}),x=La(),v=p.useRef("touch"),b=()=>{a||(l.onValueChange(n),l.onOpenChange(!1))};if(n==="")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 s.jsx(q0e,{scope:r,value:n,disabled:a,textId:x,isSelected:d,onItemTextChange:p.useCallback(y=>{f(j=>j||((y==null?void 0:y.textContent)??"").trim())},[]),children:s.jsx(bN.ItemSlot,{scope:r,value:n,disabled:a,textValue:u,children:s.jsx(Ke.div,{role:"option","aria-labelledby":x,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:g,onFocus:$e(o.onFocus,()=>m(!0)),onBlur:$e(o.onBlur,()=>m(!1)),onClick:$e(o.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:$e(o.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:$e(o.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:$e(o.onPointerMove,y=>{var j;v.current=y.pointerType,a?(j=c.onItemLeave)==null||j.call(c):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:$e(o.onPointerLeave,y=>{var j;y.currentTarget===document.activeElement&&((j=c.onItemLeave)==null||j.call(c))}),onKeyDown:$e(o.onKeyDown,y=>{var w;((w=c.searchRef)==null?void 0:w.current)!==""&&y.key===" "||(A0e.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})})})})});tK.displayName=oj;var qp="SelectItemText",rK=p.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:a,...i}=e,o=ud(qp,r),l=fd(qp,r),c=eK(qp,r),d=R0e(qp,r),[u,f]=p.useState(null),h=Ft(t,b=>f(b),c.onItemTextChange,b=>{var y;return(y=l.itemTextRefCallback)==null?void 0:y.call(l,b,c.value,c.disabled)}),m=u==null?void 0:u.textContent,g=p.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:x,onNativeOptionRemove:v}=d;return Bn(()=>(x(g),()=>v(g)),[x,v,g]),s.jsxs(s.Fragment,{children:[s.jsx(Ke.span,{id:c.textId,...i,ref:h}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Li.createPortal(i.children,o.valueNode):null]})});rK.displayName=qp;var nK="SelectItemIndicator",sK=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return eK(nK,r).isSelected?s.jsx(Ke.span,{"aria-hidden":!0,...n,ref:t}):null});sK.displayName=nK;var IT="SelectScrollUpButton",aK=p.forwardRef((e,t)=>{const r=fd(IT,e.__scopeSelect),n=rO(IT,e.__scopeSelect),[a,i]=p.useState(!1),o=Ft(t,n.onScrollButtonChange);return Bn(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollTop>0;i(d)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?s.jsx(oK,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});aK.displayName=IT;var RT="SelectScrollDownButton",iK=p.forwardRef((e,t)=>{const r=fd(RT,e.__scopeSelect),n=rO(RT,e.__scopeSelect),[a,i]=p.useState(!1),o=Ft(t,n.onScrollButtonChange);return Bn(()=>{if(r.viewport&&r.isPositioned){let l=function(){const d=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<d;i(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?s.jsx(oK,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});iK.displayName=RT;var oK=p.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...a}=e,i=fd("SelectScrollButton",r),o=p.useRef(null),l=jN(r),c=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),Bn(()=>{var u;const d=l().find(f=>f.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[l]),s.jsx(Ke.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:$e(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:$e(a.onPointerMove,()=>{var d;(d=i.onItemLeave)==null||d.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:$e(a.onPointerLeave,()=>{c()})})}),Y0e="SelectSeparator",lK=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return s.jsx(Ke.div,{"aria-hidden":!0,...n,ref:t})});lK.displayName=Y0e;var $T="SelectArrow",G0e=p.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,a=wN(r),i=ud($T,r),o=fd($T,r);return i.open&&o.position==="popper"?s.jsx(g2,{...a,...n,ref:t}):null});G0e.displayName=$T;function cK(e){return e===""||e===void 0}var dK=p.forwardRef((e,t)=>{const{value:r,...n}=e,a=p.useRef(null),i=Ft(t,a),o=mN(r);return p.useEffect(()=>{const l=a.current,c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&u){const f=new Event("change",{bubbles:!0});u.call(l,r),l.dispatchEvent(f)}},[o,r]),s.jsx(Hw,{asChild:!0,children:s.jsx("select",{...n,ref:i,defaultValue:r})})});dK.displayName="BubbleSelect";function uK(e){const t=nn(e),r=p.useRef(""),n=p.useRef(0),a=p.useCallback(o=>{const l=r.current+o;t(l),function c(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=p.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,i]}function fK(e,t,r){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let o=K0e(e,Math.max(i,0));a.length===1&&(o=o.filter(d=>d!==r));const c=o.find(d=>d.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==r?c:void 0}function K0e(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Q0e=FG,hK=UG,Z0e=WG,X0e=VG,J0e=HG,mK=qG,eje=QG,pK=JG,gK=tK,tje=rK,rje=sK,xK=aK,vK=iK,yK=lK;const Xe=Q0e,Je=Z0e,Qe=p.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(hK,{ref:n,className:Oe("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
671ing-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),...r,children:[t,s.jsx(X0e,{asChild:!0,children:s.jsx(Dl,{className:"h-4 w-4 opacity-50"})})]}));Qe.displayName=hK.displayName;const bK=p.forwardRef(({className:e,...t},r)=>s.jsx(xK,{ref:r,className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(vh,{className:"h-4 w-4"})}));bK.displayName=xK.displayName;const jK=p.forwardRef(({className:e,...t},r)=>s.jsx(vK,{ref:r,className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Dl,{className:"h-4 w-4"})}));jK.displayName=vK.displayName;const Ze=p.forwardRef(({className:e,children:t,position:r="popper",...n},a)=>s.jsx(J0e,{children:s.jsxs(mK,{ref:a,className:Oe("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",r==="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:r,...n,children:[s.jsx(bK,{}),s.jsx(eje,{className:Oe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(jK,{})]})}));Ze.displayName=mK.displayName;const nje=p.forwardRef(({className:e,...t},r)=>s.jsx(pK,{ref:r,className:Oe("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));nje.displayName=pK.displayName;const Z=p.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(gK,{ref:n,className:Oe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(rje,{children:s.jsx(un,{className:"h-4 w-4"})})}),s.jsx(tje,{children:t})]}));Z.displayName=gK.displayName;const sje=p.forwardRef(({className:e,...t},r)=>s.jsx(yK,{ref:r,className:Oe("-mx-1 my-1 h-px bg-muted",e),...t}));sje.displayName=yK.displayName;const wK=6048e5,aje=864e5,NN=6e4,SN=36e5,ije=1e3,eR=Symbol.for("constructDateFrom");function Ar(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&eR in e?e[eR](t):e instanceof Date?new e.constructor(t):new Date(t)}function ft(e,t){return Ar(t||e,e)}function Bi(e,t,r){const n=ft(e,r==null?void 0:r.in);return isNaN(t)?Ar((r==null?void 0:r.in)||e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Hi(e,t,r){const n=ft(e,r==null?void 0:r.in);if(isNaN(t))return Ar(e,NaN);if(!t)return n;const a=n.getDate(),i=Ar(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const o=i.getDate();return a>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),a),n)}function NK(e,t,r){return Ar(e,+ft(e)+t)}function oje(e,t,r){return NK(e,t*SN)}let lje={};function Bu(){return lje}function Ll(e,t){var l,c,d,u;const r=Bu(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,a=ft(e,t==null?void 0:t.in),i=a.getDay(),o=(i<n?7:0)+i-n;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function Mh(e,t){return Ll(e,{...t,weekStartsOn:1})}function SK(e,t){const r=ft(e,t==null?void 0:t.in),n=r.getFullYear(),a=Ar(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const i=Mh(a),o=Ar(r,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const l=Mh(o);return r.getTime()>=i.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function lj(e){const t=ft(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Wl(e,...t){const r=Ar.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function Su(e,t){const r=ft(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function Ih(e,t,r){const[n,a]=Wl(r==null?void 0:r.in,e,t),i=Su(n),o=Su(a),l=+i-lj(i),c=+o-lj(o);return Math.round((l-c)/aje)}function cje(e,t){const r=SK(e,t),n=Ar(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Mh(n)}function LT(e,t,r){const n=ft(e,r==null?void 0:r.in);return n.setTime(n.getTime()+t*NN),n}function nO(e,t,r){return Hi(e,t*3,r)}function dje(e,t,r){return NK(e,t*1e3)}function cj(e,t,r){return Bi(e,t*7,r)}function bl(e,t,r){return Hi(e,t*12,r)}function tR(e,t){let r,n=t==null?void 0:t.in;return e.forEach(a=>{!n&&typeof a=="object"&&(n=Ar.bind(null,a));const i=ft(a,n);(!r||r<i||isNaN(+i))&&(r=i)}),Ar(n,r||NaN)}function rR(e,t){let r,n=t==null?void 0:t.in;return e.forEach(a=>{!n&&typeof a=="object"&&(n=Ar.bind(null,a));const i=ft(a,n);(!r||r>i||isNaN(+i))&&(r=i)}),Ar(n,r||NaN)}function uje(e,t,r){const[n,a]=Wl(r==null?void 0:r.in,e,t);return+Su(n)==+Su(a)}function jl(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function dj(e){return!(!jl(e)&&typeof e!="number"||isNaN(+ft(e)))}function uj(e,t,r){const[n,a]=Wl(r==null?void 0:r.in,e,t),i=n.getFullYear()-a.getFullYear(),o=n.getMonth()-a.getMonth();return i*12+o}function eu(e,t){const r=ft(e,t==null?void 0:t.in);return Math.trunc(r.getMonth()/3)+1}function fj(e,t,r){const[n,a]=Wl(r==null?void 0:r.in,e,t),i=n.getFullYear()-a.getFullYear(),o=eu(n)-eu(a);return i*4+o}function hj(e,t,r){const[n,a]=Wl(r==null?void 0:r.in,e,t);return n.getFullYear()-a.getFullYear()}function fje(e,t,r){const[n,a]=Wl(r==null?void 0:r.in,e,t),i=nR(n,a),o=Math.abs(Ih(n,a));n.setDate(n.getDate()-i*o);const l=+(nR(n,a)===-i),c=i*(o-l);return c===0?0:c}function nR(e,t){const r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function kK(e,t){const r=ft(e,t==null?void 0:t.in);return r.setHours(23,59,59,999),r}function CK(e,t){const r=ft(e,t==null?void 0:t.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function FT(e,t){const r=ft(e,t==null?void 0:t.in),n=r.getMonth(),a=n-n%3;return r.setMonth(a,1),r.setHours(0,0,0,0),r}function TK(e,t){const r=ft(e,t==null?void 0:t.in);return r.setDate(1),r.setHours(0,0,0,0),r}function _K(e,t){const r=ft(e,t==null?void 0:t.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function kN(e,t){const r=ft(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function hje(e,t){var l,c;const r=Bu(),n=r.weekStartsOn??((c=(l=r.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??0,a=ft(e,t==null?void 0:t.in),i=a.getDay(),o=(i<n?-7:0)+6-(i-n);return a.setDate(a.getDate()+o),a.setHours(23,59,59,999),a}const mje={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"}},pje=(e,t,r)=>{let n;const a=mje[e];
vendor: 4,534 bytes, line 671
671return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function QS(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const gje={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xje={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vje={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yje={date:QS({formats:gje,defaultWidth:"full"}),time:QS({formats:xje,defaultWidth:"full"}),dateTime:QS({formats:vje,defaultWidth:"full"})},bje={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jje=(e,t,r,n)=>bje[e];function vp(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):o;a=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const wje={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Nje={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Sje={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"]},kje={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","Friday","Saturday"]},Cje={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"}},Tje={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"}},_je=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Pje={ordinalNumber:_je,era:vp({values:wje,defaultWidth:"wide"}),quarter:vp({values:Nje,defaultWidth:"wide",argumentCallback:e=>e-1}),month:vp({values:Sje,defaultWidth:"wide"}),day:vp({values:kje,defaultWidth:"wide"}),dayPeriod:vp({values:Cje,defaultWidth:"wide",formattingValues:Tje,defaultFormattingWidth:"wide"})};function yp(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const o=i[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Oje(l,f=>f.test(o)):Eje(l,f=>f.test(o));let d;d=e.valueCallback?e.valueCallback(c):c,d=r.valueCallback?r.valueCallback(d):d;const u=t.slice(o.length);return{value:d,rest:u}}}function Eje(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function Oje(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Aje(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;const l=t.slice(a.length);return{value:o,rest:l}}}const Dje=/^(\d+)(th|st|nd|rd)?/i,Mje=/\d+/i,Ije={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},Rje={any:[/^b/i,/^(a|c)/i]},$je={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Lje={any:[/1/i,/2/i,/3/i,/4/i]}
vendor: 8,421 bytes, line 671
671,Fje={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},Bje={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]},Uje={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},zje={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]},Wje={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},Vje={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}},Hje={ordinalNumber:Aje({matchPattern:Dje,parsePattern:Mje,valueCallback:e=>parseInt(e,10)}),era:yp({matchPatterns:Ije,defaultMatchWidth:"wide",parsePatterns:Rje,defaultParseWidth:"any"}),quarter:yp({matchPatterns:$je,defaultMatchWidth:"wide",parsePatterns:Lje,defaultParseWidth:"any",valueCallback:e=>e+1}),month:yp({matchPatterns:Fje,defaultMatchWidth:"wide",parsePatterns:Bje,defaultParseWidth:"any"}),day:yp({matchPatterns:Uje,defaultMatchWidth:"wide",parsePatterns:zje,defaultParseWidth:"any"}),dayPeriod:yp({matchPatterns:Wje,defaultMatchWidth:"any",parsePatterns:Vje,defaultParseWidth:"any"})},PK={code:"en-US",formatDistance:pje,formatLong:yje,formatRelative:jje,localize:Pje,match:Hje,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qje(e,t){const r=ft(e,t==null?void 0:t.in);return Ih(r,kN(r))+1}function sO(e,t){const r=ft(e,t==null?void 0:t.in),n=+Mh(r)-+cje(r);return Math.round(n/wK)+1}function aO(e,t){var u,f,h,m;const r=ft(e,t==null?void 0:t.in),n=r.getFullYear(),a=Bu(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(h=a.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,o=Ar((t==null?void 0:t.in)||e,0);o.setFullYear(n+1,0,i),o.setHours(0,0,0,0);const l=Ll(o,t),c=Ar((t==null?void 0:t.in)||e,0);c.setFullYear(n,0,i),c.setHours(0,0,0,0);const d=Ll(c,t);return+r>=+l?n+1:+r>=+d?n:n-1}function Yje(e,t){var l,c,d,u;const r=Bu(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(d=r.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,a=aO(e,t),i=Ar((t==null?void 0:t.in)||e,0);return i.setFullYear(a,0,n),i.setHours(0,0,0,0),Ll(i,t)}function EK(e,t){const r=ft(e,t==null?void 0:t.in),n=+Ll(r,t)-+Yje(r,t);return Math.round(n/wK)+1}function _r(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const sc={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return _r(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):_r(r+1,2)},d(e,t){return _r(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return _r(e.getHours()%12||12,t.length)},H(e,t){return _r(e.getHours(),t.length)},m(e,t){return _r(e.getMinutes(),t.length)},s(e,t){return _r(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return _r(a,t.length)}},Xu={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sR={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return sc.y(e,t)},Y:function(e,t,r,n){const a=aO(e,n),i=a>0?a:1-a;if(t==="YY"){const o=i%100;return _r(o,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):_r(i,t.length)},R:function(e,t){const r=SK(e);return _r(r,t.length)},u:function(e,t){const r=e.getFullYear();return _r(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return _r(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return _r(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return sc.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return _r(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=EK(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):_r(a,t.length)},I:function(e,t,r){const n=sO(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):_r(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):sc.d(e,t)},D:function(e,t,r){const n=qje(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):_r(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return _r(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return _r(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return _r(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=Xu.noon:n===0?a=Xu.midnight:a=n/12>
vendor: 4,706 bytes, line 671
671=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=Xu.evening:n>=12?a=Xu.afternoon:n>=4?a=Xu.morning:a=Xu.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return sc.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):sc.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):_r(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):_r(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):sc.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):sc.s(e,t)},S:function(e,t){return sc.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return iR(n);case"XXXX":case"XX":return kd(n);case"XXXXX":case"XXX":default:return kd(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return iR(n);case"xxxx":case"xx":return kd(n);case"xxxxx":case"xxx":default:return kd(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+aR(n,":");case"OOOO":default:return"GMT"+kd(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+aR(n,":");case"zzzz":default:return"GMT"+kd(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return _r(n,t.length)},T:function(e,t,r){return _r(+e,t.length)}};function aR(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return i===0?r+String(a):r+String(a)+t+_r(i,2)}function iR(e,t){return e%60===0?(e>0?"-":"+")+_r(Math.abs(e)/60,2):kd(e,t)}function kd(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=_r(Math.trunc(n/60),2),i=_r(n%60,2);return r+a+t+i}const oR=(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"})}},OK=(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"})}},Gje=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return oR(e,t);let i;switch(n){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}}",oR(n,t)).replace("{{time}}",OK(a,t))},BT={p:OK,P:Gje},Kje=/^D+$/,Qje=/^Y+$/,Zje=["D","DD","YY","YYYY"];function Xje(e){return Kje.test(e)}function Jje(e){return Qje.test(e)}function ewe(e,t,r){const n=twe(e,t,r);if(console.warn(n),Zje.includes(e))throw new RangeError(n)}function twe(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const rwe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nwe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,swe=/^'([^]*?)'?$/,awe=/''/g,iwe=/[a-zA-Z]/;function lR(e,t,r){var u,f,h,m,g,x,v,b;const n=Bu(),a=(r==null?void 0:r.locale)??n.locale??PK,i=(r==null?void 0:r.firstWeekContainsDate)??((f=(u=r==null?void 0:r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,o=(r==null?void 0:r.weekStartsOn)??((x=(g=r==null?void 0:r.locale)==null?void 0:g.options)==null?void 0:x.weekStartsOn)??n.weekStartsOn??((b=(v=n.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,l=ft(e,r==null?void 0:r.in);if(!dj(l))throw new RangeError("Invalid time value");let c=t.match(nwe).map(y=>{const j=y[0];if(j==="p"||j==="P"){const w=BT[j];return w(y,a.formatLong)}return y}).join("").match(rwe).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const j=y[0];if(j==="'")return{isToken:!1,value:owe(y)};if(sR[j])return{isToken:!0,value:y};
vendor: 26,594 bytes, line 671
671if(j.match(iwe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return{isToken:!1,value:y}});a.localize.preprocessor&&(c=a.localize.preprocessor(l,c));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return c.map(y=>{if(!y.isToken)return y.value;const j=y.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&Jje(j)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&Xje(j))&&ewe(j,t,String(e));const w=sR[j[0]];return w(l,j,a.localize,d)}).join("")}function owe(e){const t=e.match(swe);return t?t[1].replace(awe,"'"):e}function cR(e,t){return ft(e,t==null?void 0:t.in).getDate()}function lwe(e,t){return ft(e,t==null?void 0:t.in).getDay()}function cwe(e,t){const r=ft(e,t==null?void 0:t.in),n=r.getFullYear(),a=r.getMonth(),i=Ar(r,0);return i.setFullYear(n,a+1,0),i.setHours(0,0,0,0),i.getDate()}function dwe(){return Object.assign({},Bu())}function wl(e,t){return ft(e,t==null?void 0:t.in).getHours()}function uwe(e,t){const r=ft(e,t==null?void 0:t.in).getDay();return r===0?7:r}function Nl(e,t){return ft(e,t==null?void 0:t.in).getMinutes()}function Ks(e,t){return ft(e,t==null?void 0:t.in).getMonth()}function Uc(e){return ft(e).getSeconds()}function UT(e){return+ft(e)}function er(e,t){return ft(e,t==null?void 0:t.in).getFullYear()}function nd(e,t){return+ft(e)>+ft(t)}function ku(e,t){return+ft(e)<+ft(t)}function fwe(e,t){return+ft(e)==+ft(t)}function hwe(e,t){const r=mwe(t)?new t(0):Ar(t,0);return r.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),r.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),r}function mwe(e){var t;return typeof e=="function"&&((t=e.prototype)==null?void 0:t.constructor)===e}const pwe=10;class AK{constructor(){$(this,"subPriority",0)}validate(t,r){return!0}}class gwe extends AK{constructor(t,r,n,a,i){super(),this.value=t,this.validateValue=r,this.setValue=n,this.priority=a,i&&(this.subPriority=i)}validate(t,r){return this.validateValue(t,this.value,r)}set(t,r,n){return this.setValue(t,r,this.value,n)}}class xwe extends AK{constructor(r,n){super();$(this,"priority",pwe);$(this,"subPriority",-1);this.context=r||(a=>Ar(n,a))}set(r,n){return n.timestampIsSet?r:Ar(r,hwe(r,this.context))}}class br{run(t,r,n,a){const i=this.parse(t,r,n,a);return i?{setter:new gwe(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,r,n){return!0}}class vwe extends br{constructor(){super(...arguments);$(this,"priority",140);$(this,"incompatibleTokens",["R","u","t","T"])}parse(r,n,a){switch(n){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"})||a.era(r,{width:"narrow"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})||a.era(r,{width:"abbreviated"})||a.era(r,{width:"narrow"})}}set(r,n,a){return n.era=a,r.setFullYear(a,0,1),r.setHours(0,0,0,0),r}}const En={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},go={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function On(e,t){return e&&{value:t(e.value),rest:e.rest}}function hn(e,t){const r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function xo(e,t){const r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};const n=r[1]==="+"?1:-1,a=r[2]?parseInt(r[2],10):0,i=r[3]?parseInt(r[3],10):0,o=r[5]?parseInt(r[5],10):0;return{value:n*(a*SN+i*NN+o*ije),rest:t.slice(r[0].length)}}function DK(e){return hn(En.anyDigitsSigned,e)}function kn(e,t){switch(e){case 1:return hn(En.singleDigit,t);case 2:return hn(En.twoDigits,t);case 3:return hn(En.threeDigits,t);case 4:return hn(En.fourDigits,t);default:return hn(new RegExp("^\\d{1,"+e+"}"),t)}}function mj(e,t){switch(e){case 1:return hn(En.singleDigitSigned,t);case 2:return hn(En.twoDigitsSigned,t);case 3:return hn(En.threeDigitsSigned,t);case 4:return hn(En.fourDigitsSigned,t);default:return hn(new RegExp("^-?\\d{1,"+e+"}"),t)}}function iO(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function MK(e,t){const r=t>0,n=r?t:1-t;let a;if(n<=50)a=e||100;else{const i=n+50,o=Math.trunc(i/100)*100,l=e>=i%100;a=e+o-(l?100:0)}return r?a:1-a}function IK(e){return e%400===0||e%4===0&&e%100!==0}class ywe extends br{constructor(){super(...arguments);$(this,"priority",130);$(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(r,n,a){const i=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return On(kn(4,r),i);case"yo":return On(a.ordinalNumber(r,{unit:"year"}),i);default:return On(kn(n.length,r),i)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,a){const i=r.getFullYear();if(a.isTwoDigitYear){const l=MK(a.year,i);return r.setFullYear(l,0,1),r.setHours(0,0,0,0),r}const o=!("era"in n)||n.era===1?a.year:1-a.year;return r.setFullYear(o,0,1),r.setHours(0,0,0,0),r}}class bwe extends br{constructor(){super(...arguments);$(this,"priority",130);$(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(r,n,a){const i=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return On(kn(4,r),i);case"Yo":return On(a.ordinalNumber(r,{unit:"year"}),i);default:return On(kn(n.length,r),i)}}validate(r,n){return n.isTwoDigitYear||n.year>0}set(r,n,a,i){const o=aO(r,i);if(a.isTwoDigitYear){const c=MK(a.year,o);return r.setFullYear(c,0,i.firstWeekContainsDate),r.setHours(0,0,0,0),Ll(r,i)}const l=!("era"in n)||n.era===1?a.year:1-a.year;return r.setFullYear(l,0,i.firstWeekContainsDate),r.setHours(0,0,0,0),Ll(r,i)}}class jwe extends br{constructor(){super(...arguments);$(this,"priority",130);$(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(r,n){return mj(n==="R"?4:n.length,r)}set(r,n,a){const i=Ar(r,0);return i.setFullYear(a,0,4),i.setHours(0,0,0,0),Mh(i)}}class wwe extends br{constructor(){super(...arguments);$(this,"priority",130);$(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(r,n){return mj(n==="u"?4:n.length,r)}set(r,n,a){return r.setFullYear(a,0,1),r.setHours(0,0,0,0),r}}class Nwe extends br{constructor(){super(...arguments);$(this,"priority",120);$(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"Q":case"QQ":return kn(n.length,r);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"})||a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})||a.quarter(r,{width:"abbreviated",context:"formatting"})||a.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=1&&n<=4}set(r,n,a){return r.setMonth((a-1)*3,1),r.setHours(0,0,0,0),r}}class Swe extends br{constructor(){super(...arguments);$(this,"priority",120);$(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"q":case"qq":return kn(n.length,r);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"})||a.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})||a.quarter(r,{width:"abbreviated",context:"standalone"})||a.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=1&&n<=4}set(r,n,a){return r.setMonth((a-1)*3,1),r.setHours(0,0,0,0),r}}class kwe extends br{constructor(){super(...arguments);$(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);$(this,"priority",110)}parse(r,n,a){const i=o=>o-1;switch(n){case"M":return On(hn(En.month,r),i);case"MM":return On(kn(2,r),i);case"Mo":return On(a.ordinalNumber(r,{unit:"month"}),i);case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"})||a.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})||a.month(r,{width:"abbreviated",context:"formatting"})||a.month(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=11}set(r,n,a){return r.setMonth(a,1),r.setHours(0,0,0,0),r}}class Cwe extends br{constructor(){super(...arguments);$(this,"priority",110);$(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(r,n,a){const i=o=>o-1;switch(n){case"L":return On(hn(En.month,r),i);case"LL":return On(kn(2,r),i);case"Lo":return On(a.ordinalNumber(r,{unit:"month"}),i);case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"})||a.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})||a.month(r,{width:"abbreviated",context:"standalone"})||a.month(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=11}set(r,n,a){return r.setMonth(a,1),r.setHours(0,0,0,0),r}}function Twe(e,t,r){const n=ft(e,r==null?void 0:r.in),a=EK(n,r)-t;return n.setDate(n.getDate()-a*7),ft(n,r==null?void 0:r.in)}class _we extends br{constructor(){super(...arguments);$(this,"priority",100);$(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(r,n,a){switch(n){case"w":return hn(En.week,r);case"wo":return a.ordinalNumber(r,{unit:"week"});default:return kn(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,a,i){return Ll(Twe(r,a,i),i)}}function Pwe(e,t,r){const n=ft(e,r==null?void 0:r.in),a=sO(n,r)-t;return n.setDate(n.getDate()-a*7),n}class Ewe extends br{constructor(){super(...arguments);$(this,"priority",100);$(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(r,n,a){switch(n){case"I":return hn(En.week,r);case"Io":return a.ordinalNumber(r,{unit:"week"});default:return kn(n.length,r)}}validate(r,n){return n>=1&&n<=53}set(r,n,a){return Mh(Pwe(r,a))}}const Owe=[31,28,31,30,31,30,31,31,30,31,30,31],Awe=[31,29,31,30,31,30,31,31,30,31,30,31];class Dwe extends br{constructor(){super(...arguments);$(this,"priority",90);$(this,"subPriority",1);$(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"d":return hn(En.date,r);case"do":return a.ordinalNumber(r,{unit:"date"});default:return kn(n.length,r)}}validate(r,n){const a=r.getFullYear(),i=IK(a),o=r.getMonth();return i?n>=1&&n<=Awe[o]:n>=1&&n<=Owe[o]}set(r,n,a){return r.setDate(a),r.setHours(0,0,0,0),r}}class Mwe extends br{constructor(){super(...arguments);$(this,"priority",90);$(this,"subpriority",1);$(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(r,n,a){switch(n){case"D":case"DD":return hn(En.dayOfYear,r);case"Do":return a.ordinalNumber(r,{unit:"date"});default:return kn(n.length,r)}}validate(r,n){const a=r.getFullYear();return IK(a)?n>=1&&n<=366:n>=1&&n<=365}set(r,n,a){return r.setMonth(0,a),r.setHours(0,0,0,0),r}}function oO(e,t,r){var f,h,m,g;const n=Bu(),a=(r==null?void 0:r.weekStartsOn)??((h=(f=r==null?void 0:r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??n.weekStartsOn??((g=(m=n.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,i=ft(e,r==null?void 0:r.in),o=i.getDay(),c=(t%7+7)%7,d=7-a,u=t<0||t>6?t-(o+d)%7:(c+d)%7-(o+d)%7;return Bi(i,u,r)}class Iwe extends br{constructor(){super(...arguments);$(this,"priority",90);$(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(r,n,a){switch(n){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})||a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,a,i){return r=oO(r,a,i),r.setHours(0,0,0,0),r}}class Rwe extends br{constructor(){super(...arguments);$(this,"priority",90);$(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(r,n,a,i){const o=l=>{const c=Math.floor((l-1)/7)*7;return(l+i.weekStartsOn+6)%7+c};switch(n){case"e":case"ee":return On(kn(n.length,r),o);case"eo":return On(a.ordinalNumber(r,{unit:"day"}),o);case"eee":return a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"eeeee":return a.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(r,{width:"wide",context:"formatting"})||a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"})}}validate(r,n){return n>=0&&n<=6}set(r,n,a,i){return r=oO(r,a,i),r.setHours(0,0,0,0),r}}class $we extends br{constructor(){super(...arguments);$(this,"priority",90);$(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(r,n,a,i){const o=l=>{const c=Math.floor((l-1)/7)*7;return(l+i.weekStartsOn+6)%7+c};switch(n){case"c":case"cc":return On(kn(n.length,r),o);case"co":return On(a.ordinalNumber(r,{unit:"day"}),o);case"ccc":return a.day(r,{width:"abbreviated",context:"standalone"})||a.day(r,{width:"short",context:"standalone"})||a.day(r,{width:"narrow",context:"standalone"});case"ccccc":return a.day(r,{width:"narrow",context:"standalone"});case"cccccc":return a.day(r,{width:"short",context:"standalone"})||a.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(r,{width:"wide",context:"standalone"})||a.day(r,{width:"abbreviated",context:"standalone"})||a.day(r,{width:"short",context:"standalone"})||a.day(r,{width:"narrow",context:"standalone"})}}validate(r,n){return n>=0&&n<=6}set(r,n,a,i){return r=oO(r,a,i),r.setHours(0,0,0,0),r}}function Lwe(e,t,r){const n=ft(e,r==null?void 0:r.in),a=uwe(n,r),i=t-a;return Bi(n,i,r)}class Fwe extends br{constructor(){super(...arguments);$(this,"priority",90);$(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(r,n,a){const i=o=>o===0?7:o;switch(n){case"i":case"ii":return kn(n.length,r);case"io":return a.ordinalNumber(r,{unit:"day"});case"iii":return On(a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"}),i);case"iiiii":return On(a.day(r,{width:"narrow",context:"formatting"}),i);case"iiiiii":return On(a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"}),i);case"iiii":default:return On(a.day(r,{width:"wide",context:"formatting"})||a.day(r,{width:"abbreviated",context:"formatting"})||a.day(r,{width:"short",context:"formatting"})||a.day(r,{width:"narrow",context:"formatting"}),i)}}validate(r,n){return n>=1&&n<=7}set(r,n,a){return r=Lwe(r,a),r.setHours(0,0,0,0),r}}class Bwe extends br{constructor(){super(...arguments);$(this,"priority",80);$(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(r,n,a){switch(n){case"a":case"aa":case"aaa":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})||a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,a){return r.setHours(iO(a),0,0,0),r}}class Uwe extends br{constructor(){super(...arguments);$(this,"priority",80);$(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(r,n,a){switch(n){case"b":case"bb":case"bbb":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})||a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,a){return r.setHours(iO(a),0,0,0),r}}class zwe extends br{constructor(){super(...arguments);$(this,"priority",80);$(this,"incompatibleTokens",["a","b","t","T"])}parse(r,n,a){switch(n){case"B":case"BB":case"BBB":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})||a.dayPeriod(r,{width:"abbreviated",context:"formatting"})||a.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,n,a){return r.setHours(iO(a),0,0,0),r}}class Wwe extends br{constructor(){super(...arguments);$(this,"priority",70);$(this,"incompatibleTokens",["H","K","k","t","T"])}parse(r,n,a){switch(n){case"h":return hn(En.hour12h,r);case"ho":return a.ordinalNumber(r,{unit:"hour"});default:return kn(n.length,r)}}validate(r,n){return n>=1&&n<=12}set(r,n,a){const i=r.getHours()>=12;return i&&a<12?r.setHours(a+12,0,0,0):!i&&a===12?r.setHours(0,0,0,0):r.setHours(a,0,0,0),r}}class Vwe extends br{constructor(){super(...arguments);$(this,"priority",70);$(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(r,n,a){switch(n){case"H":return hn(En.hour23h,r);case"Ho":return a.ordinalNumber(r,{unit:"hour"});default:return kn(n.length,r)}}validate(r,n){return n>=0&&n<=23}set(r,n,a){return r.setHours(a,0,0,0),r}}class Hwe extends br{constructor(){super(...arguments);$(this,"priority",70);$(this,"incompatibleTokens",["h","H","k","t","T"])}parse(r,n,a){switch(n){case"K":return hn(En.hour11h,r);case"Ko":return a.ordinalNumber(r,{unit:"hour"});default:return kn(n.length,r)}}validate(r,n){return n>=0&&n<=11}set(r,n,a){return r.getHours()>=12&&a<12?r.setHours(a+12,0,0,0):r.setHours(a,0,0,0),r}}class qwe extends br{constructor(){super(...arguments);$(this,"priority",70);$(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(r,n,a){switch(n){case"k":return hn(En.hour24h,r);case"ko":return a.ordinalNumber(r,{unit:"hour"});default:return kn(n.length,r)}}validate(r,n){return n>=1&&n<=24}set(r,n,a){const i=a<=24?a%24:a;return r.setHours(i,0,0,0),r}}class Ywe extends br{constructor(){super(...arguments);$(this,"priority",60);$(this,"incompatibleTokens",["t","T"])}parse(r,n,a){switch(n){case"m":return hn(En.minute,r);case"mo":return a.ordinalNumber(r,{unit:"minute"});default:return kn(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,a){return r.setMinutes(a,0,0),r}}class Gwe extends br{constructor(){super(...arguments);$(this,"priority",50);$(this,"incompatibleTokens",["t","T"])}parse(r,n,a){switch(n){case"s":return hn(En.second,r);case"so":return a.ordinalNumber(r,{unit:"second"});default:return kn(n.length,r)}}validate(r,n){return n>=0&&n<=59}set(r,n,a){return r.setSeconds(a,0),r}}class Kwe extends br{constructor(){super(...arguments);$(this,"priority",30);$(this,"incompatibleTokens",["t","T"])}parse(r,n){const a=i=>Math.trunc(i*Math.pow(10,-n.length+3));return On(kn(n.length,r),a)}set(r,n,a){return r.setMilliseconds(a),r}}class Qwe extends br{constructor(){super(...arguments);$(this,"priority",10);$(this,"incompatibleTokens",["t","T","x"])}parse(r,n){switch(n){case"X":return xo(go.basicOptionalMinutes,r);case"XX":return xo(go.basic,r);case"XXXX":return xo(go.basicOptionalSeconds,r);case"XXXXX":return xo(go.extendedOptionalSeconds,r);case"XXX":default:return xo(go.extended,r)}}set(r,n,a){return n.timestampIsSet?r:Ar(r,r.getTime()-lj(r)-a)}}class Zwe extends br{constructor(){super(...arguments);$(this,"priority",10);$(this,"incompatibleTokens",["t","T","X"])}parse(r,n){switch(n){case"x":return xo(go.basicOptionalMinutes,r);case"xx":return xo(go.basic,r);case"xxxx":return xo(go.basicOptionalSeconds,r);case"xxxxx":return xo(go.extendedOptionalSeconds,r);case"xxx":default:return xo(go.extended,r)}}set(r,n,a){return n.timestampIsSet?r:Ar(r,r.getTime()-lj(r)-a)}}class Xwe extends br{constructor(){super(...arguments);$(this,"priority",40);$(this,"incompatibleTokens","*")}parse(r){return DK(r)}set(r,n,a){return[Ar(r,a*1e3),{timestampIsSet:!0}]}}class Jwe extends br{constructor(){super(...arguments);$(this,"priority",20);$(this,"incompatibleTokens","*")}parse(r){return DK(r)}set(r,n,a){return[Ar(r,a),{timestampIsSet:!0}]}}const eNe={G:new vwe,y:new ywe,Y:new bwe,R:new jwe,u:new wwe,Q:new Nwe,q:new Swe,M:new kwe,L:new Cwe,w:new _we,I:new Ewe,d:new Dwe,D:new Mwe,E:new Iwe,e:new Rwe,c:new $we,i:new Fwe,a:new Bwe,b:new Uwe,B:new zwe,h:new Wwe,H:new Vwe,K:new Hwe,k:new qwe,m:new Ywe,s:new Gwe,S:new Kwe,X:new Qwe,x:new Zwe,t:new Xwe,T:new Jwe},tNe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rNe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nNe=/^'([^]*?)'?$/,sNe=/''/g,aNe=/\S/,iNe=/[a-zA-Z]/;function oNe(e,t,r,n){var v,b,y,j,w,N,S,k;const a=()=>Ar((n==null?void 0:n.in)||r,NaN),i=dwe(),o=(n==null?void 0:n.locale)??i.locale??PK,l=(n==null?void 0:n.firstWeekContainsDate)??((b=(v=n==null?void 0:n.locale)==null?void 0:v.options)==null?void 0:b.firstWeekContainsDate)??i.firstWeekContainsDate??((j=(y=i.locale)==null?void 0:y.options)==null?void 0:j.firstWeekContainsDate)??1,c=(n==null?void 0:n.weekStartsOn)??((N=(w=n==null?void 0:n.locale)==null?void 0:w.options)==null?void 0:N.weekStartsOn)??i.weekStartsOn??((k=(S=i.locale)==null?void 0:S.options)==null?void 0:k.weekStartsOn)??0;if(!t)return e?a():ft(r,n==null?void 0:n.in);const d={firstWeekContainsDate:l,weekStartsOn:c,locale:o},u=[new xwe(n==null?void 0:n.in,r)],f=t.match(rNe).map(T=>{const C=T[0];if(C in BT){const E=BT[C];return E(T,o.formatLong)}return T}).join("").match(tNe),h=[];for(let T of f){const C=T[0],E=eNe[C];if(E){const{incompatibleTokens:P}=E;if(Array.isArray(P)){const I=h.find(F=>P.includes(F.token)||F.token===C);if(I)throw new RangeError(`The format string mustn't contain \`${I.fullToken}\` and \`${T}\` at the same time`)}else if(E.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);h.push({token:C,fullToken:T});const _=E.run(e,T,o.match,d);if(!_)return a();u.push(_.setter),e=_.rest}else{if(C.match(iNe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");if(T==="''"?T="'":C==="'"&&(T=lNe(T)),e.indexOf(T)===0)e=e.slice(T.length);else return a()}}if(e.length>0&&aNe.test(e))return a();const m=u.map(T=>T.priority).sort((T,C)=>C-T).filter((T,C,E)=>E.indexOf(T)===C).map(T=>u.filter(C=>C.priority===T).sort((C,E)=>E.subPriority-C.subPriority)).map(T=>T[0]);let g=ft(r,n==null?void 0:n.in);if(isNaN(+g))return a();const x={};for(const T of m){if(!T.validate(g,d))return a();const C=T.set(g,x,d);Array.isArray(C)?(g=C[0],Object.assign(x,C[1])):g=C}return g}function lNe(e){return e.match(nNe)[1].replace(sNe,"'")}function cNe(e,t,r){const[n,a]=Wl(r==null?void 0:r.in,e,t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}function dNe(e,t,r){const[n,a]=Wl(r==null?void 0:r.in,e,t);return+FT(n)==+FT(a)}function uNe(e,t,r){const[n,a]=Wl(r==null?void 0:r.in,e,t);return n.getFullYear()===a.getFullYear()}function fx(e,t,r){const n=+ft(e,r==null?void 0:r.in),[a,i]=[+ft(t.start,r==null?void 0:r.in),+ft(t.end,r==null?void 0:r.in)].sort((o,l)=>o-l);return n>=a&&n<=i}function fNe(e,t,r){return Bi(e,-t,r)}function hNe(e,t){const r=()=>Ar(t==null?void 0:t.in,NaN),a=xNe(e);let i;if(a.date){const d=vNe(a.date,2);i=yNe(d.restDateString,d.year)}if(!i||isNaN(+i))return r();const o=+i;let l=0,c;if(a.time&&(l=bNe(a.time),isNaN(l)))return r();if(a.timezone){if(c=jNe(a.timezone),isNaN(c))return r()}else{const d=new Date(o+l),u=ft(0,t==null?void 0:t.in);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return ft(o+l+c,t==null?void 0:t.in)}const Uy={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},mNe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,pNe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,gNe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function xNe(e){const t={},r=e.split(Uy.dateTimeDelimiter);let n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Uy.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Uy.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){const a=Uy.timezone.exec(n);a?(t.time=n.replace(a[1],""),t.timezone=a[1]):t.time=n}return t}function vNe(e,t){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};const a=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((n[1]||n[2]).length)}}function yNe(e,t){if(t===null)return new Date(NaN);const r=e.match(mNe);if(!r)return new Date(NaN);const n=!!r[4],a=bp(r[1]),i=bp(r[2])-1,o=bp(r[3]),l=bp(r[4]),c=bp(r[5])-1;if(n)return CNe(t,l,c)?wNe(t,l,c):new Date(NaN);{const d=new Date(0);return!SNe(t,i,o)||!kNe(t,a)?new Date(NaN):(d.setUTCFullYear(t,i,Math.max(a,o)),d)}}function bp(e){return e?parseInt(e):1}function bNe(e){const t=e.match(pNe);if(!t)return NaN;const r=ZS(t[1]),n=ZS(t[2]),a=ZS(t[3]);return TNe(r,n,a)?r*SN+n*NN+a*1e3:NaN}function ZS(e){return e&&parseFloat(e.replace(",","."))||0}function jNe(e){if(e==="Z")return 0;const t=e.match(gNe);if(!t)return 0;
671const r=t[1]==="+"?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return _Ne(n,a)?r*(n*SN+a*NN):NaN}function wNe(e,t,r){const n=new Date(0);n.setUTCFullYear(e,0,4);const a=n.getUTCDay()||7,i=(t-1)*7+r+1-a;return n.setUTCDate(n.getUTCDate()+i),n}const NNe=[31,null,31,30,31,30,31,31,30,31,30,31];function RK(e){return e%400===0||e%4===0&&e%100!==0}function SNe(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(NNe[t]||(RK(e)?29:28))}function kNe(e,t){return t>=1&&t<=(RK(e)?366:365)}function CNe(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function TNe(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function _Ne(e,t){return t>=0&&t<=59}function ei(e,t,r){const n=ft(e,r==null?void 0:r.in),a=n.getFullYear(),i=n.getDate(),o=Ar(e,0);o.setFullYear(a,t,15),o.setHours(0,0,0,0);const l=cwe(o);return n.setMonth(t,Math.min(i,l)),n}function Bb(e,t,r){const n=ft(e,r==null?void 0:r.in);return n.setHours(t),n}function Ub(e,t,r){const n=ft(e,r==null?void 0:r.in);return n.setMinutes(t),n}function af(e,t,r){const n=ft(e,r==null?void 0:r.in),a=Math.trunc(n.getMonth()/3)+1,i=t-a;return ei(n,n.getMonth()+i*3)}function zb(e,t,r){const n=ft(e,r==null?void 0:r.in);return n.setSeconds(t),n}function no(e,t,r){const n=ft(e,r==null?void 0:r.in);return isNaN(+n)?Ar(e,NaN):(n.setFullYear(t),n)}function tu(e,t,r){return Hi(e,-t,r)}function $K(e,t,r){return nO(e,-t,r)}function dR(e,t,r){return cj(e,-t,r)}function Rh(e,t,r){return bl(e,-t,r)}const LK={...PP},PNe=LK.useInsertionEffect,ENe=PNe||(e=>e());function ONe(e){const t=p.useRef(()=>{});return ENe(()=>{t.current=e}),p.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.current==null?void 0:t.current(...n)},[])}var pj=typeof document<"u"?p.useLayoutEffect:p.useEffect;let uR=!1,ANe=0;const fR=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ANe++;function DNe(){const[e,t]=p.useState(()=>uR?fR():void 0);return pj(()=>{e==null&&t(fR())},[]),p.useEffect(()=>{uR=!0},[]),e}const MNe=LK.useId,FK=MNe||DNe,INe=p.forwardRef(function(t,r){const{context:{placement:n,elements:{floating:a},middlewareData:{arrow:i,shift:o}},width:l=14,height:c=7,tipRadius:d=0,strokeWidth:u=0,staticOffset:f,stroke:h,d:m,style:{transform:g,...x}={},...v}=t,b=FK(),[y,j]=p.useState(!1);if(pj(()=>{if(!a)return;fi(a).direction==="rtl"&&j(!0)},[a]),!a)return null;const[w,N]=n.split("-"),S=w==="top"||w==="bottom";let k=f;(S&&o!=null&&o.x||!S&&o!=null&&o.y)&&(k=null);const T=u*2,C=T/2,E=l/2*(d/-8+1),P=c/2*d/4,_=!!m,I=k&&N==="end"?"bottom":"top";let F=k&&N==="end"?"right":"left";k&&y&&(F=N==="end"?"left":"right");const H=(i==null?void 0:i.x)!=null?k||i.x:"",W=(i==null?void 0:i.y)!=null?k||i.y:"",z=m||"M0,0"+(" H"+l)+(" L"+(l-E)+","+(c-P))+(" Q"+l/2+","+c+" "+E+","+(c-P))+" Z",R={top:_?"rotate(180deg)":"",left:_?"rotate(90deg)":"rotate(-90deg)",bottom:_?"":"rotate(180deg)",right:_?"rotate(-90deg)":"rotate(90deg)"}[w];return s.jsxs("svg",{...v,"aria-hidden":!0,ref:r,width:_?l:l+T,height:l,viewBox:"0 0 "+l+" "+(c>l?c:l),style:{position:"absolute",pointerEvents:"none",[F]:H,[I]:W,[w]:S||_?"100%":"calc(100% - "+T/2+"px)",transform:[R,g].filter(q=>!!q).join(" "),...x},children:[T>0&&s.jsx("path",{clipPath:"url(#"+b+")",fill:"none",stroke:h,strokeWidth:T+(m?0:1),d:z}),s.jsx("path",{stroke:T&&!m?v.fill:"none",d:z}),s.jsx("clipPath",{id:b,children:s.jsx("rect",{x:-C,y:C*(_?-1:1),width:l+T,height:l})})]})});function RNe(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(a=>a(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(a=>a!==r))||[])}}}const $Ne=p.createContext(null),LNe=p.createContext(null),FNe=()=>{var e;return((e=p.useContext($Ne))==null?void 0:e.id)||null},BNe=()=>p.useContext(LNe);function UNe(e){const{open:t=!1,onOpenChange:r,elements:n}=e,a=FK(),i=p.useRef({}),[o]=p.useState(()=>RNe()),l=FNe()!=null,[c,d]=p.useState(n.reference),u=ONe((m,g,x)=>{i.current.openEvent=m?g:void 0,o.emit("openchange",{open:m,event:g,reason:x,nested:l}),r==null||r(m,g,x)}),f=p.useMemo(()=>({setPositionReference:d}),[]),h=p.useMemo(()=>({reference:c||n.reference||null,floating:n.floating||null,domReference:n.reference}),[c,n.reference,n.floating]);return p.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:o,floatingId:a,refs:f}),[t,u,h,o,a,f])}function zNe(e){e===void 0&&(e={});const{nodeId:t}=e,r=UNe({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,a=n.elements,[i,o]=p.useState(null),[l,c]=p.useState(null),u=(a==null?void 0:a.domReference)||i,f=p.useRef(null),h=BNe();pj(()=>{u&&(f.current=u)},[u]);const m=bq({...e,elements:{...a,...l&&{reference:l}}}),g=p.useCallback(j=>{const w=Gs(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;c(w),m.refs.setReference(w)},[m.refs]),x=p.useCallback(j=>{(Gs(j)||j===null)&&(f.current=j,o(j)),(Gs(m.refs.reference.current)||m.refs.reference.current===null||j!==null&&!Gs(j))&&m.refs.setReference(j)},[m.refs]),v=p.useMemo(()=>({...m.refs,setReference:x,setPositionReference:g,domReference:f}),[m.refs,x,g]),b=p.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),y=p.useMemo(()=>({...m,...n,refs:v,elements:b,nodeId:t}),[m,v,b,t,n]);return pj(()=>{n.dataRef.current.floatingContext=y;const j=h==null?void 0:h.nodesRef.current.find(w=>w.id===t);j&&(j.context=y)}),p.useMemo(()=>({...m,context:y,refs:v,elements:b}),[m,v,b,y])}/*! 672 react-datepicker v8.2.1 673 https://github.com/Hacker0x01/react-datepicker 674 Released under the MIT License. 675*/var zT=function(t,r){return zT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},zT(t,r)};function os(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");zT(e,t);function r(){this.constructor=e}
675e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var mr=function(){return mr=Object.assign||function(r){for(var n,a=1,i=arguments.length;a<i;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r},mr.apply(this,arguments)};function Co(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var WNe=function(e){var t=e.showTimeSelectOnly,r=t===void 0?!1:t,n=e.showTime,a=n===void 0?!1:n,i=e.className,o=e.children,l=r?"Choose Time":"Choose Date".concat(a?" and Time":"");return O.createElement("div",{className:i,role:"dialog","aria-label":l,"aria-modal":"true"},o)},VNe=function(e,t){var r=p.useRef(null),n=p.useRef(e);n.current=e;var a=p.useCallback(function(i){var o,l=i.composed&&i.composedPath&&i.composedPath().find(function(c){return c instanceof Node})||i.target;r.current&&!r.current.contains(l)&&(t&&l instanceof HTMLElement&&l.classList.contains(t)||(o=n.current)===null||o===void 0||o.call(n,i))},[t]);return p.useEffect(function(){return document.addEventListener("mousedown",a),function(){document.removeEventListener("mousedown",a)}},[a]),r},CN=function(e){var t=e.children,r=e.onClickOutside,n=e.className,a=e.containerRef,i=e.style,o=e.ignoreClass,l=VNe(r,o);return O.createElement("div",{className:n,style:i,ref:function(c){l.current=c,a&&(a.current=c)}},t)},Ye;(function(e){e.ArrowUp="ArrowUp",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.PageUp="PageUp",e.PageDown="PageDown",e.Home="Home",e.End="End",e.Enter="Enter",e.Space=" ",e.Tab="Tab",e.Escape="Escape",e.Backspace="Backspace",e.X="x"})(Ye||(Ye={}));function BK(){var e=typeof window<"u"?window:globalThis;return e}var Iv=12;function kr(e){if(e==null)return new Date;var t=typeof e=="string"?hNe(e):ft(e);return TN(t)?t:new Date}function XS(e,t,r,n,a){a===void 0&&(a=kr());for(var i=$h(r)||$h(lO()),o=Array.isArray(t)?t:[t],l=0,c=o;l<c.length;l++){var d=c[l],u=oNe(e,d,a,{locale:i,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});if(TN(u)&&(!n||e===an(u,d,r)))return u}return null}function TN(e,t){return dj(e)&&!ku(e,new Date("1/1/1800"))}function an(e,t,r){if(r==="en")return lR(e,t,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var n=r?$h(r):void 0;return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),n=n||$h(lO()),lR(e,t,{locale:n,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function Xa(e,t){var r=t.dateFormat,n=t.locale,a=Array.isArray(r)&&r.length>0?r[0]:r;return e&&an(e,a,n)||""}function HNe(e,t,r){if(!e)return"";var n=Xa(e,r),a=t?Xa(t,r):"";return"".concat(n," - ").concat(a)}function qNe(e,t){if(!(e!=null&&e.length))return"";var r=e[0]?Xa(e[0],t):"";if(e.length===1)return r;if(e.length===2&&e[1]){var n=Xa(e[1],t);return"".concat(r,", ").concat(n)}var a=e.length-1;return"".concat(r," (+").concat(a,")")}function JS(e,t){var r=t.hour,n=r===void 0?0:r,a=t.minute,i=a===void 0?0:a,o=t.second,l=o===void 0?0:o;return Bb(Ub(zb(e,l),i),n)}function YNe(e){return sO(e)}function GNe(e,t){return an(e,"ddd",t)}function Wb(e){return Su(e)}function zc(e,t,r){var n=$h(t||lO());return Ll(e,{locale:n,weekStartsOn:r})}function Sl(e){return TK(e)}function Yp(e){return kN(e)}function hR(e){return FT(e)}function mR(){return Su(kr())}function pR(e){return kK(e)}function KNe(e){return hje(e)}function QNe(e){return CK(e)}function uo(e,t){return e&&t?uNe(e,t):!e&&!t}function Ws(e,t){return e&&t?cNe(e,t):!e&&!t}function gj(e,t){return e&&t?dNe(e,t):!e&&!t}function hr(e,t){return e&&t?uje(e,t):!e&&!t}function Rd(e,t){return e&&t?fwe(e,t):!e&&!t}function Gp(e,t,r){var n,a=Su(t),i=kK(r);try{n=fx(e,{start:a,end:i})}catch{n=!1}return n}function lO(){var e=BK();return e.__localeId__}function $h(e){if(typeof e=="string"){var t=BK();return t.__localeData__?t.__localeData__[e]:void 0}else return e}function ZNe(e,t,r){return t(an(e,"EEEE",r))}function XNe(e,t){return an(e,"EEEEEE",t)}function JNe(e,t){return an(e,"EEE",t)}
675function cO(e,t){return an(ei(kr(),e),"LLLL",t)}function UK(e,t){return an(ei(kr(),e),"LLL",t)}function e1e(e,t){return an(af(kr(),e),"QQQ",t)}function ni(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.maxDate,i=r.excludeDates,o=r.excludeDateIntervals,l=r.includeDates,c=r.includeDateIntervals,d=r.filterDate;return Rv(e,{minDate:n,maxDate:a})||i&&i.some(function(u){return u instanceof Date?hr(e,u):hr(e,u.date)})||o&&o.some(function(u){var f=u.start,h=u.end;return fx(e,{start:f,end:h})})||l&&!l.some(function(u){return hr(e,u)})||c&&!c.some(function(u){var f=u.start,h=u.end;return fx(e,{start:f,end:h})})||d&&!d(kr(e))||!1}function dO(e,t){var r=t===void 0?{}:t,n=r.excludeDates,a=r.excludeDateIntervals;return a&&a.length>0?a.some(function(i){var o=i.start,l=i.end;return fx(e,{start:o,end:l})}):n&&n.some(function(i){var o;return i instanceof Date?hr(e,i):hr(e,(o=i.date)!==null&&o!==void 0?o:new Date)})||!1}function zK(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.maxDate,i=r.excludeDates,o=r.includeDates,l=r.filterDate;return Rv(e,{minDate:n?TK(n):void 0,maxDate:a?CK(a):void 0})||(i==null?void 0:i.some(function(c){return Ws(e,c instanceof Date?c:c.date)}))||o&&!o.some(function(c){return Ws(e,c)})||l&&!l(kr(e))||!1}function zy(e,t,r,n){var a=er(e),i=Ks(e),o=er(t),l=Ks(t),c=er(n);return a===o&&a===c?i<=r&&r<=l:a<o?c===a&&i<=r||c===o&&l>=r||c<o&&c>a:!1}function t1e(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.maxDate,i=r.excludeDates,o=r.includeDates;return Rv(e,{minDate:n,maxDate:a})||i&&i.some(function(l){return Ws(l instanceof Date?l:l.date,e)})||o&&!o.some(function(l){return Ws(l,e)})||!1}function Wy(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.maxDate,i=r.excludeDates,o=r.includeDates,l=r.filterDate;return Rv(e,{minDate:n,maxDate:a})||(i==null?void 0:i.some(function(c){return gj(e,c instanceof Date?c:c.date)}))||o&&!o.some(function(c){return gj(e,c)})||l&&!l(kr(e))||!1}function Vy(e,t,r){if(!t||!r||!dj(t)||!dj(r))return!1;var n=er(t),a=er(r);return n<=e&&a>=e}function Vb(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.maxDate,i=r.excludeDates,o=r.includeDates,l=r.filterDate,c=new Date(e,0,1);return Rv(c,{minDate:n?kN(n):void 0,maxDate:a?_K(a):void 0})||(i==null?void 0:i.some(function(d){return uo(c,d instanceof Date?d:d.date)}))||o&&!o.some(function(d){return uo(c,d)})||l&&!l(kr(c))||!1}function Hy(e,t,r,n){var a=er(e),i=eu(e),o=er(t),l=eu(t),c=er(n);return a===o&&a===c?i<=r&&r<=l:a<o?c===a&&i<=r||c===o&&l>=r||c<o&&c>a:!1}function Rv(e,t){var r,n=t===void 0?{}:t,a=n.minDate,i=n.maxDate;return(r=a&&Ih(e,a)<0||i&&Ih(e,i)>0)!==null&&r!==void 0?r:!1}function gR(e,t){return t.some(function(r){return wl(r)===wl(e)&&Nl(r)===Nl(e)&&Uc(r)===Uc(e)})}function xR(e,t){var r=t===void 0?{}:t,n=r.excludeTimes,a=r.includeTimes,i=r.filterTime;return n&&gR(e,n)||a&&!gR(e,a)||i&&!i(e)||!1}function vR(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var a=kr();a=Bb(a,wl(e)),a=Ub(a,Nl(e)),a=zb(a,Uc(e));var i=kr();i=Bb(i,wl(r)),i=Ub(i,Nl(r)),i=zb(i,Uc(r));var o=kr();o=Bb(o,wl(n)),o=Ub(o,Nl(n)),o=zb(o,Uc(n));var l;try{l=!fx(a,{start:i,end:o})}catch{l=!1}return l}function yR(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.includeDates,i=tu(e,1);return n&&uj(n,i)>0||a&&a.every(function(o){return uj(o,i)>0})||!1}function bR(e,t){var r=t===void 0?{}:t,n=r.maxDate,a=r.includeDates,i=Hi(e,1);return n&&uj(i,n)>0||a&&a.every(function(o){return uj(i,o)>0})||!1}function r1e(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.includeDates,i=kN(e),o=$K(i,1);return n&&fj(n,o)>0||a&&a.every(function(l){return fj(l,o)>0})||!1}function n1e(e,t){var r=t===void 0?{}:t,n=r.maxDate,a=r.includeDates,i=_K(e),o=nO(i,1);return n&&fj(o,n)>0||a&&a.every(function(l){return fj(o,l)>0})||!1}function jR(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.includeDates,i=Rh(e,1);return n&&hj(n,i)>0||a&&a.every(function(o){return hj(o,i)>0})||!1}function s1e(e,t){var r=t===void 0?{}:t,n=r.minDate,a=r.yearItemNumber,i=a===void 0?Iv:a,o=Yp(Rh(e,i)),l=Pc(o,i).endPeriod,c=n&&er(n);return c&&c>l||!1}function wR(e,t){var r=t===void 0?{}:t,n=r.maxDate,a=r.includeDates,i=bl(e,1);return n&&hj(i,n)>0||a&&a.every(function(o){return hj(i,o)>0})||!1}function a1e(e,t){var r=t===void 0?{}:t,n=r.maxDate,a=r.yearItemNumber,i=a===void 0?Iv:a,o=bl(e,i),l=Pc(o,i).startPeriod,c=n&&er(n);return c&&c<l||!1}function WK(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return Ih(a,t)>=0});return rR(n)}else return r?rR(r):t}function VK(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return Ih(a,t)<=0});return tR(n)}else return r?tR(r):t}function NR(e,t){var r;e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--highlighted");for(var n=new Map,a=0,i=e.length;a<i;a++){var o=e[a];if(jl(o)){var l=an(o,"MM.dd.yyyy"),c=n.get(l)||[];c.includes(t)||(c.push(t),n.set(l,c))}else if(typeof o=="object"){var d=Object.keys(o),u=(r=d[0])!==null&&r!==void 0?r:"",f=o[u];if(typeof u=="string"&&Array.isArray(f))for(var h=0,m=f.length;h<m;h++){var g=f[h];if(g){var l=an(g,"MM.dd.yyyy"),c=n.get(l)||[];c.includes(u)||(c.push(u),n.set(l,c))}}}}return n}function i1e(e,t){return e.length!==t.length?!1:e.every(function(r,n){return r===t[n]})}function o1e(e,t){e===void 0&&(e=[]),t===void 0&&(t="react-datepicker__day--holidays");var r=new Map;return e.forEach(function(n){var a=n.date,i=n.holidayName;if(jl(a)){var o=an(a,"MM.dd.yyyy"),l=r.get(o)||{className:"",holidayNames:[]};if(!("className"in l&&l.className===t&&i1e(l.holidayNames,[i]))){l.className=t;var c=l.holidayNames;l.holidayNames=c?Co(Co([],c,!0),[i],!1):[i],r.set(o,l)}}}),r}function l1e(e,t,r,n,a){for(var i=a.length,o=[],l=0;l<i;l++){var c=e,d=a[l];d&&(c=oje(c,wl(d)),c=LT(c,Nl(d)),c=dje(c,Uc(d)));var u=LT(e,(r+1)*n);nd(c,t)&&ku(c,u)&&d!=null&&o.push(d)}return o}function SR(e){return e<10?"0".concat(e):"".concat(e)}
675function Pc(e,t){t===void 0&&(t=Iv);var r=Math.ceil(er(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function c1e(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(e.getFullYear(),e.getMonth(),e.getDate(),24);return Math.round((+r-+t)/36e5)}function kR(e){var t=e.getSeconds(),r=e.getMilliseconds();return ft(e.getTime()-t*1e3-r)}function d1e(e,t){return kR(e).getTime()===kR(t).getTime()}function CR(e){if(!jl(e))throw new Error("Invalid date");var t=new Date(e);return t.setHours(0,0,0,0),t}function TR(e,t){if(!jl(e)||!jl(t))throw new Error("Invalid date received");var r=CR(e),n=CR(t);return ku(r,n)}function HK(e){return e.key===Ye.Space}var u1e=function(e){os(t,e);function t(r){var n=e.call(this,r)||this;return n.inputRef=O.createRef(),n.onTimeChange=function(a){var i,o;n.setState({time:a});var l=n.props.date,c=l instanceof Date&&!isNaN(+l),d=c?l:new Date;if(a!=null&&a.includes(":")){var u=a.split(":"),f=u[0],h=u[1];d.setHours(Number(f)),d.setMinutes(Number(h))}(o=(i=n.props).onChange)===null||o===void 0||o.call(i,d)},n.renderTimeInput=function(){var a=n.state.time,i=n.props,o=i.date,l=i.timeString,c=i.customTimeInput;return c?p.cloneElement(c,{date:o,value:a,onChange:n.onTimeChange}):O.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:n.inputRef,onClick:function(){var d;(d=n.inputRef.current)===null||d===void 0||d.focus()},required:!0,value:a,onChange:function(d){n.onTimeChange(d.target.value||l)}})},n.state={time:n.props.timeString},n}return t.getDerivedStateFromProps=function(r,n){return r.timeString!==n.time?{time:r.timeString}:null},t.prototype.render=function(){return O.createElement("div",{className:"react-datepicker__input-time-container"},O.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),O.createElement("div",{className:"react-datepicker-time__input-container"},O.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},t}(p.Component),f1e=function(e){os(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.dayEl=p.createRef(),r.handleClick=function(n){!r.isDisabled()&&r.props.onClick&&r.props.onClick(n)},r.handleMouseEnter=function(n){!r.isDisabled()&&r.props.onMouseEnter&&r.props.onMouseEnter(n)},r.handleOnKeyDown=function(n){var a,i,o=n.key;o===Ye.Space&&(n.preventDefault(),n.key=Ye.Enter),(i=(a=r.props).handleOnKeyDown)===null||i===void 0||i.call(a,n)},r.isSameDay=function(n){return hr(r.props.day,n)},r.isKeyboardSelected=function(){var n;if(r.props.disabledKeyboardNavigation)return!1;var a=r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(o){return r.isSameDayOrWeek(o)}):r.isSameDayOrWeek(r.props.selected),i=r.props.preSelection&&r.isDisabled(r.props.preSelection);return!a&&r.isSameDayOrWeek(r.props.preSelection)&&!i},r.isDisabled=function(n){return n===void 0&&(n=r.props.day),ni(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(){return dO(r.props.day,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.isStartOfWeek=function(){return hr(r.props.day,zc(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameWeek=function(n){return r.props.showWeekPicker&&hr(n,zc(r.props.day,r.props.locale,r.props.calendarStartDay))},r.isSameDayOrWeek=function(n){return r.isSameDay(n)||r.isSameWeek(n)},r.getHighLightedClass=function(){var n=r.props,a=n.day,i=n.highlightDates;if(!i)return!1;var o=an(a,"MM.dd.yyyy");return i.get(o)},r.getHolidaysClass=function(){var n,a=r.props,i=a.day,o=a.holidays;if(!o)return[void 0];var l=an(i,"MM.dd.yyyy");return o.has(l)?[(n=o.get(l))===null||n===void 0?void 0:n.className]:[void 0]},r.isInRange=function(){var n=r.props,a=n.day,i=n.startDate,o=n.endDate;return!i||!o?!1:Gp(a,i,o)},r.isInSelectingRange=function(){var n,a=r.props,i=a.day,o=a.selectsStart,l=a.selectsEnd,c=a.selectsRange,d=a.selectsDisabledDaysInRange,u=a.startDate,f=a.endDate,h=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return!(o||l||c)||!h||!d&&r.isDisabled()?!1:o&&f&&(ku(h,f)||Rd(h,f))?Gp(i,h,f):l&&u&&(nd(h,u)||Rd(h,u))||c&&u&&!f&&(nd(h,u)||Rd(h,u))?Gp(i,u,h):!1},r.isSelectingRangeStart=function(){var n;if(!r.isInSelectingRange())return!1;var a=r.props,i=a.day,o=a.startDate,l=a.selectsStart,c=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return l?hr(i,c):hr(i,o)},r.isSelectingRangeEnd=function(){var n;if(!r.isInSelectingRange())return!1;var a=r.props,i=a.day,o=a.endDate,l=a.selectsEnd,c=a.selectsRange,d=(n=r.props.selectingDate)!==null&&n!==void 0?n:r.props.preSelection;return l||c?hr(i,d):hr(i,o)},r.isRangeStart=function(){var n=r.props,a=n.day,i=n.startDate,o=n.endDate;return!i||!o?!1:hr(i,a)},r.isRangeEnd=function(){var n=r.props,a=n.day,i=n.startDate,o=n.endDate;return!i||!o?!1:hr(o,a)},r.isWeekend=function(){var n=lwe(r.props.day);return n===0||n===6},r.isAfterMonth=function(){return r.props.month!==void 0&&(r.props.month+1)%12===Ks(r.props.day)},r.isBeforeMonth=function(){return r.props.month!==void 0&&(Ks(r.props.day)+1)%12===r.props.month},r.isCurrentDay=function(){return r.isSameDay(kr())},r.isSelected=function(){var n;return r.props.selectsMultiple?(n=r.props.selectedDates)===null||n===void 0?void 0:n.some(function(a){return r.isSameDayOrWeek(a)}):r.isSameDayOrWeek(r.props.selected)},r.getClassNames=function(n){var a=r.props.dayClassName?r.props.dayClassName(n):void 0;return ht("react-datepicker__day",a,"react-datepicker__day--"+GNe(r.props.day),{"react-datepicker__day--disabled":r.
675isDisabled(),"react-datepicker__day--excluded":r.isExcluded(),"react-datepicker__day--selected":r.isSelected(),"react-datepicker__day--keyboard-selected":r.isKeyboardSelected(),"react-datepicker__day--range-start":r.isRangeStart(),"react-datepicker__day--range-end":r.isRangeEnd(),"react-datepicker__day--in-range":r.isInRange(),"react-datepicker__day--in-selecting-range":r.isInSelectingRange(),"react-datepicker__day--selecting-range-start":r.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":r.isSelectingRangeEnd(),"react-datepicker__day--today":r.isCurrentDay(),"react-datepicker__day--weekend":r.isWeekend(),"react-datepicker__day--outside-month":r.isAfterMonth()||r.isBeforeMonth()},r.getHighLightedClass(),r.getHolidaysClass())},r.getAriaLabel=function(){var n=r.props,a=n.day,i=n.ariaLabelPrefixWhenEnabled,o=i===void 0?"Choose":i,l=n.ariaLabelPrefixWhenDisabled,c=l===void 0?"Not available":l,d=r.isDisabled()||r.isExcluded()?c:o;return"".concat(d," ").concat(an(a,"PPPP",r.props.locale))},r.getTitle=function(){var n=r.props,a=n.day,i=n.holidays,o=i===void 0?new Map:i,l=n.excludeDates,c=an(a,"MM.dd.yyyy"),d=[];return o.has(c)&&d.push.apply(d,o.get(c).holidayNames),r.isExcluded()&&d.push(l==null?void 0:l.filter(function(u){return u instanceof Date?hr(u,a):hr(u==null?void 0:u.date,a)}).map(function(u){if(!(u instanceof Date))return u==null?void 0:u.message})),d.join(", ")},r.getTabIndex=function(){var n=r.props.selected,a=r.props.preSelection,i=!(r.props.showWeekPicker&&(r.props.showWeekNumber||!r.isStartOfWeek()))&&(r.isKeyboardSelected()||r.isSameDay(n)&&hr(a,n))?0:-1;return i},r.handleFocusDay=function(){var n;r.shouldFocusDay()&&((n=r.dayEl.current)===null||n===void 0||n.focus({preventScroll:!0}))},r.renderDayContents=function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(cR(r.props.day),r.props.day):cR(r.props.day)},r.render=function(){return O.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.props.usePointerEvent?void 0:r.handleMouseEnter,onPointerEnter:r.props.usePointerEvent?r.handleMouseEnter:void 0,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"option",title:r.getTitle(),"aria-disabled":r.
675isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()||r.isInRange()},r.renderDayContents(),r.getTitle()!==""&&O.createElement("span",{className:"overlay"},r.getTitle()))},r}return t.prototype.componentDidMount=function(){this.handleFocusDay()},t.prototype.componentDidUpdate=function(){this.handleFocusDay()},t.prototype.shouldFocusDay=function(){var r=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(r=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(r=!1),this.isDayActiveElement()&&(r=!0),this.isDuplicateDay()&&(r=!1)),r},t.prototype.isDayActiveElement=function(){var r,n,a;return((n=(r=this.props.containerRef)===null||r===void 0?void 0:r.current)===null||n===void 0?void 0:n.contains(document.activeElement))&&((a=document.activeElement)===null||a===void 0?void 0:a.classList.contains("react-datepicker__day"))},t.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},t}(p.Component),h1e=function(e){os(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.weekNumberEl=p.createRef(),r.handleClick=function(n){r.props.onClick&&r.props.onClick(n)},r.handleOnKeyDown=function(n){var a,i,o=n.key;o===Ye.Space&&(n.preventDefault(),n.key=Ye.Enter),(i=(a=r.props).handleOnKeyDown)===null||i===void 0||i.call(a,n)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!hr(r.props.date,r.props.selected)&&hr(r.props.date,r.props.preSelection)},r.getTabIndex=function(){return r.props.showWeekPicker&&r.props.showWeekNumber&&(r.isKeyboardSelected()||hr(r.props.date,r.props.selected)&&hr(r.props.preSelection,r.props.selected))?0:-1},r.handleFocusWeekNumber=function(n){var a=!1;r.getTabIndex()===0&&!(n!=null&&n.isInputFocused)&&hr(r.props.date,r.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(a=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(a=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(a=!0)),a&&r.weekNumberEl.current&&r.weekNumberEl.current.focus({preventScroll:!0})},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},t.prototype.componentDidUpdate=function(r){this.handleFocusWeekNumber(r)},t.prototype.render=function(){var r=this.props,n=r.weekNumber,a=r.isWeekDisabled,i=r.ariaLabelPrefix,o=i===void 0?t.defaultProps.ariaLabelPrefix:i,l=r.onClick,c={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!l&&!a,"react-datepicker__week-number--selected":!!l&&hr(this.props.date,this.props.selected)};return O.createElement("div",{ref:this.weekNumberEl,className:ht(c),"aria-label":"".concat(o," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex()},n)},t}(p.Component),m1e=function(e){os(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.isDisabled=function(n){return ni(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.handleDayClick=function(n,a){r.props.onDayClick&&r.props.onDayClick(n,a)},r.handleDayMouseEnter=function(n){r.props.onDayMouseEnter&&r.props.onDayMouseEnter(n)},r.handleWeekClick=function(n,a,i){for(var o,l,c,d=new Date(n),u=0;u<7;u++){var f=new Date(n);f.setDate(f.getDate()+u);var h=!r.isDisabled(f);if(h){d=f;break}}typeof r.props.onWeekSelect=="function"&&r.props.onWeekSelect(d,a,i),r.props.showWeekPicker&&r.handleDayClick(d,i),((o=r.props.shouldCloseOnSelect)!==null&&o!==void 0?o:t.defaultProps.shouldCloseOnSelect)&&((c=(l=r.props).setOpen)===null||c===void 0||c.c
675all(l,!1))},r.formatWeekNumber=function(n){return r.props.formatWeekNumber?r.props.formatWeekNumber(n):YNe(n)},r.isWeekDisabled=function(){for(var n=r.startOfWeek(),a=Bi(n,6),i=new Date(n);i<=a;){if(!r.isDisabled(i))return!1;i=Bi(i,1)}return!0},r.renderDays=function(){var n=r.startOfWeek(),a=[],i=r.formatWeekNumber(n);if(r.props.showWeekNumber){var o=r.props.onWeekSelect||r.props.showWeekPicker?r.handleWeekClick.bind(r,n,i):void 0;a.push(O.createElement(h1e,mr({key:"W"},t.defaultProps,r.props,{weekNumber:i,isWeekDisabled:r.isWeekDisabled(),date:n,onClick:o})))}return a.concat([0,1,2,3,4,5,6].map(function(l){var c=Bi(n,l);return O.createElement(f1e,mr({},t.defaultProps,r.props,{ariaLabelPrefixWhenEnabled:r.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:r.props.disabledDayAriaLabelPrefix,key:c.valueOf(),day:c,onClick:r.handleDayClick.bind(r,c),onMouseEnter:r.handleDayMouseEnter.bind(r,c)}))}))},r.startOfWeek=function(){return zc(r.props.day,r.props.locale,r.props.calendarStartDay)},r.isKeyboardSelected=function(){return!r.props.disabledKeyboardNavigation&&!hr(r.startOfWeek(),r.props.selected)&&hr(r.startOfWeek(),r.props.preSelection)},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),t.prototype.render=function(){var r={"react-datepicker__week":!0,"react-datepicker__week--selected":hr(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()};return O.createElement("div",{className:ht(r)},this.renderDays())},t}(p.Component),jp,p1e=6,Hf={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},ek=(jp={},jp[Hf.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},jp[Hf.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},jp[Hf.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},jp),qy=1;function _R(e,t){return e?Hf.FOUR_COLUMNS:t?Hf.TWO_COLUMNS:Hf.THREE_COLUMNS}var g1e=function(e){os(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.MONTH_REFS=Co([],Array(12),!0).map(function(){return p.createRef()}),r.QUARTER_REFS=Co([],Array(4),!0).map(function(){return p.createRef()}),r.isDisabled=function(n){return ni(n,{minDate:r.props.minDate,maxDate:r.props.maxDate,excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals,includeDateIntervals:r.props.includeDateIntervals,includeDates:r.props.includeDates,filterDate:r.props.filterDate})},r.isExcluded=function(n){return dO(n,{excludeDates:r.props.excludeDates,excludeDateIntervals:r.props.excludeDateIntervals})},r.handleDayClick=function(n,a){var i,o;
675(o=(i=r.props).onDayClick)===null||o===void 0||o.call(i,n,a,r.props.orderInDisplay)},r.handleDayMouseEnter=function(n){var a,i;(i=(a=r.props).onDayMouseEnter)===null||i===void 0||i.call(a,n)},r.handleMouseLeave=function(){var n,a;(a=(n=r.props).onMouseLeave)===null||a===void 0||a.call(n)},r.isRangeStartMonth=function(n){var a=r.props,i=a.day,o=a.startDate,l=a.endDate;return!o||!l?!1:Ws(ei(i,n),o)},r.isRangeStartQuarter=function(n){var a=r.props,i=a.day,o=a.startDate,l=a.endDate;return!o||!l?!1:gj(af(i,n),o)},r.isRangeEndMonth=function(n){var a=r.props,i=a.day,o=a.startDate,l=a.endDate;return!o||!l?!1:Ws(ei(i,n),l)},r.isRangeEndQuarter=function(n){var a=r.props,i=a.day,o=a.startDate,l=a.endDate;return!o||!l?!1:gj(af(i,n),l)},r.isInSelectingRangeMonth=function(n){var a,i=r.props,o=i.day,l=i.selectsStart,c=i.selectsEnd,d=i.selectsRange,u=i.startDate,f=i.endDate,h=(a=r.props.selectingDate)!==null&&a!==void 0?a:r.props.preSelection;return!(l||c||d)||!h?!1:l&&f?zy(h,f,n,o):c&&u||d&&u&&!f?zy(u,h,n,o):!1},r.isSelectingMonthRangeStart=function(n){var a;if(!r.isInSelectingRangeMonth(n))return!1;var i=r.props,o=i.day,l=i.startDate,c=i.selectsStart,d=ei(o,n),u=(a=r.props.selectingDate)!==null&&a!==void 0?a:r.props.preSelection;return c?Ws(d,u):Ws(d,l)},r.isSelectingMonthRangeEnd=function(n){var a;if(!r.isInSelectingRangeMonth(n))return!1;var i=r.props,o=i.day,l=i.endDate,c=i.selectsEnd,d=i.selectsRange,u=ei(o,n),f=(a=r.props.selectingDate)!==null&&a!==void 0?a:r.props.preSelection;return c||d?Ws(u,f):Ws(u,l)},r.isInSelectingRangeQuarter=function(n){var a,i=r.props,o=i.day,l=i.selectsStart,c=i.selectsEnd,d=i.selectsRange,u=i.startDate,f=i.endDate,h=(a=r.props.selectingDate)!==null&&a!==void 0?a:r.props.preSelection;return!(l||c||d)||!h?!1:l&&f?Hy(h,f,n,o):c&&u||d&&u&&!f?Hy(u,h,n,o):!1},r.isWeekInMonth=function(n){var a=r.props.day,i=Bi(n,6);return Ws(n,a)||Ws(i,a)},r.isCurrentMonth=function(n,a){return er(n)===er(kr())&&a===Ks(kr())},r.isCurrentQuarter=function(n,a){return er(n)===er(kr())&&a===eu(kr())},r.isSelectedMonth=function(n,a,i){return Ks(i)===a&&er(n)===er(i)},r.isSelectMonthInList=function(n,a,i){return i.some(function(o){return r.isSelectedMonth(n,a,o)})},r.isSelectedQuarter=function(n,a,i){return eu(n)===a&&er(n)===er(i)},r.renderWeeks=function(){for(var n=[],a=r.props.fixedHeight,i=0,o=!1,l=zc(Sl(r.props.day),r.props.locale,r.props.calendarStartDay),c=function(g){return r.props.showWeekPicker?zc(g,r.props.locale,r.props.calendarStartDay):r.props.preSelection},d=function(g){return r.props.showWeekPicker?zc(g,r.props.locale,r.props.calendarStartDay):r.props.selected},u=r.props.selected?d(r.props.selected):void 0,f=r.props.preSelection?c(r.props.preSelection):void 0;n.push(O.createElement(m1e,mr({},r.props,{ariaLabelPrefix:r.props.weekAriaLabelPrefix,key:i,day:l,month:Ks(r.props.day),onDayClick:r.handleDayClick,onDayMouseEnter:r.handleDayMouseEnter,selected:u,preSelection:f,showWeekNumber:r.props.showWeekNumbers}))),!o;){i++,l=cj(l,1);var h=a&&i>=p1e,m=!a&&!r.isWeekInMonth(l);if(h||m)if(r.props.peekNextMonth)o=!0;else break}return n},r.onMonthClick=function(n,a){var i=r.isMonthDisabledForLabelDate(a),o=i.isDisabled,l=i.labelDate;o||r.handleDayClick(Sl(l),n)},r.onMonthMouseEnter=function(n){var a=r.isMonthDisabledForLabelDate(n),i=a.isDisabled,o=a.labelDate;i||r.handleDayMouseEnter(Sl(o))},r.handleMonthNavigation=function(n,a){var i,o,l,c;(o=(i=r.props).setPreSelection)===null||o===void 0||o.call(i,a),(c=(l=r.MONTH_REFS[n])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus()},r.handleKeyboardNavigation=function(n,a,i){var o,l=r.props,c=l.selected,d=l.preSelection,u=l.setPreSelection,f=l.minDate,h=l.maxDate,m=l.showFourColumnMonthYearPicker,g=l.showTwoColumnMonthYearPicker;
675if(d){var x=_R(m,g),v=r.getVerticalOffset(x),b=(o=ek[x])===null||o===void 0?void 0:o.grid,y=function(k,T,C){var E,P,_=T,I=C;switch(k){case Ye.ArrowRight:_=Hi(T,qy),I=C===11?0:C+qy;break;case Ye.ArrowLeft:_=tu(T,qy),I=C===0?11:C-qy;break;case Ye.ArrowUp:_=tu(T,v),I=!((E=b==null?void 0:b[0])===null||E===void 0)&&E.includes(C)?C+12-v:C-v;break;case Ye.ArrowDown:_=Hi(T,v),I=!((P=b==null?void 0:b[b.length-1])===null||P===void 0)&&P.includes(C)?C-12+v:C+v;break}return{newCalculatedDate:_,newCalculatedMonth:I}},j=function(k,T,C){for(var E=40,P=k,_=!1,I=0,F=y(P,T,C),H=F.newCalculatedDate,W=F.newCalculatedMonth;!_;){if(I>=E){H=T,W=C;break}if(f&&H<f){P=Ye.ArrowRight;var z=y(P,H,W);H=z.newCalculatedDate,W=z.newCalculatedMonth}if(h&&H>h){P=Ye.ArrowLeft;var z=y(P,H,W);H=z.newCalculatedDate,W=z.newCalculatedMonth}if(t1e(H,r.props)){var z=y(P,H,W);H=z.newCalculatedDate,W=z.newCalculatedMonth}else _=!0;I++}return{newCalculatedDate:H,newCalculatedMonth:W}};if(a===Ye.Enter){r.isMonthDisabled(i)||(r.onMonthClick(n,i),u==null||u(c));return}var w=j(a,d,i),N=w.newCalculatedDate,S=w.newCalculatedMonth;switch(a){case Ye.ArrowRight:case Ye.ArrowLeft:case Ye.ArrowUp:case Ye.ArrowDown:r.handleMonthNavigation(S,N);break}}},r.getVerticalOffset=function(n){var a,i;return(i=(a=ek[n])===null||a===void 0?void 0:a.verticalNavigationOffset)!==null&&i!==void 0?i:0},r.onMonthKeyDown=function(n,a){var i=r.props,o=i.disabledKeyboardNavigation,l=i.handleOnMonthKeyDown,c=n.key;c!==Ye.Tab&&n.preventDefault(),o||r.handleKeyboardNavigation(n,c,a),l&&l(n)},r.onQuarterClick=function(n,a){var i=af(r.props.day,a);Wy(i,r.props)||r.handleDayClick(hR(i),n)},r.onQuarterMouseEnter=function(n){var a=af(r.props.day,n);Wy(a,r.props)||r.handleDayMouseEnter(hR(a))},r.handleQuarterNavigation=function(n,a){var i,o,l,c;r.isDisabled(a)||r.isExcluded(a)||((o=(i=r.props).setPreSelection)===null||o===void 0||o.call(i,a),(c=(l=r.QUARTER_REFS[n-1])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())},r.onQuarterKeyDown=function(n,a){var i,o,l=n.key;if(!r.props.disabledKeyboardNavigation)switch(l){case Ye.Enter:r.onQuarterClick(n,a),(o=(i=r.props).setPreSelection)===null||o===void 0||o.call(i,r.props.selected);break;case Ye.ArrowRight:if(!r.props.preSelection)break;r.handleQuarterNavigation(a===4?1:a+1,nO(r.props.preSelection,1));break;case Ye.ArrowLeft:if(!r.props.preSelection)break;r.handleQuarterNavigation(a===1?4:a-1,$K(r.props.preSelection,1));break}},r.isMonthDisabledForLabelDate=function(n){var a,i=r.props,o=i.day,l=i.minDate,c=i.maxDate,d=i.excludeDates,u=i.includeDates,f=ei(o,n);return{isDisabled:(a=(l||c||d||u)&&zK(f,r.props))!==null&&a!==void 0?a:!1,labelDate:f}},r.isMonthDisabled=function(n){var a=r.isMonthDisabledForLabelDate(n).isDisabled;return a},r.getMonthClassNames=function(n){var a=r.props,i=a.day,o=a.startDate,l=a.endDate,c=a.preSelection,d=a.monthClassName,u=d?d(ei(i,n)):void 0,f=r.getSelection();return ht("react-datepicker__month-text","react-datepicker__month-".concat(n),u,{"react-datepicker__month-text--disabled":r.
675isMonthDisabled(n),"react-datepicker__month-text--selected":f?r.isSelectMonthInList(i,n,f):void 0,"react-datepicker__month-text--keyboard-selected":!r.props.disabledKeyboardNavigation&&c&&r.isSelectedMonth(i,n,c)&&!r.isMonthDisabled(n),"react-datepicker__month-text--in-selecting-range":r.isInSelectingRangeMonth(n),"react-datepicker__month-text--in-range":o&&l?zy(o,l,n,i):void 0,"react-datepicker__month-text--range-start":r.isRangeStartMonth(n),"react-datepicker__month-text--range-end":r.isRangeEndMonth(n),"react-datepicker__month-text--selecting-range-start":r.isSelectingMonthRangeStart(n),"react-datepicker__month-text--selecting-range-end":r.isSelectingMonthRangeEnd(n),"react-datepicker__month-text--today":r.isCurrentMonth(i,n)})},r.getTabIndex=function(n){if(r.props.preSelection==null)return"-1";var a=Ks(r.props.preSelection),i=r.isMonthDisabledForLabelDate(a).isDisabled,o=n===a&&!(i||r.props.disabledKeyboardNavigation)?"0":"-1";return o},r.getQuarterTabIndex=function(n){if(r.props.preSelection==null)return"-1";var a=eu(r.props.preSelection),i=Wy(r.props.day,r.props),o=n===a&&!(i||r.props.disabledKeyboardNavigation)?"0":"-1";return o},r.getAriaLabel=function(n){var a=r.props,i=a.chooseDayAriaLabelPrefix,o=i===void 0?"Choose":i,l=a.disabledDayAriaLabelPrefix,c=l===void 0?"Not available":l,d=a.day,u=a.locale,f=ei(d,n),h=r.isDisabled(f)||r.isExcluded(f)?c:o;return"".concat(h," ").concat(an(f,"MMMM yyyy",u))},r.getQuarterClassNames=function(n){var a=r.props,i=a.day,o=a.startDate,l=a.endDate,c=a.selected,d=a.minDate,u=a.maxDate,f=a.excludeDates,h=a.includeDates,m=a.filterDate,g=a.preSelection,x=a.disabledKeyboardNavigation,v=(d||u||f||h||m)&&Wy(af(i,n),r.props);return ht("react-datepicker__quarter-text","react-datepicker__quarter-".concat(n),{"react-datepicker__quarter-text--disabled":v,"react-datepicker__quarter-text--selected":c?r.isSelectedQuarter(i,n,c):void 0,"react-datepicker__quarter-text--keyboard-selected":!x&&g&&r.isSelectedQuarter(i,n,g)&&!v,"react-datepicker__quarter-text--in-selecting-range":r.isInSelectingRangeQuarter(n),"react-datepicker__quarter-text--in-range":o&&l?Hy(o,l,n,i):void 0,"react-datepicker__quarter-text--range-start":r.isRangeStartQuarter(n),"react-datepicker__quarter-text--range-end":r.isRangeEndQuarter(n),"react-datepicker__quarter-text--today":r.
675isCurrentQuarter(i,n)})},r.getMonthContent=function(n){var a=r.props,i=a.showFullMonthYearPicker,o=a.renderMonthContent,l=a.locale,c=a.day,d=UK(n,l),u=cO(n,l);return o?o(n,d,u,c):i?u:d},r.getQuarterContent=function(n){var a,i=r.props,o=i.renderQuarterContent,l=i.locale,c=e1e(n,l);return(a=o==null?void 0:o(n,c))!==null&&a!==void 0?a:c},r.renderMonths=function(){var n,a=r.props,i=a.showTwoColumnMonthYearPicker,o=a.showFourColumnMonthYearPicker,l=a.day,c=a.selected,d=(n=ek[_R(o,i)])===null||n===void 0?void 0:n.grid;return d==null?void 0:d.map(function(u,f){return O.createElement("div",{className:"react-datepicker__month-wrapper",key:f},u.map(function(h,m){return O.createElement("div",{ref:r.MONTH_REFS[h],key:m,onClick:function(g){r.onMonthClick(g,h)},onKeyDown:function(g){HK(g)&&(g.preventDefault(),g.key=Ye.Enter),r.onMonthKeyDown(g,h)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onMonthMouseEnter(h)},onPointerEnter:r.props.usePointerEvent?function(){return r.onMonthMouseEnter(h)}:void 0,tabIndex:Number(r.getTabIndex(h)),className:r.getMonthClassNames(h),"aria-disabled":r.
vendor: 10,398 bytes, line 675
675isMonthDisabled(h),role:"option","aria-label":r.getAriaLabel(h),"aria-current":r.isCurrentMonth(l,h)?"date":void 0,"aria-selected":c?r.isSelectedMonth(l,h,c):void 0},r.getMonthContent(h))}))})},r.renderQuarters=function(){var n=r.props,a=n.day,i=n.selected,o=[1,2,3,4];return O.createElement("div",{className:"react-datepicker__quarter-wrapper"},o.map(function(l,c){return O.createElement("div",{key:c,ref:r.QUARTER_REFS[c],role:"option",onClick:function(d){r.onQuarterClick(d,l)},onKeyDown:function(d){r.onQuarterKeyDown(d,l)},onMouseEnter:r.props.usePointerEvent?void 0:function(){return r.onQuarterMouseEnter(l)},onPointerEnter:r.props.usePointerEvent?function(){return r.onQuarterMouseEnter(l)}:void 0,className:r.getQuarterClassNames(l),"aria-selected":i?r.isSelectedQuarter(a,l,i):void 0,tabIndex:Number(r.getQuarterTabIndex(l)),"aria-current":r.isCurrentQuarter(a,l)?"date":void 0},r.getQuarterContent(l))}))},r.getClassNames=function(){var n=r.props,a=n.selectingDate,i=n.selectsStart,o=n.selectsEnd,l=n.showMonthYearPicker,c=n.showQuarterYearPicker,d=n.showWeekPicker;return ht("react-datepicker__month",{"react-datepicker__month--selecting-range":a&&(i||o)},{"react-datepicker__monthPicker":l},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":d})},r}return t.prototype.getSelection=function(){var r=this.props,n=r.selected,a=r.selectedDates,i=r.selectsMultiple;if(i)return a;if(n)return[n]},t.prototype.render=function(){var r=this.props,n=r.showMonthYearPicker,a=r.showQuarterYearPicker,i=r.day,o=r.ariaLabelPrefix,l=o===void 0?"Month ":o,c=l?l.trim()+" ":"";return O.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":"".concat(c).concat(an(i,"MMMM, yyyy",this.props.locale)),role:"listbox"},n?this.renderMonths():a?this.renderQuarters():this.renderWeeks())},t}(p.Component),x1e=function(e){os(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.isSelectedMonth=function(n){return r.props.month===n},r.renderOptions=function(){return r.props.monthNames.map(function(n,a){return O.createElement("div",{className:r.isSelectedMonth(a)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:n,onClick:r.onChange.bind(r,a),"aria-selected":r.isSelectedMonth(a)?"true":void 0},r.isSelectedMonth(a)?O.createElement("span",{className:"react-datepicker__month-option--selected"},"â"):"",n)})},r.onChange=function(n){return r.props.onChange(n)},r.handleClickOutside=function(){return r.props.onCancel()},r}return t.prototype.render=function(){return O.createElement(CN,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},t}(p.Component),v1e=function(e){os(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(n){return n.map(function(a,i){return O.createElement("option",{key:a,value:i},a)})},r.renderSelectMode=function(n){return O.createElement("select",{value:r.props.month,className:"react-datepicker__month-select",onChange:function(a){return r.onChange(parseInt(a.target.value))}},r.renderSelectOptions(n))},r.renderReadView=function(n,a){return O.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:r.toggleDropdown},O.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),O.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},a[r.props.month]))},r.renderDropdown=function(n){return O.createElement(x1e,mr({key:"dropdown"},r.props,{monthNames:n,onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(n){var a=r.state.dropdownVisible,i=[r.renderReadView(!a,n)];return a&&i.unshift(r.renderDropdown(n)),i},r.onChange=function(n){r.toggleDropdown(),n!==r.props.month&&r.props.onChange(n)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r=this,n=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(i){return UK(i,r.props.locale)}:function(i){return cO(i,r.props.locale)}),a;switch(this.props.dropdownMode){case"scroll":a=this.renderScrollMode(n);break;case"select":a=this.renderSelectMode(n);break}return O.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},a)},t}(p.Component);function y1e(e,t){for(var r=[],n=Sl(e),a=Sl(t);!nd(n,a);)r.push(kr(n)),n=Hi(n,1);return r}var b1e=function(e){os(t,e);function t(r){var n=e.call(this,r)||this;return n.renderOptions=function(){return n.state.monthYearsList.map(function(a){var i=UT(a),o=uo(n.props.date,a)&&Ws(n.props.date,a);return O.createElement("div",{className:o?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:i,onClick:n.onChange.bind(n,i),"aria-selected":o?"true":void 0},o?O.createElement("span",{className:"react-datepicker__month-year-option--selected"},"â"):"",an(a,n.props.dateFormat,n.props.locale))})},n.onChange=function(a){return n.props.onChange(a)},n.handleClickOutside=function(){n.props.onCancel()},n.state={monthYearsList:y1e(n.props.minDate,n.props.maxDate)},n}return t.prototype.render=function(){var r=ht({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return O.createElement(CN,{className:r,onClickOutside:this.handleClickOutside},this.renderOptions())},t}(p.Component),j1e=function(e){os(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=Sl(r.props.minDate),a=Sl(r.props.maxDate),i=[];!nd(n,a);){var o=UT(n);i.push(O.createElement("option",{key:o,value:o},an(n,r.props.dateFormat,r.props.locale))),n=Hi(n,1)}return i},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return O.createElement("select",{value:UT(Sl(r.props.date)),className:"react-datepicker__month-year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){var a=an(r.props.date,r.props.dateFormat,r.props.locale);return O.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:r.toggleDropdown},O.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),O.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},a))},r.renderDropdown=function(){return O.createElement(b1e,mr({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,a=[r.renderReadView(!n)];return n&&a.unshift(r.renderDropdown()),a},r.onChange=function(n){r.toggleDropdown();var a=kr(n);uo(r.props.date,a)&&Ws(r.props.date,a)||r.props.onChange(a)},r.toggleDropdown=function(){return r.setState({dropdownVisible:!r.state.dropdownVisible})},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return O.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},r)},t}(p.Component),w1e=function(e){os(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={height:null},r.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var n,a,i;r.list&&(r.list.scrollTop=(i=r.centerLi&&t.calcCenterPosition(r.props.monthRef?r.props.monthRef.clientHeight-((a=(n=r.header)===null||n===void 0?void 0:n.clientHeight)!==null&&a!==void 0?a:0):r.list.clientHeight,r.centerLi))!==null&&i!==void 0?i:0)})},r.handleClick=function(n){var a,i;(r.props.minTime||r.props.maxTime)&&vR(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&xR(n,r.props)||(i=(a=r.props).onChange)===null||i===void 0||i.call(a,n)},r.isSelectedTime=function(n){return r.props.selected&&d1e(r.props.selected,n)},r.isDisabledTime=function(n){return(r.props.minTime||r.props.maxTime)&&vR(n,r.props)||(r.props.excludeTimes||r.props.includeTimes||r.props.filterTime)&&xR(n,r.props)},r.liClasses=function(n){var a,i=["react-datepicker__time-list-item",r.props.timeClassName?r.props.timeClassName(n):void 0];return r.isSelectedTime(n)&&i.push("react-datepicker__time-list-item--selected"),r.isDisabledTime(n)&&i.push("react-datepicker__time-list-item--disabled"),r.props.injectTimes&&(wl(n)*3600+Nl(n)*60+Uc(n))%(((a=r.props.intervals)!==null&&a!==void 0?a:t.defaultProps.intervals)*60)!==0&&i.push("react-datepicker__time-list-item--injected"),i.join(" ")},r.handleOnKeyDown=function(n,a){var i,o;n.key===Ye.Space&&(n.preventDefault(),n.key=Ye.Enter),(n.key===Ye.ArrowUp||n.key===Ye.ArrowLeft)&&n.target instanceof HTMLElement&&n.target.previousSibling&&(n.preventDefault(),n.target.previousSibling instanceof HTMLElement&&n.target.previousSibling.focus()),(n.key===Ye.ArrowDown||n.key===Ye.ArrowRight)&&n.target instanceof HTMLElement&&n.target.nextSibling&&(n.preventDefault(),n.target.nextSibling instanceof HTMLElement&&n.target.nextSibling.focus()),n.key===Ye.Enter&&r.handleClick(a),(o=(i=r.props).handleOnKeyDown)===null||o===void 0||o.call(i,n)},r.renderTimes=function(){for(var n,a=[],i=typeof r.props.format=="string"?r.props.format:"p",o=(n=r.props.intervals)!==null&&n!==void 0?n:t.defaultProps.intervals,l=r.props.selected||r.props.openToDate||kr(),c=Wb(l),d=r.props.injectTimes&&r.props.injectTimes.sort(function(v,b){return v.getTime()-b.getTime()}),u=60*c1e(l),f=u/o,h=0;h<f;h++){var m=LT(c,h*o);if(a.push(m),d){var g=l1e(c,m,h,o,d);a=a.concat(g)}}var x=a.reduce(function(v,b){return b.getTime()<=l.getTime()?b:v},a[0]);return a.map(function(v){return O.createElement("li",{key:v.valueOf(),onClick:r.handleClick.bind(r,v),className:r.liClasses(v),ref:function(b){v===x&&(r.centerLi=b)},onKeyDown:function(b){r.handleOnKeyDown(b,v)},tabIndex:v===x?0:-1,role:"option","aria-selected":r.isSelectedTime(v)?"true":void 0,"aria-disabled":r.
675isDisabledTime(v)?"true":void 0},an(v,i,r.props.locale))})},r.renderTimeCaption=function(){return r.props.showTimeCaption===!1?O.createElement(O.Fragment,null):O.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(r.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(n){r.header=n}},O.createElement("div",{className:"react-datepicker-time__header"},r.props.timeCaption))},r}return Object.defineProperty(t,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},t.prototype.render=function(){var r=this,n,a=this.state.height;return O.createElement("div",{className:"react-datepicker__time-container ".concat(((n=this.props.todayButton)!==null&&n!==void 0?n:t.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),O.createElement("div",{className:"react-datepicker__time"},O.createElement("div",{className:"react-datepicker__time-box"},O.createElement("ul",{className:"react-datepicker__time-list",ref:function(i){r.list=i},style:a?{height:a}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},t.calcCenterPosition=function(r,n){return n.offsetTop-(r/2-n.clientHeight/2)},t}(p.Component),PR=3,N1e=function(e){os(t,e);function t(r){var n=e.call(this,r)||this;return n.YEAR_REFS=Co([],Array(n.props.yearItemNumber),!0).map(function(){return p.createRef()}),n.isDisabled=function(a){return ni(a,{minDate:n.props.minDate,maxDate:n.props.maxDate,excludeDates:n.props.excludeDates,includeDates:n.props.includeDates,filterDate:n.props.filterDate})},n.isExcluded=function(a){return dO(a,{excludeDates:n.props.excludeDates})},n.selectingDate=function(){var a;return(a=n.props.selectingDate)!==null&&a!==void 0?a:n.props.preSelection},n.updateFocusOnPaginate=function(a){var i=function(){var o,l;(l=(o=n.YEAR_REFS[a])===null||o===void 0?void 0:o.current)===null||l===void 0||l.focus()};window.requestAnimationFrame(i)},n.handleYearClick=function(a,i){n.props.onDayClick&&n.props.onDayClick(a,i)},n.handleYearNavigation=function(a,i){var o,l,c,d,u=n.props,f=u.date,h=u.yearItemNumber;if(!(f===void 0||h===void 0)){var m=Pc(f,h).startPeriod;n.isDisabled(i)||n.isExcluded(i)||((l=(o=n.props).setPreSelection)===null||l===void 0||l.call(o,i),a-m<0?n.updateFocusOnPaginate(h-(m-a)):a-m>=h?n.updateFocusOnPaginate(Math.abs(h-(a-m))):(d=(c=n.YEAR_REFS[a-m])===null||c===void 0?void 0:c.current)===null||d===void 0||d.focus())}},n.isSameDay=function(a,i){return hr(a,i)},n.isCurrentYear=function(a){return a===er(kr())},n.isRangeStart=function(a){return n.props.startDate&&n.props.endDate&&uo(no(kr(),a),n.props.startDate)},n.isRangeEnd=function(a){return n.props.startDate&&n.props.endDate&&uo(no(kr(),a),n.props.endDate)},n.isInRange=function(a){return Vy(a,n.props.startDate,n.props.endDate)},n.isInSelectingRange=function(a){var i=n.props,o=i.selectsStart,l=i.selectsEnd,c=i.selectsRange,d=i.startDate,u=i.endDate;return!(o||l||c)||!n.selectingDate()?!1:o&&u?Vy(a,n.selectingDate(),u):l&&d||c&&d&&!u?Vy(a,d,n.selectingDate()):!1},n.isSelectingRangeStart=function(a){var i;if(!n.isInSelectingRange(a))return!1;var o=n.props,l=o.startDate,c=o.selectsStart,d=no(kr(),a);return c?uo(d,(i=n.selectingDate())!==null&&i!==void 0?i:null):uo(d,l??null)},n.isSelectingRangeEnd=function(a){var i;if(!n.isInSelectingRange(a))return!1;var o=n.props,l=o.endDate,c=o.selectsEnd,d=o.selectsRange,u=no(kr(),a);return c||d?uo(u,(i=n.selectingDate())!==null&&i!==void 0?i:null):uo(u,l??null)},n.isKeyboardSelected=function(a){if(!(n.props.date===void 0||n.props.selected==null||n.props.preSelection==null)){var i=n.props,o=i.minDate,l=i.maxDate,c=i.excludeDates,d=i.includeDates,u=i.filterDate,f=Yp(no(n.props.date,a)),h=(o||l||c||d||u)&&Vb(a,n.props);return!n.props.disabledKeyboardNavigation&&!n.props.inline&&!hr(f,Yp(n.props.selected))&&hr(f,Yp(n.props.preSelection))&&!h}},n.onYearClick=function(a,i){var o=n.props.date;o!==void 0&&n.handleYearClick(Yp(no(o,i)),a)},n.onYearKeyDown=function(a,i){var o,l,c=a.key,d=n.props,u=d.date,f=d.yearItemNumber,h=d.handleOnKeyDown;if(c!==Ye.Tab&&a.preventDefault(),!n.props.disabledKeyboardNavigation)switch(c){case Ye.Enter:if(n.props.selected==null)break;n.onYearClick(a,i),(l=(o=n.props).setPreSelection)===null||l===void 0||l.call(o,n.props.selected);break;case Ye.ArrowRight:if(n.props.preSelection==null)break;n.handleYearNavigation(i+1,bl(n.props.preSelection,1));break;case Ye.ArrowLeft:if(n.props.preSelection==null)break;n.handleYearNavigation(i-1,Rh(n.props.preSelection,1));break;case Ye.ArrowUp:{if(u===void 0||f===void 0||n.props.preSelection==null)break;var m=Pc(u,f).startPeriod,g=PR,x=i-g;if(x<m){var v=f%g;i>=m&&i<m+v?g=v:g+=v,x=i-g}n.handleYearNavigation(x,Rh(n.props.preSelection,g));break}case Ye.ArrowDown:{if(u===void 0||f===void 0||n.props.preSelection==null)break;var b=Pc(u,f).endPeriod,g=PR,x=i+g;if(x>b){var v=f%g;i<=b&&i>b-v?g=v:g+=v,x=i+g}n.handleYearNavigation(x,bl(n.props.preSelection,g));break}}h&&h(a)},n.getYearClassNames=function(a){var i=n.props,o=i.date,l=i.minDate,c=i.maxDate,d=i.selected,u=i.excludeDates,f=i.includeDates,h=i.filterDate,m=i.yearClassName;return ht("react-datepicker__year-text","react-datepicker__year-".concat(a),o?m==null?void 0:m(no(o,a)):void 0,{"react-datepicker__year-text--selected":d?a===er(d):void 0,"react-datepicker__year-text--disabled":(l||c||u||f||h)&&Vb(a,n.props),"react-datepicker__year-text--keyboard-selected":n.isKeyboardSelected(a),"react-datepicker__year-text--range-start":n.isRangeStart(a),"react-datepicker__year-text--range-end":n.isRangeEnd(a),"react-datepicker__year-text--in-range":n.isInRange(a),"react-datepicker__year-text--in-selecting-range":n.isInSelectingRange(a),"react-datepicker__year-text--selecting-range-start":n.isSelectingRangeStart(a),"react-datepicker__year-text--selecting-range-end":n.isSelectingRangeEnd(a),"react-datepicker__year-text--today":n.isCurrentYear(a)})}
vendor: 7,808 bytes, line 675
675,n.getYearTabIndex=function(a){if(n.props.disabledKeyboardNavigation||n.props.preSelection==null)return"-1";var i=er(n.props.preSelection),o=Vb(a,n.props);return a===i&&!o?"0":"-1"},n.getYearContent=function(a){return n.props.renderYearContent?n.props.renderYearContent(a):a},n}return t.prototype.render=function(){var r=this,n=[],a=this.props,i=a.date,o=a.yearItemNumber,l=a.onYearMouseEnter,c=a.onYearMouseLeave;if(i===void 0)return null;for(var d=Pc(i,o),u=d.startPeriod,f=d.endPeriod,h=function(x){n.push(O.createElement("div",{ref:m.YEAR_REFS[x-u],onClick:function(v){r.onYearClick(v,x)},onKeyDown:function(v){HK(v)&&(v.preventDefault(),v.key=Ye.Enter),r.onYearKeyDown(v,x)},tabIndex:Number(m.getYearTabIndex(x)),className:m.getYearClassNames(x),onMouseEnter:m.props.usePointerEvent?void 0:function(v){return l(v,x)},onPointerEnter:m.props.usePointerEvent?function(v){return l(v,x)}:void 0,onMouseLeave:m.props.usePointerEvent?void 0:function(v){return c(v,x)},onPointerLeave:m.props.usePointerEvent?function(v){return c(v,x)}:void 0,key:x,"aria-current":m.isCurrentYear(x)?"date":void 0},m.getYearContent(x)))},m=this,g=u;g<=f;g++)h(g);return O.createElement("div",{className:"react-datepicker__year"},O.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},n))},t}(p.Component);function S1e(e,t,r,n){for(var a=[],i=0;i<2*t+1;i++){var o=e+t-i,l=!0;r&&(l=er(r)<=o),n&&l&&(l=er(n)>=o),l&&a.push(o)}return a}var k1e=function(e){os(t,e);function t(r){var n=e.call(this,r)||this;n.renderOptions=function(){var l=n.props.year,c=n.state.yearsList.map(function(f){return O.createElement("div",{className:l===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:n.onChange.bind(n,f),"aria-selected":l===f?"true":void 0},l===f?O.createElement("span",{className:"react-datepicker__year-option--selected"},"â"):"",f)}),d=n.props.minDate?er(n.props.minDate):null,u=n.props.maxDate?er(n.props.maxDate):null;return(!u||!n.state.yearsList.find(function(f){return f===u}))&&c.unshift(O.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:n.incrementYears},O.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!d||!n.state.yearsList.find(function(f){return f===d}))&&c.push(O.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:n.decrementYears},O.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c},n.onChange=function(l){n.props.onChange(l)},n.handleClickOutside=function(){n.props.onCancel()},n.shiftYears=function(l){var c=n.state.yearsList.map(function(d){return d+l});n.setState({yearsList:c})},n.incrementYears=function(){return n.shiftYears(1)},n.decrementYears=function(){return n.shiftYears(-1)};var a=r.yearDropdownItemNumber,i=r.scrollableYearDropdown,o=a||(i?10:5);return n.state={yearsList:S1e(n.props.year,o,n.props.minDate,n.props.maxDate)},n.dropdownRef=p.createRef(),n}return t.prototype.componentDidMount=function(){var r=this.dropdownRef.current;if(r){var n=r.children?Array.from(r.children):null,a=n?n.find(function(i){return i.ariaSelected}):null;r.scrollTop=a&&a instanceof HTMLElement?a.offsetTop+(a.clientHeight-r.clientHeight)/2:(r.scrollHeight-r.clientHeight)/2}},t.prototype.render=function(){var r=ht({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return O.createElement(CN,{className:r,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},t}(p.Component),C1e=function(e){os(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={dropdownVisible:!1},r.renderSelectOptions=function(){for(var n=r.props.minDate?er(r.props.minDate):1900,a=r.props.maxDate?er(r.props.maxDate):2100,i=[],o=n;o<=a;o++)i.push(O.createElement("option",{key:o,value:o},o));return i},r.onSelectChange=function(n){r.onChange(parseInt(n.target.value))},r.renderSelectMode=function(){return O.createElement("select",{value:r.props.year,className:"react-datepicker__year-select",onChange:r.onSelectChange},r.renderSelectOptions())},r.renderReadView=function(n){return O.createElement("div",{key:"read",style:{visibility:n?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(a){return r.toggleDropdown(a)}},O.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),O.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},r.props.year))},r.renderDropdown=function(){return O.createElement(k1e,mr({key:"dropdown"},r.props,{onChange:r.onChange,onCancel:r.toggleDropdown}))},r.renderScrollMode=function(){var n=r.state.dropdownVisible,a=[r.renderReadView(!n)];return n&&a.unshift(r.renderDropdown()),a},r.onChange=function(n){r.toggleDropdown(),n!==r.props.year&&r.props.onChange(n)},r.toggleDropdown=function(n){r.setState({dropdownVisible:!r.state.dropdownVisible},function(){r.props.adjustDateOnChange&&r.handleYearChange(r.props.date,n)})},r.handleYearChange=function(n,a){var i;(i=r.onSelect)===null||i===void 0||i.call(r,n,a),r.setOpen()},r.onSelect=function(n,a){var i,o;(o=(i=r.props).onSelect)===null||o===void 0||o.call(i,n,a)},r.setOpen=function(){var n,a;(a=(n=r.props).setOpen)===null||a===void 0||a.call(n,!0)},r}return t.prototype.render=function(){var r;switch(this.props.dropdownMode){case"scroll":r=this.renderScrollMode();break;case"select":r=this.renderSelectMode();break}return O.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},r)},t}(p.Component),T1e=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],_1e=function(e){var t=(e.className||"").split(/\s+/);return T1e.some(function(r){return t.indexOf(r)>=0})},P1e=function(e){os(t,e);function t(r){var n=e.call(this,r)||this;return n.monthContainer=void 0,n.handleClickOutside=function(a){n.props.onClickOutside(a)},n.setClickOutsideRef=function(){return n.containerRef.current},n.handleDropdownFocus=function(a){var i,o;_1e(a.target)&&((o=(i=n.props).onDropdownFocus)===null||o===void 0||o.call(i,a))},n.getDateInView=function(){var a=n.props,i=a.preSelection,o=a.selected,l=a.openToDate,c=WK(n.props),d=VK(n.props),u=kr(),f=l||o||i;return f||(c&&ku(u,c)?c:d&&nd(u,d)?d:u)},n.increaseMonth=function(){n.setState(function(a){var i=a.date;return{date:Hi(i,1)}},function(){return n.handleMonthChange(n.state.date)})},n.decreaseMonth=function(){n.setState(function(a){var i=a.date;return{date:tu(i,1)}},function(){return n.handleMonthChange(n.state.date)})},n.handleDayClick=function(a,i,o){n.props.onSelect(a,i,o),n.props.setPreSelection&&n.props.setPreSelection(a)},n.handleDayMouseEnter=function(a){n.setState({selectingDate:a}),n.props.onDayMouseEnter&&n.props.onDayMouseEnter(a)},n.handleMonthMouseLeave=function(){n.setState({selectingDate:void 0}),n.props.onMonthMouseLeave&&n.props.onMonthMouseLeave()},n.handleYearMouseEnter=function(a,i){n.setState({selectingDate:no(kr(),i)}),n.props.onYearMouseEnter&&n.props.onYearMouseEnter(a,i)},n.handleYearMouseLeave=function(a,i){n.props.onYearMouseLeave&&n.props.onYearMouseLeave(a,i)},n.handleYearChange=function(a){var i,o,l,c;(o=(i=n.props).onYearChange)===null||o===void 0||o.call(i,a),n.setState({isRenderAriaLiveMessage:!0}),n.props.adjustDateOnChange&&(n.props.onSelect(a),(c=(l=n.props).setOpen)===null||c===void 0||c.c
675all(l,!0)),n.props.setPreSelection&&n.props.setPreSelection(a)},n.getEnabledPreSelectionDateForMonth=function(a){if(!ni(a,n.props))return a;for(var i=Sl(a),o=QNe(a),l=fje(o,i),c=null,d=0;d<=l;d++){var u=Bi(i,d);if(!ni(u,n.props)){c=u;break}}return c},n.handleMonthChange=function(a){var i,o,l,c=(i=n.getEnabledPreSelectionDateForMonth(a))!==null&&i!==void 0?i:a;n.handleCustomMonthChange(c),n.props.adjustDateOnChange&&(n.props.onSelect(c),(l=(o=n.props).setOpen)===null||l===void 0||l.call(o,!0)),n.props.setPreSelection&&n.props.setPreSelection(c)},n.handleCustomMonthChange=function(a){var i,o;(o=(i=n.props).onMonthChange)===null||o===void 0||o.call(i,a),n.setState({isRenderAriaLiveMessage:!0})},n.handleMonthYearChange=function(a){n.handleYearChange(a),n.handleMonthChange(a)},n.changeYear=function(a){n.setState(function(i){var o=i.date;return{date:no(o,Number(a))}},function(){return n.handleYearChange(n.state.date)})},n.changeMonth=function(a){n.setState(function(i){var o=i.date;return{date:ei(o,Number(a))}},function(){return n.handleMonthChange(n.state.date)})},n.changeMonthYear=function(a){n.setState(function(i){var o=i.date;return{date:no(ei(o,Ks(a)),er(a))}},function(){return n.handleMonthYearChange(n.state.date)})},n.header=function(a){a===void 0&&(a=n.state.date);var i=zc(a,n.props.locale,n.props.calendarStartDay),o=[];return n.props.showWeekNumbers&&o.push(O.createElement("div",{key:"W",className:"react-datepicker__day-name"},n.props.weekLabel||"#")),o.concat([0,1,2,3,4,5,6].map(function(l){var c=Bi(i,l),d=n.formatWeekday(c,n.props.locale),u=n.props.weekDayClassName?n.props.weekDayClassName(c):void 0;return O.createElement("div",{key:l,"aria-label":an(c,"EEEE",n.props.locale),className:ht("react-datepicker__day-name",u)},d)}))},n.formatWeekday=function(a,i){return n.props.formatWeekDay?ZNe(a,n.props.formatWeekDay,i):n.props.useWeekdaysShort?JNe(a,i):XNe(a,i)},n.decreaseYear=function(){n.setState(function(a){var i,o=a.date;return{date:Rh(o,n.props.showYearPicker?(i=n.props.yearItemNumber)!==null&&i!==void 0?i:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.clearSelectingDate=function(){n.setState({selectingDate:void 0})},n.renderPreviousButton=function(){var a,i,o;if(!n.props.renderCustomHeader){var l=(a=n.props.monthsShown)!==null&&a!==void 0?a:t.defaultProps.monthsShown,c=n.props.showPreviousMonths?l-1:0,d=(i=n.props.monthSelectedIn)!==null&&i!==void 0?i:c,u=tu(n.state.date,d),f;switch(!0){case n.props.showMonthYearPicker:f=jR(n.state.date,n.props);break;case n.props.showYearPicker:f=s1e(n.state.date,n.props);break;case n.props.showQuarterYearPicker:f=r1e(n.state.date,n.props);break;default:f=yR(u,n.props);break}if(!(!((o=n.props.forceShowMonthNavigation)!==null&&o!==void 0?o:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&f||n.props.showTimeSelectOnly)){var h=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],m=["react-datepicker__navigation","react-datepicker__navigation--previous"],g=n.decreaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(g=n.decreaseYear),f&&n.props.showDisabledMonthNavigation&&(m.push("react-datepicker__navigation--previous--disabled"),g=void 0);var x=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,v=n.props,b=v.previousMonthButtonLabel,y=b===void 0?t.defaultProps.previousMonthButtonLabel:b,j=v.previousYearButtonLabel,w=j===void 0?t.defaultProps.previousYearButtonLabel:j,N=n.props,S=N.previousMonthAriaLabel,k=S===void 0?typeof y=="string"?y:"Previous Month":S,T=N.previousYearAriaLabel,C=T===void 0?typeof w=="string"?w:"Previous Year":T;return O.createElement("button",{type:"button",className:m.join(" "),onClick:g,onKeyDown:n.props.handleOnKeyDown,"aria-label":x?C:k},O.createElement("span",{className:h.join(" ")},x?w:y))}}},n.increaseYear=function(){n.setState(function(a){var i,o=a.date;return{date:bl(o,n.props.showYearPicker?(i=n.props.yearItemNumber)!==null&&i!==void 0?i:t.defaultProps.yearItemNumber:1)}},function(){return n.handleYearChange(n.state.date)})},n.renderNextButton=function(){var a;if(!n.props.renderCustomHeader){var i;switch(!0){case n.props.showMonthYearPicker:i=wR(n.state.date,n.props);break;case n.props.showYearPicker:i=a1e(n.state.date,n.props);break;case n.props.showQuarterYearPicker:i=n1e(n.state.date,n.props);break;default:i=bR(n.state.date,n.props);break}if(!(!((a=n.props.forceShowMonthNavigation)!==null&&a!==void 0?a:t.defaultProps.forceShowMonthNavigation)&&!n.props.showDisabledMonthNavigation&&i||n.props.showTimeSelectOnly)){var o=["react-datepicker__navigation","react-datepicker__navigation--next"],l=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];n.props.showTimeSelect&&o.push("react-datepicker__navigation--next--with-time"),n.props.todayButton&&o.push("react-datepicker__navigation--next--with-today-button");var c=n.increaseMonth;(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker)&&(c=n.increaseYear),i&&n.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--next--disabled"),c=void 0);var d=n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker,u=n.props,f=u.nextMonthButtonLabel,h=f===void 0?t.defaultProps.nextMonthButtonLabel:f,m=u.nextYearButtonLabel,g=m===void 0?t.defaultProps.nextYearButtonLabel:m,x=n.props,v=x.nextMonthAriaLabel,b=v===void 0?typeof h=="string"?h:"Next Month":v,y=x.nextYearAriaLabel,j=y===void 0?typeof g=="string"?g:"Next Year":y;return O.createElement("button",{type:"button",className:o.join(" "),onClick:c,onKeyDown:n.props.handleOnKeyDown,"aria-label":d?j:b},O.createElement("span",{className:l.join(" ")},d?g:h))}}},n.renderCurrentMonth=function(a){a===void 0&&(a=n.state.date);var i=["react-datepicker__current-month"];return n.props.showYearDropdown&&i.push("react-datepicker__current-month--hasYearDropdown"),n.props.showMonthDropdown&&i.push("react-datepicker__current-month--hasMonthDropdown"),n.props.showMonthYearDropdown&&i.push("react-datepicker__current-month--hasMonthYearDropdown"),O.createElement("h2",{className:i.join(" ")},an(a,n.props.dateFormat,n.props.locale))}
675,n.renderYearDropdown=function(a){if(a===void 0&&(a=!1),!(!n.props.showYearDropdown||a))return O.createElement(C1e,mr({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeYear,year:er(n.state.date)}))},n.renderMonthDropdown=function(a){if(a===void 0&&(a=!1),!(!n.props.showMonthDropdown||a))return O.createElement(v1e,mr({},t.defaultProps,n.props,{month:Ks(n.state.date),onChange:n.changeMonth}))},n.renderMonthYearDropdown=function(a){if(a===void 0&&(a=!1),!(!n.props.showMonthYearDropdown||a))return O.createElement(j1e,mr({},t.defaultProps,n.props,{date:n.state.date,onChange:n.changeMonthYear}))},n.handleTodayButtonClick=function(a){n.props.onSelect(mR(),a),n.props.setPreSelection&&n.props.setPreSelection(mR())},n.renderTodayButton=function(){if(!(!n.props.todayButton||n.props.showTimeSelectOnly))return O.createElement("div",{className:"react-datepicker__today-button",onClick:n.handleTodayButtonClick},n.props.todayButton)},n.renderDefaultHeader=function(a){var i=a.monthDate,o=a.i;return O.createElement("div",{className:"react-datepicker__header ".concat(n.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},n.renderCurrentMonth(i),O.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(n.props.dropdownMode),onFocus:n.handleDropdownFocus},n.renderMonthDropdown(o!==0),n.renderMonthYearDropdown(o!==0),n.renderYearDropdown(o!==0)),O.createElement("div",{className:"react-datepicker__day-names"},n.header(i)))},n.renderCustomHeader=function(a){var i,o,l=a.monthDate,c=a.i;if(n.props.showTimeSelect&&!n.state.monthContainer||n.props.showTimeSelectOnly)return null;var d=yR(n.state.date,n.props),u=bR(n.state.date,n.props),f=jR(n.state.date,n.props),h=wR(n.state.date,n.props),m=!n.props.showMonthYearPicker&&!n.props.showQuarterYearPicker&&!n.props.showYearPicker;return O.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:n.props.onDropdownFocus},(o=(i=n.props).renderCustomHeader)===null||o===void 0?void 0:o.call(i,mr(mr({},n.state),{customHeaderCount:c,monthDate:l,changeMonth:n.changeMonth,changeYear:n.changeYear,decreaseMonth:n.decreaseMonth,increaseMonth:n.increaseMonth,decreaseYear:n.decreaseYear,increaseYear:n.increaseYear,prevMonthButtonDisabled:d,nextMonthButtonDisabled:u,prevYearButtonDisabled:f,nextYearButtonDisabled:h})),m&&O.createElement("div",{className:"react-datepicker__day-names"},n.header(l)))},n.renderYearHeader=function(a){var i=a.monthDate,o=n.props,l=o.showYearPicker,c=o.yearItemNumber,d=c===void 0?t.defaultProps.yearItemNumber:c,u=Pc(i,d),f=u.startPeriod,h=u.endPeriod;return O.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},l?"".concat(f," - ").concat(h):er(i))},n.renderHeader=function(a){var i=a.monthDate,o=a.i,l=o===void 0?0:o,c={monthDate:i,i:l};switch(!0){case n.props.renderCustomHeader!==void 0:return n.renderCustomHeader(c);case(n.props.showMonthYearPicker||n.props.showQuarterYearPicker||n.props.showYearPicker):return n.renderYearHeader(c);default:return n.renderDefaultHeader(c)}},n.renderMonths=function(){var a,i;if(!(n.props.showTimeSelectOnly||n.props.showYearPicker)){for(var o=[],l=(a=n.props.monthsShown)!==null&&a!==void 0?a:t.defaultProps.monthsShown,c=n.props.showPreviousMonths?l-1:0,d=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?bl(n.state.date,c):tu(n.state.date,c),u=(i=n.props.monthSelectedIn)!==null&&i!==void 0?i:c,f=0;f<l;++f){var h=f-u+c,m=n.props.showMonthYearPicker||n.props.showQuarterYearPicker?bl(d,h):Hi(d,h),g="month-".concat(f),x=f<l-1,v=f>0;o.push(O.createElement("div",{key:g,ref:function(b){n.monthContainer=b??void 0},className:"react-datepicker__month-container"},n.renderHeader({monthDate:m,i:f}),O.createElement(g1e,mr({},t.defaultProps,n.props,{containerRef:n.containerRef,ariaLabelPrefix:n.props.monthAriaLabelPrefix,day:m,onDayClick:n.handleDayClick,handleOnKeyDown:n.props.handleOnDayKeyDown,handleOnMonthKeyDown:n.props.handleOnKeyDown,onDayMouseEnter:n.handleDayMouseEnter,onMouseLeave:n.handleMonthMouseLeave,orderInDisplay:f,selectingDate:n.state.selectingDate,monthShowsDuplicateDaysEnd:x,monthShowsDuplicateDaysStart:v}))))}return o}},n.renderYears=function(){if(!n.props.showTimeSelectOnly&&n.props.showYearPicker)return O.createElement("div",{className:"react-datepicker__year--container"},n.renderHeader({monthDate:n.state.date}),O.createElement(N1e,mr({},t.defaultProps,n.props,{selectingDate:n.state.selectingDate,date:n.state.date,onDayClick:n.handleDayClick,clearSelectingDate:n.clearSelectingDate,onYearMouseEnter:n.handleYearMouseEnter,onYearMouseLeave:n.handleYearMouseLeave})))},n.renderTimeSection=function(){if(n.props.showTimeSelect&&(n.state.monthContainer||n.props.showTimeSelectOnly))return O.createElement(w1e,mr({},t.defaultProps,n.props,{onChange:n.props.onTimeChange,format:n.props.timeFormat,intervals:n.props.timeIntervals,monthRef:n.state.monthContainer}))},n.renderInputTimeSection=function(){var a=n.props.selected?new Date(n.props.selected):void 0,i=a&&TN(a)&&!!n.props.selected,o=i?"".concat(SR(a.getHours()),":").concat(SR(a.getMinutes())):"";if(n.props.showTimeInput)return O.createElement(u1e,mr({},t.defaultProps,n.props,{date:a,timeString:o,onChange:n.props.onTimeChange}))},n.renderAriaLiveRegion=function(){var a,i=Pc(n.state.date,(a=n.props.yearItemNumber)!==null&&a!==void 0?a:t.defaultProps.yearItemNumber),o=i.startPeriod,l=i.endPeriod,c;return n.props.showYearPicker?c="".concat(o," - ").concat(l):n.props.showMonthYearPicker||n.props.showQuarterYearPicker?c=er(n.state.date):c="".concat(cO(Ks(n.state.date),n.props.locale)," ").concat(er(n.state.date)),O.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-l
675ive"},n.state.isRenderAriaLiveMessage&&c)},n.renderChildren=function(){if(n.props.children)return O.createElement("div",{className:"react-datepicker__children-container"},n.props.children)},n.containerRef=p.createRef(),n.state={date:n.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},n}return Object.defineProperty(t,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Iv}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){r.setState({monthContainer:r.monthContainer})}())},t.prototype.componentDidUpdate=function(r){var n=this;if(this.props.preSelection&&(!hr(this.props.preSelection,r.preSelection)||this.props.monthSelectedIn!==r.monthSelectedIn)){var a=!Ws(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return a&&n.handleCustomMonthChange(n.state.date)})}else this.props.openToDate&&!hr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})},t.prototype.render=function(){var r=this.props.container||WNe;return O.createElement(CN,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},O.createElement("div",{style:{display:"contents"},ref:this.containerRef},O.createElement(r,{className:ht("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},t}(p.Component),E1e=function(e){var t=e.icon,r=e.className,n=r===void 0?"":r,a=e.onClick,i="react-datepicker__calendar-icon";if(typeof t=="string")return O.createElement("i",{className:"".concat(i," ").concat(t," ").concat(n),"aria-hidden":"true",onClick:a});if(O.isValidElement(t)){var o=t;return O.cloneElement(o,{className:"".concat(o.props.className||""," ").concat(i," ").concat(n),onClick:function(l){typeof o.props.onClick=="function"&&o.props.onClick(l),typeof a=="function"&&a(l)}})}return O.createElement("svg",{className:"".concat(i," ").concat(n),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:a},O.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},qK=function(e){os(t,e);function t(r){var n=e.call(this,r)||this;return n.portalRoot=null,n.el=document.createElement("div"),n}return t.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},t.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},t.prototype.render=function(){return Rf.createPortal(this.props.children,this.el)},t}(p.Component),O1e="[tabindex], a, button, input, select, textarea",A1e=function(e){return(e instanceof HTMLAnchorElement||!e.disabled)&&e.tabIndex!==-1},YK=function(e){os(t,e);function t(r){var n=e.call(this,r)||this;return n.getTabChildren=function(){var a;return Array.prototype.slice.call((a=n.tabLoopRef.current)===null||a===void 0?void 0:a.querySelectorAll(O1e),1,-1).filter(A1e)},n.handleFocusStart=function(){var a=n.getTabChildren();a&&a.length>1&&a[a.length-1].focus()},n.handleFocusEnd=function(){var a=n.getTabChildren();a&&a.length>1&&a[0].focus()},n.tabLoopRef=p.createRef(),n}return t.prototype.render=function(){var r;return((r=this.props.enableTabLoop)!==null&&r!==void 0?r:t.defaultProps.enableTabLoop)?O.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},O.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,O.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},t.defaultProps={enableTabLoop:!0},t}(p.Component);function D1e(e){var t=function(r){var n,a=typeof r.hidePopper=="boolean"?r.hidePopper:!0,i=p.useRef(null),o=zNe(mr({open:!a,whileElementsMounted:vq,placement:r.popperPlacement,middleware:Co([wq({padding:15}),jq(10),Nq({element:i})],(n=r.popperModifiers)!==null&&n!==void 0?n:[],!0)},r.popperProps)),l=mr(mr({},r),{hidePopper:a,popperProps:mr(mr({},o),{arrowRef:i})});return O.createElement(e,mr({},l))};return t}var M1e=function(e){os(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(t,"defaultProps",{get:function(){return{hidePopper:!0}}
675,enumerable:!1,configurable:!0}),t.prototype.render=function(){var r=this.props,n=r.className,a=r.wrapperClassName,i=r.hidePopper,o=i===void 0?t.defaultProps.hidePopper:i,l=r.popperComponent,c=r.targetComponent,d=r.enableTabLoop,u=r.popperOnKeyDown,f=r.portalId,h=r.portalHost,m=r.popperProps,g=r.showArrow,x=void 0;if(!o){var v=ht("react-datepicker-popper",n);x=O.createElement(YK,{enableTabLoop:d},O.createElement("div",{ref:m.refs.setFloating,style:m.floatingStyles,className:v,"data-placement":m.placement,onKeyDown:u},l,g&&O.createElement(INe,{ref:m.arrowRef,context:m.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}this.props.popperContainer&&(x=p.createElement(this.props.popperContainer,{},x)),f&&!o&&(x=O.createElement(qK,{portalId:f,portalHost:h},x));var b=ht("react-datepicker-wrapper",a);return O.createElement(O.Fragment,null,O.createElement("div",{ref:m.refs.setReference,className:b},c),x)},t}(p.Component),I1e=D1e(M1e),ER="react-datepicker-ignore-onclickoutside";function R1e(e,t){return e&&t?Ks(e)!==Ks(t)||er(e)!==er(t):e!==t}var tk="Date input not valid.",ru=function(e){os(t,e);function t(r){var n=e.call(this,r)||this;return n.calendar=null,n.input=null,n.getPreSelection=function(){return n.props.openToDate?n.props.openToDate:n.props.selectsEnd&&n.props.startDate?n.props.startDate:n.props.selectsStart&&n.props.endDate?n.props.endDate:kr()},n.modifyHolidays=function(){var a;return(a=n.props.holidays)===null||a===void 0?void 0:a.reduce(function(i,o){var l=new Date(o.date);return TN(l)?Co(Co([],i,!0),[mr(mr({},o),{date:l})],!1):i},[])},n.calcInitialState=function(){var a,i=n.getPreSelection(),o=WK(n.props),l=VK(n.props),c=o&&ku(i,Wb(o))?o:l&&nd(i,pR(l))?l:i;return{open:n.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(a=n.props.selectsRange?n.props.startDate:n.props.selected)!==null&&a!==void 0?a:c,highlightDates:NR(n.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},n.resetHiddenStatus=function(){n.setState(mr(mr({},n.state),{wasHidden:!1}))},n.setHiddenStatus=function(){n.setState(mr(mr({},n.state),{wasHidden:!0}))},n.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&n.setHiddenStatus()},n.clearPreventFocusTimeout=function(){n.preventFocusTimeout&&clearTimeout(n.preventFocusTimeout)},n.setFocus=function(){var a,i;(i=(a=n.input)===null||a===void 0?void 0:a.focus)===null||i===void 0||i.call(a,{preventScroll:!0})},n.setBlur=function(){var a,i;(i=(a=n.input)===null||a===void 0?void 0:a.blur)===null||i===void 0||i.call(a),n.cancelFocusInput()},n.deferBlur=function(){requestAnimationFrame(function(){n.setBlur()})},n.setOpen=function(a,i){i===void 0&&(i=!1),n.setState({open:a,preSelection:a&&n.state.open?n.state.preSelection:n.calcInitialState().preSelection,lastPreSelectChange:rk},function(){a||n.setState(function(o){return{focused:i?o.focused:!1}},function(){!i&&n.deferBlur(),n.setState({inputValue:null})})})},n.inputOk=function(){return jl(n.state.preSelection)},n.isCalendarOpen=function(){return n.props.open===void 0?n.state.open&&!n.props.disabled&&!n.props.readOnly:n.props.open},n.handleFocus=function(a){var i,o,l=n.state.wasHidden,c=l?n.state.open:!0;l&&n.resetHiddenStatus(),n.state.preventFocus||((o=(i=n.props).onFocus)===null||o===void 0||o.call(i,a),c&&!n.props.preventOpenOnFocus&&!n.props.readOnly&&n.setOpen(!0)),n.setState({focused:!0})},n.sendFocusBackToInput=function(){n.preventFocusTimeout&&n.clearPreventFocusTimeout(),n.setState({preventFocus:!0},function(){n.preventFocusTimeout=setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})})}
675,n.cancelFocusInput=function(){clearTimeout(n.inputFocusTimeout),n.inputFocusTimeout=void 0},n.deferFocusInput=function(){n.cancelFocusInput(),n.inputFocusTimeout=setTimeout(function(){return n.setFocus()},1)},n.handleDropdownFocus=function(){n.cancelFocusInput()},n.handleBlur=function(a){var i,o;(!n.state.open||n.props.withPortal||n.props.showTimeInput)&&((o=(i=n.props).onBlur)===null||o===void 0||o.call(i,a)),n.state.open&&n.props.open===!1&&n.setOpen(!1),n.setState({focused:!1})},n.handleCalendarClickOutside=function(a){var i,o;n.props.inline||n.setOpen(!1),(o=(i=n.props).onClickOutside)===null||o===void 0||o.call(i,a),n.props.withPortal&&a.preventDefault()},n.handleChange=function(){for(var a,i,o,l,c,d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];var f=d[0];if(!(n.props.onChangeRaw&&(n.props.onChangeRaw.apply(n,d),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){n.setState({inputValue:(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:$1e});var h=n.props,m=h.selectsRange,g=h.startDate,x=h.endDate,v=(a=n.props.dateFormat)!==null&&a!==void 0?a:t.defaultProps.dateFormat,b=(i=n.props.strictParsing)!==null&&i!==void 0?i:t.defaultProps.strictParsing,y=(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:"";if(m){var j=y.split("-",2).map(function(P){return P.trim()}),w=j[0],N=j[1],S=XS(w??"",v,n.props.locale,b),k=XS(N??"",v,n.props.locale,b),T=(g==null?void 0:g.getTime())!==(S==null?void 0:S.getTime()),C=(x==null?void 0:x.getTime())!==(k==null?void 0:k.getTime());if(!T&&!C||S&&ni(S,n.props)||k&&ni(k,n.props))return;(l=(o=n.props).onChange)===null||l===void 0||l.call(o,[S,k],f)}else{var E=XS(y,v,n.props.locale,b,(c=n.props.selected)!==null&&c!==void 0?c:void 0);(E||!y)&&n.setSelected(E,f,!0)}}},n.handleSelect=function(a,i,o){if(n.props.shouldCloseOnSelect&&!n.props.showTimeSelect&&n.sendFocusBackToInput(),n.props.onChangeRaw&&n.props.onChangeRaw(i),n.setSelected(a,i,!1,o),n.props.showDateSelect&&n.setState({isRenderAriaLiveMessage:!0}),!n.props.shouldCloseOnSelect||n.props.showTimeSelect)n.setPreSelection(a);else if(!n.props.inline){n.props.selectsRange||n.setOpen(!1);var l=n.props,c=l.startDate,d=l.endDate;c&&!d&&(n.props.swapRange||!TR(a,c))&&n.setOpen(!1)}},n.setSelected=function(a,i,o,l){var c,d,u=a;if(n.props.showYearPicker){if(u!==null&&Vb(er(u),n.props))return}else if(n.props.showMonthYearPicker){if(u!==null&&zK(u,n.props))return}else if(u!==null&&ni(u,n.props))return;var f=n.props,h=f.onChange,m=f.selectsRange,g=f.startDate,x=f.endDate,v=f.selectsMultiple,b=f.selectedDates,y=f.minTime,j=f.swapRange;if(!Rd(n.props.selected,u)||n.props.allowSameDay||m||v)if(u!==null&&(n.props.selected&&(!o||!n.props.showTimeSelect&&!n.props.showTimeSelectOnly&&!n.props.showTimeInput)&&(u=JS(u,{hour:wl(n.props.selected),minute:Nl(n.props.selected),second:Uc(n.props.selected)})),!o&&(n.props.showTimeSelect||n.props.showTimeSelectOnly)&&y&&(u=JS(u,{hour:y.getHours(),minute:y.getMinutes(),second:y.getSeconds()})),n.props.inline||n.setState({preSelection:u}),n.props.focusSelectedMonth||n.setState({monthSelectedIn:l})),m){var w=!g&&!x,N=g&&!x,S=g&&x;w?h==null||h([u,null],i):N&&(u===null?h==null||h([null,null],i):TR(u,g)?j?h==null||h([u,g],i):h==null||h([u,null],i):h==null||h([g,u],i)),S&&(h==null||h([u,null],i))}else if(v){if(u!==null)if(!(b!=null&&b.length))h==null||h([u],i);else{var k=b.some(function(C){return hr(C,u)});if(k){var T=b.filter(function(C){return!hr(C,u)});h==null||h(T,i)}else h==null||h(Co(Co([],b,!0),[u],!1),i)}}else h==null||h(u,i);o||((d=(c=n.props).onSelect)===null||d===void 0||d.call(c,u,i),n.setState({inputValue:null}))},n.setPreSelection=function(a){var i=jl(n.props.minDate),o=jl(n.props.maxDate),l=!0;if(a){var c=Wb(a);if(i&&o)l=Gp(a,n.props.minDate,n.props.maxDate);else if(i){var d=Wb(n.props.minDate);l=nd(a,d)||Rd(c,d)}else if(o){var u=pR(n.props.maxDate);l=ku(a,u)||Rd(c,u)}}l&&n.setState({preSelection:a})},n.toggleCalendar=function(){n.setOpen(!n.state.open)},n.handleTimeChange=function(a){var i,o;if(!(n.props.selectsRange||n.props.selectsMultiple)){var l=n.props.selected?n.props.selected:n.getPreSelection(),c=n.props.selected?a:JS(l,{hour:wl(a),minute:Nl(a)});n.setState({preSelection:c}),(o=(i=n.props).onChange)===null||o===void 0||o.call(i,c),n.props.shouldCloseOnSelect&&!n.props.showTimeInput&&(n.sendFocusBackToInput(),n.setOpen(!1)),n.props.showTimeInput&&n.setOpen(!0),(n.props.showTimeSelectOnly||n.props.showTimeSelect)&&n.setState({isRenderAriaLiveMessage:!0}),n.setState({inputValue:null})}},n.onInputClick=function(){var a,i;!n.props.disabled&&!n.props.readOnly&&n.setOpen(!0),(i=(a=n.props).onInputClick)===null||i===void 0||i.call(a)},n.onInputKeyDown=function(a){var i,o,l,c,d,u;(o=(i=n.props).onKeyDown)===null||o===void 0||o.call(i,a);var f=a.key;if(!n.state.open&&!n.props.inline&&!n.props.preventOpenOnFocus){(f===Ye.ArrowDown||f===Ye.ArrowUp||f===Ye.Enter)&&((l=n.onInputClick)===null||l===void 0||l.call(n));return}if(n.state.open){if(f===Ye.ArrowDown||f===Ye.ArrowUp){a.preventDefault();var h=n.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":n.props.showWeekPicker&&n.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':n.props.showFullMonthYearPicker||n.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',m=((c=n.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&n.calendar.containerRef.current.querySelector(h);m instanceof HTMLElement&&m.focus({preventScroll:!0});return}var g=kr(n.state.preSelection);f===Ye.Enter?(a.preventDefault(),a.target.blur(),n.inputOk()&&n.state.lastPreSelectChange===rk?(n.handleSelect(g,a),!n.props.shouldCloseOnSelect&&n.setPreSelection(g)):n.setOpen(!1)):f===Ye.Escape?(a.preventDefault(),a.target.blur(),n.sendFocusBackToInput(),n.setOpen(!1)):f===Ye.Tab&&n.setOpen(!1),n.inputOk()||(u=(d=n.props).onInputError)===null||u===void 0||u.call(d,{code:1,msg:tk})}}
675,n.onPortalKeyDown=function(a){var i=a.key;i===Ye.Escape&&(a.preventDefault(),n.setState({preventFocus:!0},function(){n.setOpen(!1),setTimeout(function(){n.setFocus(),n.setState({preventFocus:!1})})}))},n.onDayKeyDown=function(a){var i,o,l,c,d,u,f=n.props,h=f.minDate,m=f.maxDate,g=f.disabledKeyboardNavigation,x=f.showWeekPicker,v=f.shouldCloseOnSelect,b=f.locale,y=f.calendarStartDay,j=f.adjustDateOnChange,w=f.inline;if((o=(i=n.props).onKeyDown)===null||o===void 0||o.call(i,a),!g){var N=a.key,S=a.shiftKey,k=kr(n.state.preSelection),T=function(H,W){var z=W;switch(H){case Ye.ArrowRight:z=x?cj(W,1):Bi(W,1);break;case Ye.ArrowLeft:z=x?dR(W,1):fNe(W,1);break;case Ye.ArrowUp:z=dR(W,1);break;case Ye.ArrowDown:z=cj(W,1);break;case Ye.PageUp:z=S?Rh(W,1):tu(W,1);break;case Ye.PageDown:z=S?bl(W,1):Hi(W,1);break;case Ye.Home:z=zc(W,b,y);break;case Ye.End:z=KNe(W);break}return z},C=function(H,W){for(var z=40,R=H,q=!1,V=0,se=T(H,W);!q;){if(V>=z){se=W;break}h&&se<h&&(R=Ye.ArrowRight,se=ni(h,n.props)?T(R,se):h),m&&se>m&&(R=Ye.ArrowLeft,se=ni(m,n.props)?T(R,se):m),ni(se,n.props)?((R===Ye.PageUp||R===Ye.Home)&&(R=Ye.ArrowRight),(R===Ye.PageDown||R===Ye.End)&&(R=Ye.ArrowLeft),se=T(R,se)):q=!0,V++}return se};if(N===Ye.Enter){a.preventDefault(),n.handleSelect(k,a),!v&&n.setPreSelection(k);return}else if(N===Ye.Escape){a.preventDefault(),n.setOpen(!1),n.inputOk()||(c=(l=n.props).onInputError)===null||c===void 0||c.call(l,{code:1,msg:tk});return}var E=null;switch(N){case Ye.ArrowLeft:case Ye.ArrowRight:case Ye.ArrowUp:case Ye.ArrowDown:case Ye.PageUp:case Ye.PageDown:case Ye.Home:case Ye.End:E=C(N,k);break}if(!E){(u=(d=n.props).onInputError)===null||u===void 0||u.call(d,{code:1,msg:tk});return}if(a.preventDefault(),n.setState({lastPreSelectChange:rk}),j&&n.setSelected(E),n.setPreSelection(E),w){var P=Ks(k),_=Ks(E),I=er(k),F=er(E);P!==_||I!==F?n.setState({shouldFocusDayInline:!0}):n.setState({shouldFocusDayInline:!1})}}},n.onPopperKeyDown=function(a){var i=a.key;i===Ye.Escape&&(a.preventDefault(),n.sendFocusBackToInput())},n.onClearClick=function(a){a&&a.preventDefault&&a.preventDefault(),n.sendFocusBackToInput();var i=n.props,o=i.selectsRange,l=i.onChange;o?l==null||l([null,null],a):l==null||l(null,a),n.setState({inputValue:null})},n.clear=function(){n.onClearClick()},n.onScroll=function(a){typeof n.props.closeOnScroll=="boolean"&&n.props.closeOnScroll?(a.target===document||a.target===document.documentElement||a.target===document.body)&&n.setOpen(!1):typeof n.props.closeOnScroll=="function"&&n.props.closeOnScroll(a)&&n.setOpen(!1)},n.renderCalendar=function(){var a,i;return!n.props.inline&&!n.isCalendarOpen()?null:O.createElement(P1e,mr({showMonthYearDropdown:void 0,ref:function(o){n.calendar=o}},n.props,n.state,{setOpen:n.setOpen,dateFormat:(a=n.props.dateFormatCalendar)!==null&&a!==void 0?a:t.defaultProps.dateFormatCalendar,onSelect:n.handleSelect,onClickOutside:n.handleCalendarClickOutside,holidays:o1e(n.modifyHolidays()),outsideClickIgnoreClass:ER,onDropdownFocus:n.handleDropdownFocus,onTimeChange:n.handleTimeChange,className:n.props.calendarClassName,container:n.props.calendarContainer,handleOnKeyDown:n.props.onKeyDown,handleOnDayKeyDown:n.onDayKeyDown,setPreSelection:n.setPreSelection,dropdownMode:(i=n.props.dropdownMode)!==null&&i!==void 0?i:t.defaultProps.dropdownMode}),n.props.children)},n.renderAriaLiveRegion=function(){var a=n.props,i=a.dateFormat,o=i===void 0?t.defaultProps.dateFormat:i,l=a.locale,c=n.props.showTimeInput||n.props.showTimeSelect,d=c?"PPPPp":"PPPP",u;return n.props.selectsRange?u="Selected start date: ".concat(Xa(n.props.startDate,{dateFormat:d,locale:l}),". ").concat(n.props.endDate?"End date: "+Xa(n.props.endDate,{dateFormat:d,locale:l}):""):n.props.showTimeSelectOnly?u="Selected time: ".concat(Xa(n.props.selected,{dateFormat:o,locale:l})):n.props.showYearPicker?u="Selected year: ".concat(Xa(n.props.selected,{dateFormat:"yyyy",locale:l})):n.props.showMonthYearPicker?u="Selected month: ".concat(Xa(n.props.selected,{dateFormat:"MMMM yyyy",locale:l})):n.props.showQuarterYearPicker?u="Selected quarter: ".concat(Xa(n.props.selected,{dateFormat:"yyyy, QQQ",locale:l})):u="Selected date: ".concat(Xa(n.props.selected,{dateFormat:d,locale:l})),O.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-l
675ive"},u)},n.renderDateInput=function(){var a,i,o,l=ht(n.props.className,(a={},a[ER]=n.state.open,a)),c=n.props.customInput||O.createElement("input",{type:"text"}),d=n.props.customInputRef||"ref",u=n.props,f=u.dateFormat,h=f===void 0?t.defaultProps.dateFormat:f,m=u.locale,g=typeof n.props.value=="string"?n.props.value:typeof n.state.inputValue=="string"?n.state.inputValue:n.props.selectsRange?HNe(n.props.startDate,n.props.endDate,{dateFormat:h,locale:m}):n.props.selectsMultiple?qNe((o=n.props.selectedDates)!==null&&o!==void 0?o:[],{dateFormat:h,locale:m}):Xa(n.props.selected,{dateFormat:h,locale:m});return p.cloneElement(c,(i={},i[d]=function(x){n.input=x},i.value=g,i.onBlur=n.handleBlur,i.onChange=n.handleChange,i.onClick=n.onInputClick,i.onFocus=n.handleFocus,i.onKeyDown=n.onInputKeyDown,i.id=n.props.id,i.name=n.props.name,i.form=n.props.form,i.autoFocus=n.props.autoFocus,i.placeholder=n.props.placeholderText,i.disabled=n.props.disabled,i.autoComplete=n.props.autoComplete,i.className=ht(c.props.className,l),i.title=n.props.title,i.readOnly=n.props.readOnly,i.required=n.props.required,i.tabIndex=n.props.tabIndex,i["aria-describedby"]=n.props.ariaDescribedBy,i["aria-invalid"]=n.props.ariaInvalid,i["aria-labelledby"]=n.props.ariaLabelledBy,i["aria-required"]=n.props.ariaRequired,i))},n.renderClearButton=function(){var a=n.props,i=a.isClearable,o=a.disabled,l=a.selected,c=a.startDate,d=a.endDate,u=a.clearButtonTitle,f=a.clearButtonClassName,h=f===void 0?"":f,m=a.ariaLabelClose,g=m===void 0?"Close":m,x=a.selectedDates;return i&&(l!=null||c!=null||d!=null||x!=null&&x.length)?O.createElement("button",{type:"button",className:ht("react-datepicker__close-icon",h,{"react-datepicker__close-icon--disabled":o}),disabled:o,"aria-label":g,onClick:n.onClearClick,title:u,tabIndex:-1}):null},n.state=n.calcInitialState(),n.preventFocusTimeout=void 0,n}return Object.defineProperty(t,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,readOnly:!1,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Iv,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.componentDidUpdate=function(r,n){var a,i,o,l;r.inline&&R1e(r.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&r.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),r.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:NR(this.props.highlightDates)}),!n.focused&&!Rd(r.selected,this.props.selected)&&this.setState({inputValue:null}),n.open!==this.state.open&&(n.open===!1&&this.state.open===!0&&((i=(a=this.props).onCalendarOpen)===null||i===void 0||i.call(a)),n.open===!0&&this.state.open===!1&&((l=(o=this.props).onCalendarClose)===null||l===void 0||l.call(o)))},t.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},t.prototype.renderInputContainer=function(){var r=this.props,n=r.showIcon,a=r.icon,i=r.calendarIconClassname,o=r.calendarIconClassName,l=r.toggleCalendarOnIconClick,c=this.state.open;return i&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),O.createElement("div",{className:"react-datepicker__input-container".concat(n?" react-datepicker__view-calendar-icon":"")},n&&O.createElement(E1e,mr({icon:a,className:ht(o,!o&&i,c&&"react-datepicker-ignore-onclickoutside")},l?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())}
675,t.prototype.render=function(){var r=this.renderCalendar();if(this.props.inline)return r;if(this.props.withPortal){var n=this.state.open?O.createElement(YK,{enableTabLoop:this.props.enableTabLoop},O.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},r)):null;return this.state.open&&this.props.portalId&&(n=O.createElement(qK,mr({portalId:this.props.portalId},this.props),n)),O.createElement("div",null,this.renderInputContainer(),n)}return O.createElement(I1e,mr({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:r,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},t}(p.Component),$1e="input",rk="navigate";const L1e=kde.omit({userId:!0}).extend({startTime:Ae.coerce.date(),endTime:Ae.coerce.date(),attendees:Ae.array(Ae.string().email()).optional(),reminders:Ae.array(Ae.number()).default([15]),attendeeEmails:Ae.string().optional()});function Mn({isOpen:e,onClose:t}){const{data:r=[]}=eO(),{timeZone:n}=J2(),{mutate:a,isPending:i}=S0e(),o=DG(),{data:l=[]}=ut({queryKey:["/api/integrations"]}),c=l.some(b=>b.type==="zoom"&&b.isConnected),d=new Date,u=Wve(d,30),f=Lu({resolver:_m(L1e),defaultValues:{title:"",description:"",startTime:d,endTime:u,location:"",meetingUrl:"",isAllDay:!1,attendeeEmails:"",timezone:n||"UTC",reminders:[15]}}),[h,m]=p.useState("in-person"),g=async b=>{try{const y=await fetch("/api/integrations/zoom/create-meeting",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:b.title,startTime:b.startTime.toISOString(),endTime:b.endTime.toISOString(),description:b.description})});if(!y.ok)throw new Error("Failed to create Zoom meeting");return(await y.json()).meetingUrl}catch(y){return console.error("Error creating Zoom meeting:",y),""}},x=async b=>{let y=[];b.attendeeEmails&&(y=b.attendeeEmails.split(",").map(w=>w.trim()).filter(w=>w.length>0));let j=b.meetingUrl;if(h==="zoom"&&c){const w=await g(b);w&&(j=w)}a({...b,attendees:y,meetingUrl:j},{onSuccess:()=>{t(),f.reset()}})},v=b=>{const y=f.getValues("startTime");if(y){const j=new Date(y);j.setMinutes(j.getMinutes()+b),f.setValue("endTime",j)}};return s.jsx(Ot,{open:e,onOpenChange:b=>!b&&t(),children:s.jsxs(kt,{className:"w-[95vw] sm:max-w-[800px] max-h-[85vh] overflow-y-auto",children:[s.jsx(Ct,{children:s.jsx(Tt,{children:"Create New Event"})}),s.jsx(RG,{...f,children:s.jsxs("form",{onSubmit:f.handleSubmit(x),className:"space-y-4",children:[s.jsx(Et,{control:f.control,name:"title",render:({field:b})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Event Title"}),s.jsx(wr,{children:s.jsx(ie,{placeholder:"Add title",value:b.value||"",onChange:b.onChange,onBlur:b.onBlur,ref:b.ref})}),s.jsx(Mr,{})]})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(Et,{control:f.control,name:"startTime",render:({field:b})=>s.jsxs(wt,{className:"flex flex-col",children:[s.jsx(gt,{children:"Start Date & Time"}),s.jsx(wr,{children:s.jsx(ru,{selected:b.value,onChange:y=>y&&b.onChange(y),showTimeSelect:!0,dateFormat:"MMMM d, yyyy h:mm aa",wrapperClassName:"w-full",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:ring-offset-background"})}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:f.control,name:"endTime",render:({field:b})=>s.jsxs(wt,{className:"flex flex-col",children:[s.jsx(gt,{children:"End Date & Time"}),s.jsx(wr,{children:s.jsx(ru,{selected:b.value,onChange:y=>y&&b.onChange(y),showTimeSelect:!0,dateFormat:"MMMM d, yyyy h:mm aa",wrapperClassName:"w-full",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:ring-offset-background"})}),s.jsx(Mr,{})]})}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx(gt,{children:"Duration"}),s.jsxs(Xe,{onValueChange:b=>v(parseInt(b)),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select duration"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"15",children:"15 minutes"}),s.jsx(Z,{value:"30",children:"30 minutes"}),s.jsx(Z,{value:"45",children:"45 minutes"}),s.jsx(Z,{value:"60",children:"1 hour"}),s.jsx(Z,{value:"90",children:"1.5 hours"}),s.jsx(Z,{value:"120",children:"2 hours"})]})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(gt,{children:"Meeting Type"}),s.jsxs(Xe,{value:h,onValueChange:m,children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select meeting type"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"in-person",children:"In-Person"}),s.jsx(Z,{value:"manual",children:"Custom URL (Manual)"}),c&&s.jsx(Z,{value:"zoom",children:"Zoom Meeting"})]})]}),h==="zoom"&&!c&&s.jsx("p",{className:"text-red-500 text-sm mt-1",children:"Zoom integration not available. Please connect Zoom in Integrations."})]}),h==="in-person"&&s.jsx(Et,{control:f.control,name:"location",render:({field:b})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Location"}),s.jsx(wr,{children:s.jsx(ie,{placeholder:"Add location",value:b.value||"",onChange:b.onChange,onBlur:b.onBlur,ref:b.ref})}),s.jsx(Mr,{})]})})]}),h==="manual"&&s.jsx("div",{className:"grid grid-cols-1",children:s.jsx(Et,{control:f.control,name:"meetingUrl",render:({field:b})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Meeting URL"}),s.jsx(wr,{children:s.jsx(ie,{placeholder:"Add meeting link",value:b.value||"",onChange:b.onChange,onBlur:b.onBlur,ref:b.ref})}),s.jsx(Mr,{})]})})}),h==="zoom"&&c&&s.jsx("div",{className:"text-sm text-neutral-600 bg-neutral-50 p-3 rounded-md border border-neutral-200",children:s.jsx("p",{children:"A Zoom meeting will be automatically created when you save this event."})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Et,{control:f.control,name:"attendeeEmails",render:({field:b})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Guests"}),s.jsx(wr,{children:s.jsx(ie,{placeholder:"Add guests (comma-separated email addresses)",value:b.value||"",onChange:b.onChange,onBlur:b.onBlur,ref:b.ref})}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:f.control,name:"timezone",render:({field:b})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Time Zone"}),s.jsxs(Xe,{value:b.value||"UTC",onValueChange:b.onChange,children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select time zone"})}),s.jsx(Ze,{children:r.map(y=>s.jsx(Z,{value:y.id,children:y.name},y.id))})]}),s.jsx(Mr,{})]})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Et,{control:f.control,name:"description",render:({field:b})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Description"}),s.jsx(wr,{children:s.jsx(Es,{placeholder:"Add description or agenda (optional)",rows:3,value:b.value||"",onChange:b.onChange,onBlur:b.onBlur,ref:b.ref})}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:f.control,name:"reminders",render:({field:b})=>s.jsxs(wt,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Gn,{id:"reminders",checked:b.value.length>0,onCheckedChange:y=>
675{y?b.onChange([15]):b.onChange([])}}),s.jsx(gt,{htmlFor:"reminders",children:"Add reminders"})]}),b.value.length>0&&s.jsxs(Xe,{value:b.value[0].toString(),onValueChange:y=>b.onChange([parseInt(y)]),children:[s.jsx(Qe,{children:s.jsx(Je,{})}),s.jsx(Ze,{children:o.map(y=>s.jsx(Z,{value:y.value.toString(),children:y.label},y.value))})]}),s.jsx(Mr,{})]})})]}),s.jsxs(Bt,{className:"flex justify-end space-x-3 pt-4 border-t border-neutral-200",children:[s.jsx(D,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),s.jsx(D,{type:"submit",disabled:i,children:i?"Creating...":"Create Event"})]})]})})]})})}var uO="Tabs",[F1e,AZe]=Is(uO,[dd]),GK=dd(),[B1e,fO]=F1e(uO),KK=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:a,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...d}=e,u=cd(l),[f,h]=xs({prop:n,onChange:a,defaultProp:i});return s.jsx(B1e,{scope:r,baseId:La(),value:f,onValueChange:h,orientation:o,dir:u,activationMode:c,children:s.jsx(Ke.div,{dir:u,"data-orientation":o,...d,ref:t})})});KK.displayName=uO;var QK="TabsList",ZK=p.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...a}=e,i=fO(QK,r),o=GK(r);return s.jsx(cN,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:s.jsx(Ke.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});ZK.displayName=QK;var XK="TabsTrigger",JK=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:a=!1,...i}=e,o=fO(XK,r),l=GK(r),c=rQ(o.baseId,n),d=nQ(o.baseId,n),u=n===o.value;return s.jsx(dN,{asChild:!0,...l,focusable:!a,active:u,children:s.jsx(Ke.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":d,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...i,ref:t,onMouseDown:$e(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:$e(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:$e(e.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!a&&f&&o.onValueChange(n)})})})});JK.displayName=XK;var eQ="TabsContent",tQ=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:a,children:i,...o}=e,l=fO(eQ,r),c=rQ(l.baseId,n),d=nQ(l.baseId,n),u=n===l.value,f=p.useRef(u);return p.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),s.jsx(Jn,{present:a||u,children:({present:h})=>s.jsx(Ke.div,{"data-state":u?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:d,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&i})})});tQ.displayName=eQ;function rQ(e,t){return`${e}-trigger-${t}`}function nQ(e,t){return`${e}-content-${t}`}var U1e=KK,sQ=ZK,aQ=JK,iQ=tQ;const Br=U1e,Hr=p.forwardRef(({className:e,...t},r)=>s.jsx(sQ,{ref:r,className:Oe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Hr.displayName=sQ.displayName;const We=p.forwardRef(({className:e,...t},r)=>s.jsx(aQ,{ref:r,className:Oe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));We.displayName=aQ.displayName;const Ve=p.forwardRef(({className:e,...t},r)=>s.jsx(iQ,{ref:r,className:Oe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ve.displayName=iQ.displayName;function z1e(){const{user:e}=gn(),{toast:t}=Qt(),[r,n]=p.useState(!1),[a,i]=p.useState(""),[o,l]=p.useState([]),[c,d]=p.useState("event-types"),[u,f]=p.useState(!0),[h,m]=p.useState(!0),[g,x]=p.useState("all"),{data:v=[],isLoading:b}=ut({queryKey:["/api/booking"],enabled:!!e}),y=dt({mutationFn:async C=>{await Ue("DELETE",`/api/booking/${C}`)},onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/booking"]}),t({title:"Success",description:"Booking link deleted successfully"})},onError:C=>{t({title:"Error",description:C.message||"Failed to delete booking link",variant:"destructive"})}}),j=async C=>{try{const E=window.location.protocol,P=window.location.hostname,_=window.location.port?`:${window.location.port}`:"";try{const I=await fetch("/api/users/current");
675if(I.ok){const F=await I.json();let H="";if(F.firstName&&F.lastName)H=`${F.firstName.toLowerCase()}.${F.lastName.toLowerCase()}`;else if(F.displayName&&F.displayName.includes(" ")){const z=F.displayName.split(" ");z.length>=2&&(H=`${z[0].toLowerCase()}.${z[z.length-1].toLowerCase()}`)}H||(H=F.username.toLowerCase());const W=`${E}//${P}${_}/${H}/booking/${C}`;await navigator.clipboard.writeText(W)}else{const F=`${E}//${P}${_}/booking/${C}`;await navigator.clipboard.writeText(F)}}catch{const F=`${E}//${P}${_}/booking/${C}`;await navigator.clipboard.writeText(F)}t({title:"Link Copied",description:"Booking link copied to clipboard"})}catch(E){console.error("Error copying booking link:",E),t({title:"Error",description:"Could not copy booking link",variant:"destructive"})}},w=v.filter(C=>{const E=C.title.toLowerCase().includes(a.toLowerCase()),P=u,_=g==="all"||C.meetingType===g;return E&&P&&_}),N=(C,E)=>{l(P=>E?[...P,C]:P.filter(_=>_!==C))},S=()=>{n(!0)},k=C=>{window.location.href=`/booking?edit=${C.id}`},T=C=>{confirm("Are you sure you want to delete this booking link?")&&y.mutate(C)};return e?s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-50 dark:bg-slate-900",children:[s.jsx(tr,{onCreateEvent:S}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:S}),s.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-white dark:bg-slate-800",children:[s.jsx("div",{className:"border-b border-neutral-200 dark:border-slate-700 px-4 md:px-8 py-5",children:s.jsx("div",{className:"max-w-6xl",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 mb-1",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl md:text-2xl font-semibold text-neutral-900 dark:text-slate-100",children:"Scheduling"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400 mt-1",children:"Create and manage booking links to let others schedule time with you."})]}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto",children:[v.length>0&&s.jsxs(D,{variant:"outline",size:"sm",className:"text-sm",onClick:async()=>{try{if(!v||v.length===0)return;const C=await fetch("/api/users/current");if(C.ok){const E=await C.json();let P="";if(E.firstName&&E.lastName)P=`${E.firstName.toLowerCase()}.${E.lastName.toLowerCase()}`;else if(E.displayName&&E.displayName.includes(" ")){const W=E.displayName.split(" ");W.length>=2&&(P=`${W[0].toLowerCase()}.${W[W.length-1].toLowerCase()}`)}P||(P=E.username.toLowerCase());const _=window.location.protocol,I=window.location.hostname,F=window.location.port?`:${window.location.port}`:"",H=`${_}//${I}${F}/${P}/booking`;window.open(H,"_blank")}}catch(C){console.error("Error opening landing page:",C),t({title:"Error",description:"Could not open landing page",variant:"destructive"})}},children:[s.jsx(Zr,{className:"h-4 w-4 mr-1.5"}),"View landing page"]}),s.jsxs(D,{onClick:()=>window.location.href="/booking?create=true",className:"bg-primary text-white hover:bg-primary/90 flex-1 sm:flex-none",children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),s.jsx("span",{className:"hidden sm:inline",children:"New Event Type"}),s.jsx("span",{className:"sm:hidden",children:"Create"})]})]})]})})}),s.jsx("div",{className:"border-b border-neutral-200 dark:border-slate-700 px-4 md:px-8",children:s.jsx("div",{className:"max-w-6xl",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 pt-2",children:[s.jsx(Br,{value:c,onValueChange:d,className:"w-auto",children:s.jsxs(Hr,{className:"bg-transparent rounded-none p-0 h-auto",children:[s.jsx(We,{value:"event-types",className:"rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent px-3 md:px-4 py-3 text-sm whitespace-nowrap",children:"Event types"}),s.jsxs(We,{value:"single-use",className:"rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent px-3 md:px-4 py-3 text-sm opacity-50 cursor-not-allowed whitespace-nowrap",disabled:!0,children:["Single-use",s.jsx("span",{className:"ml-1.5 text-xs bg-neutral-200 dark:bg-slate-600 px-1.5 py-0.5 rounded hidden sm:inline",children:"Soon"})]}),s.jsxs(We,{value:"polls",className:"rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent px-3 md:px-4 py-3 text-sm opacity-50 cursor-not-allowed whitespace-nowrap",disabled:!0,children:["Polls",s.jsx("span",{className:"ml-1.5 text-xs bg-neutral-200 dark:bg-slate-600 px-1.5 py-0.5 rounded hidden sm:inline",children:"Soon"})]})]})}),s.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto pb-2 sm:pb-0",children:[s.jsxs("div",{className:"relative flex-1 sm:w-64",children:[s.jsx(jo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-neutral-400"}),s.jsx(ie,{placeholder:"Search event types...",value:a,onChange:C=>i(C.target.value),className:"pl-9 h-9"})]}),s.jsxs(k2,{children:[s.jsx(C2,{asChild:!0,children:s.jsxs(D,{variant:"outline",size:"sm",className:"h-9",children:[s.jsx(DE,{className:"h-4 w-4 mr-2"}),"Filter"]})}),s.jsxs(hN,{align:"end",className:"w-56",children:[s.jsx(Q0,{children:"Filter by Status"}),s.jsx(ST,{checked:u,onCheckedChange:f,children:"Active"}),s.jsx(ST,{checked:h,onCheckedChange:m,children:"Inactive"}),s.jsx(jf,{}),s.jsx(Q0,{children:"Filter by Type"}),s.jsx(Vs,{onClick:()=>x("all"),children:"All Types"}),s.jsx(Vs,{onClick:()=>x("zoom"),children:"Zoom Meetings"}),s.jsx(Vs,{onClick:()=>x("custom"),children:"Custom URL"}),s.jsx(Vs,{onClick:()=>x("in-person"),children:"In-Person"})]})]})]})]})})}),s.jsx("div",{className:"flex-1 overflow-y-auto px-4 md:px-8 py-6 pb-20 md:pb-6",children:s.jsx("div",{className:"max-w-6xl",children:s.jsxs(Br,{value:c,className:"w-full",children:[s.jsx(Ve,{value:"event-types",className:"mt-0",children:b?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-neutral-500 dark:text-slate-400",children:"Loading booking links..."})}):w.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[s.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mb-4",children:s.jsx(Sr,{className:"h-8 w-8 text-primary"})}),s.jsx("h3",{className:"text-lg font-semibold text-neutral-900 dark:text-slate-100 mb-2",children:a?"No matches found":"Create your first event type"}),s.jsx("p",{className:"text-neutral-500 dark:text-slate-400 mb-4 max-w-md",children:a?"No booking links match your search. Try adjusting your filters or search term.":"Event types are booking links that let others schedule time with you. Configure your availability, meeting duration, and location preferences."}),!a&&s.jsxs(s.Fragment,{children:[s.jsxs(D,{onClick:()=>window.location.href="/booking?create=true",size:"lg",className:"mb-3",children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Create Your First Event Type"]}),s.jsx("p",{className:"text-xs text-neutral-400 dark:text-slate-500",children:"Set up a 30-minute meeting in just a few clicks"})]})]}):s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:w.map((C,E)=>s.jsx(ive,{link:C,onEdit:k,onDelete:T,onCopyLink:j,selected:o.includes(C.id),onSelect:P=>N(C.id,P),colorIndex:E},C.id))})}),s.jsx(Ve,{value:"single-use",className:"mt-0",children:s.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[s.jsx("div",{className:"w-16 h-16 rounded-full bg-neutral-100 dar
675k:bg-slate-700 flex items-center justify-center mb-4",children:s.jsx(Sr,{className:"h-8 w-8 text-neutral-400 dark:text-slate-500"})}),s.jsx("h3",{className:"text-lg font-semibold text-neutral-900 dark:text-slate-100 mb-2",children:"Single-use links"}),s.jsx("p",{className:"text-neutral-500 dark:text-slate-400",children:"This feature is coming soon!"})]})}),s.jsx(Ve,{value:"polls",className:"mt-0",children:s.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[s.jsx("div",{className:"w-16 h-16 rounded-full bg-neutral-100 dark:bg-slate-700 flex items-center justify-center mb-4",children:s.jsx(Sr,{className:"h-8 w-8 text-neutral-400 dark:text-slate-500"})}),s.jsx("h3",{className:"text-lg font-semibold text-neutral-900 dark:text-slate-100 mb-2",children:"Meeting polls"}),s.jsx("p",{className:"text-neutral-500 dark:text-slate-400",children:"This feature is coming soon!"})]})})]})})})]})]}),s.jsx(Ds,{onCreateEventClick:S}),s.jsx(Mn,{isOpen:r,onClose:()=>n(!1)}),s.jsx(gve,{}),s.jsx(hi,{})]}):s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(tr,{onCreateEvent:S}),s.jsx(eve,{}),s.jsx(hi,{})]})}function W1e({event:e,onClose:t,onEdit:r,isOpen:n=!1}){var x,v;k0e((e==null?void 0:e.id)||0);const{mutate:a,isPending:i}=C0e(),[o,l]=p.useState(!1),[c,d]=p.useState(null);if(!e)return null;const u=()=>{o?a(e.id,{onSuccess:()=>{d(null),t(),l(!1)},onError:b=>{d("Failed to delete event. Please try again."),l(!1)}}):l(!0)},f=()=>{r&&(r(e),t())},h=((x=e.meetingUrl)==null?void 0:x.includes("zoom.us"))||((v=e.location)==null?void 0:v.toLowerCase().includes("zoom"))||e.calendarType==="zoom",m=e.description,g=!!(e.location||e.meetingUrl);return s.jsx(Ot,{open:n,onOpenChange:b=>!b&&t(),children:s.jsxs(kt,{className:"max-w-md",children:[s.jsx(Ct,{className:"border-b pb-2",children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx(Tt,{className:"text-xl font-semibold",children:e.title}),e.calendarType&&s.jsx(pe,{variant:"outline",className:"ml-2",children:e.calendarType.charAt(0).toUpperCase()+e.calendarType.slice(1)})]})}),s.jsxs("div",{className:"py-4 space-y-6",children:[s.jsx(X,{className:"overflow-hidden border-0 shadow-sm",children:s.jsx("div",{className:"bg-gradient-to-r from-primary/80 to-primary text-white p-4",children:s.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-2",children:[s.jsx(Gt,{className:"h-5 w-5"}),s.jsx("div",{className:"font-medium",children:sf(e.startTime,e.timezone??void 0,"PPPP")}),s.jsx(dr,{className:"h-5 w-5"}),s.jsx("div",{children:Lb(e.startTime,e.endTime,e.timezone??void 0,{sameDayTimeOnly:!0,timeFormat:"h:mm a"})}),s.jsx(Yc,{className:"h-5 w-5"}),s.jsx("div",{children:e.timezone||"UTC"})]})})}),m?s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-neutral-500 uppercase tracking-wider mb-2",children:"Description"}),s.jsx("p",{className:"text-neutral-700 text-sm",children:m})]}):null,g&&s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-neutral-500 uppercase tracking-wider mb-2",children:h?"Zoom Meeting":"Location"}),h?s.jsx(X,{className:"border border-blue-100 bg-blue-50",children:s.jsx(te,{className:"p-3",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(ma,{className:"h-5 w-5 text-blue-500"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"font-medium text-neutral-800",children:"Zoom Meeting"}),e.location&&e.location!==e.meetingUrl&&s.jsx("p",{className:"text-sm text-neutral-600 mt-1",children:e.location}),e.meetingUrl&&s.jsx("div",{className:"mt-2",children:s.jsxs("a",{href:e.meetingUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm px-3 py-1.5 bg-blue-600 text-white rounded-md inline-flex items-center hover:bg-blue-700 transition-colors",children:[s.jsx(Zr,{className:"h-4 w-4 mr-1.5"}),"Join Meeting"]})})]})]})})}):s.jsxs("div",{className:"flex items-center text-neutral-700",children:[e.meetingUrl?s.jsx(ma,{className:"h-5 w-5 text-neutral-500 mr-2"}):s.jsx(Oo,{className:"h-5 w-5 text-neutral-500 mr-2"}),e.meetingUrl?s.jsx("a",{href:e.meetingUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:e.location||e.meetingUrl}):s.jsx("span",{children:e.location})]})]}),Array.isArray(e.attendees)&&e.attendees.length>0&&s.jsxs("div",{children:[s.jsxs("h3",{className:"text-sm font-semibold text-neutral-500 uppercase tracking-wider mb-2",children:["Attendees (",e.attendees.length,")"]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:e.attendees.map((b,y)=>s.jsxs("div",{className:"flex items-center bg-neutral-100 rounded-full pl-1 pr-3 py-1",children:[s.jsx("div",{className:"w-6 h-6 rounded-full bg-primary text-white flex items-center justify-center text-xs font-medium mr-1",children:typeof b=="string"?b.charAt(0).toUpperCase():"G"}),s.jsx("span",{className:"text-sm",children:b})]},y))})]}),Array.isArray(e.reminders)&&e.reminders.length>0&&s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-semibold text-neutral-500 uppercase tracking-wider mb-2",children:"Reminders"}),s.jsxs("div",{className:"flex items-center text-neutral-700",children:[s.jsx(AE,{className:"h-5 w-5 text-neutral-500 mr-2"}),s.jsx("span",{children:T0e(e.reminders)})]})]})]}),s.jsx(Oi,{className:"my-2"}),s.jsxs("div",{className:"flex space-x-2 py-2",children:[s.jsxs(D,{variant:"outline",className:"flex-1",onClick:f,children:[s.jsx(FE,{className:"h-4 w-4 mr-1.5"}),"Edit"]}),s.jsxs(D,{variant:"outline",className:"flex-1",onClick:f,children:[s.jsx(RE,{className:"h-4 w-4 mr-1.5"}),"Reschedule"]}),s.jsx(D,{variant:o?"destructive":"outline",onClick:u,disabled:i,className:"w-10 p-0 flex items-center justify-center",children:o?s.jsx(un,{className:"h-4 w-4 mr-1"}):s.jsx(Pr,{className:"h-4 w-4 mr-1"})})]}),c&&s.jsx("div",{className:"mt-2 text-sm text-red-600",children:c})]})})}const V1e=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Kp=Array.from({length:24},(e,t)=>t);function Nf(e,t=0){const r=e>=12?"PM":"AM";return`${e%12||12}:${t.toString().padStart(2,"0")} ${r}`}function H1e(e=new Date){const t=Ms(e,{weekStartsOn:0}),r=Dv(e,{weekStartsOn:0});return{start:t,end:r}}function q1e(e,t){return e.getMonth()===t.getMonth()?`${pt(e,"MMMM d")} - ${pt(t,"d, yyyy")}`:`${pt(e,"MMMM d")} - ${pt(t,"MMMM d, yyyy")}`}var Mt=function(){return Mt=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Mt.apply(this,arguments)};function Y1e(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function oQ(e,t,r){for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function $v(e){return e.mode==="multiple"}function Lv(e){return e.mode==="range"}function _N(e){return e.mode==="single"}var G1e={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
675p-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 K1e(e,t){return pt(e,"LLLL y",t)}function Q1e(e,t){return pt(e,"d",t)}function Z1e(e,t){return pt(e,"LLLL",t)}function X1e(e){return"".concat(e)}function J1e(e,t){return pt(e,"cccccc",t)}function eSe(e,t){return pt(e,"yyyy",t)}var tSe=Object.freeze({__proto__:null,formatCaption:K1e,formatDay:Q1e,formatMonthCaption:Z1e,formatWeekNumber:X1e,formatWeekdayName:J1e,formatYearCaption:eSe}),rSe=function(e,t,r){return pt(e,"do MMMM (EEEE)",r)},nSe=function(){return"Month: "},sSe=function(){return"Go to next month"},aSe=function(){return"Go to previous month"},iSe=function(e,t){return pt(e,"cccc",t)},oSe=function(e){return"Week n. ".concat(e)},lSe=function(){return"Year: "},cSe=Object.freeze({__proto__:null,labelDay:rSe,labelMonthDropdown:nSe,labelNext:sSe,labelPrevious:aSe,labelWeekNumber:oSe,labelWeekday:iSe,labelYearDropdown:lSe});function dSe(){var e="buttons",t=G1e,r=H2,n={},a={},i=1,o={},l=new Date;return{captionLayout:e,classNames:t,formatters:tSe,labels:cSe,locale:r,modifiersClassNames:n,modifiers:a,numberOfMonths:i,styles:o,today:l,mode:"default"}}function uSe(e){var t=e.fromYear,r=e.toYear,n=e.fromMonth,a=e.toMonth,i=e.fromDate,o=e.toDate;return n?i=Ps(n):t&&(i=new Date(t,0,1)),a?o=Av(a):r&&(o=new Date(r,11,31)),{fromDate:i?Hs(i):void 0,toDate:o?Hs(o):void 0}}var lQ=p.createContext(void 0);function fSe(e){var t,r=e.initialProps,n=dSe(),a=uSe(r),i=a.fromDate,o=a.toDate,l=(t=r.captionLayout)!==null&&t!==void 0?t:n.captionLayout;l!=="buttons"&&(!i||!o)&&(l="buttons");var c;(_N(r)||$v(r)||Lv(r))&&(c=r.onSelect);var d=Mt(Mt(Mt({},n),r),{captionLayout:l,classNames:Mt(Mt({},n.classNames),r.classNames),components:Mt({},r.components),formatters:Mt(Mt({},n.formatters),r.formatters),fromDate:i,labels:Mt(Mt({},n.labels),r.labels),mode:r.mode||n.mode,modifiers:Mt(Mt({},n.modifiers),r.modifiers),modifiersClassNames:Mt(Mt({},n.modifiersClassNames),r.modifiersClassNames),onSelect:c,styles:Mt(Mt({},n.styles),r.styles),toDate:o});return s.jsx(lQ.Provider,{value:d,children:e.children})}function qr(){var e=p.useContext(lQ);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function cQ(e){var t=qr(),r=t.locale,n=t.classNames,a=t.styles,i=t.formatters.formatCaption;return s.jsx("div",{className:n.caption_label,style:a.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:i(e.displayMonth,{locale:r})})}function hSe(e){return s.jsx("svg",Mt({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:s.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 dQ(e){var t,r,n=e.onChange,a=e.value,i=e.children,o=e.caption,l=e.className,c=e.style,d=qr(),u=(r=(t=d.components)===null||t===void 0?void 0:t.IconDropdown)!==null&&r!==void 0?r:hSe;return s.jsxs("div",{className:l,style:c,children:[s.jsx("span",{className:d.classNames.vhidden,children:e["aria-label"]}),s.jsx("select",{name:e.name,"aria-label":e["aria-label"],className:d.classNames.dropdown,style:d.styles.dropdown,value:a,onChange:n,children:i}),s.jsxs("div",{className:d.classNames.caption_label,style:d.styles.caption_label,"aria-hidden":"true",children:[o,s.jsx(u,{className:d.classNames.dropdown_icon,style:d.styles.dropdown_icon})]})]})}function mSe(e){var t,r=qr(),n=r.fromDate,a=r.toDate,i=r.styles,o=r.locale,l=r.formatters.formatMonthCaption,c=r.classNames,d=r.components,u=r.labels.labelMonthDropdown;if(!n)return s.jsx(s.Fragment,{});if(!a)return s.jsx(s.Fragment,{});var f=[];if(Wbe(n,a))for(var h=Ps(n),m=n.getMonth();m<=a.getMonth();m++)f.push(HS(h,m));else for(var h=Ps(new Date),m=0;m<=11;m++)f.push(HS(h,m));var g=function(v){var b=Number(v.target.value),y=HS(Ps(e.displayMonth),b);e.onChange(y)},x=(t=d==null?void 0:d.Dropdown)!==null&&t!==void 0?t:dQ;return s.jsx(x,{name:"months","aria-label":u(),className:c.dropdown_month,style:i.dropdown_month,onChange:g,value:e.displayMonth.getMonth(),c
675aption:l(e.displayMonth,{locale:o}),children:f.map(function(v){return s.jsx("option",{value:v.getMonth(),children:l(v,{locale:o})},v.getMonth())})})}function pSe(e){var t,r=e.displayMonth,n=qr(),a=n.fromDate,i=n.toDate,o=n.locale,l=n.styles,c=n.classNames,d=n.components,u=n.formatters.formatYearCaption,f=n.labels.labelYearDropdown,h=[];if(!a)return s.jsx(s.Fragment,{});if(!i)return s.jsx(s.Fragment,{});for(var m=a.getFullYear(),g=i.getFullYear(),x=m;x<=g;x++)h.push(W4(vG(new Date),x));var v=function(y){var j=W4(Ps(r),Number(y.target.value));e.onChange(j)},b=(t=d==null?void 0:d.Dropdown)!==null&&t!==void 0?t:dQ;return s.jsx(b,{name:"years","aria-label":f(),className:c.dropdown_year,style:l.dropdown_year,onChange:v,value:r.getFullYear(),caption:u(r,{locale:o}),children:h.map(function(y){return s.jsx("option",{value:y.getFullYear(),children:u(y,{locale:o})},y.getFullYear())})})}function gSe(e,t){var r=p.useState(e),n=r[0],a=r[1],i=t===void 0?n:t;return[i,a]}function xSe(e){var t=e.month,r=e.defaultMonth,n=e.today,a=t||r||n||new Date,i=e.toDate,o=e.fromDate,l=e.numberOfMonths,c=l===void 0?1:l;if(i&&ux(i,a)<0){var d=-1*(c-1);a=Wa(i,d)}return o&&ux(a,o)<0&&(a=o),Ps(a)}function vSe(){var e=qr(),t=xSe(e),r=gSe(t,e.month),n=r[0],a=r[1],i=function(o){var l;if(!e.disableNavigation){var c=Ps(o);a(c),(l=e.onMonthChange)===null||l===void 0||l.call(e,c)}};return[n,i]}function ySe(e,t){for(var r=t.reverseMonths,n=t.numberOfMonths,a=Ps(e),i=Ps(Wa(a,n)),o=ux(i,a),l=[],c=0;c<o;c++){var d=Wa(a,c);l.push(d)}return r&&(l=l.reverse()),l}function bSe(e,t){if(!t.disableNavigation){var r=t.toDate,n=t.pagedNavigation,a=t.numberOfMonths,i=a===void 0?1:a,o=n?i:1,l=Ps(e);if(!r)return Wa(l,o);var c=ux(r,e);if(!(c<i))return Wa(l,o)}}function jSe(e,t){if(!t.disableNavigation){var r=t.fromDate,n=t.pagedNavigation,a=t.numberOfMonths,i=a===void 0?1:a,o=n?i:1,l=Ps(e);if(!r)return Wa(l,-o);var c=ux(l,r);if(!(c<=0))return Wa(l,-o)}}var uQ=p.createContext(void 0);function wSe(e){var t=qr(),r=vSe(),n=r[0],a=r[1],i=ySe(n,t),o=bSe(n,t),l=jSe(n,t),c=function(f){return i.some(function(h){return vN(f,h)})},d=function(f,h){c(f)||(h&&wu(f,h)?a(Wa(f,1+t.numberOfMonths*-1)):a(f))},u={currentMonth:n,displayMonths:i,goToMonth:a,goToDate:d,previousMonth:l,nextMonth:o,isDateDisplayed:c};return s.jsx(uQ.Provider,{value:u,children:e.children})}function Fv(){var e=p.useContext(uQ);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function OR(e){var t,r=qr(),n=r.classNames,a=r.styles,i=r.components,o=Fv().goToMonth,l=function(u){o(Wa(u,e.displayIndex?-e.dis
675playIndex:0))},c=(t=i==null?void 0:i.CaptionLabel)!==null&&t!==void 0?t:cQ,d=s.jsx(c,{id:e.id,displayMonth:e.displayMonth});return s.jsxs("div",{className:n.caption_dropdowns,style:a.caption_dropdowns,children:[s.jsx("div",{className:n.vhidden,children:d}),s.jsx(mSe,{onChange:l,displayMonth:e.displayMonth}),s.jsx(pSe,{onChange:l,displayMonth:e.displayMonth})]})}function NSe(e){return s.jsx("svg",Mt({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:s.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 SSe(e){return s.jsx("svg",Mt({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:s.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 xj=p.forwardRef(function(e,t){var r=qr(),n=r.classNames,a=r.styles,i=[n.button_reset,n.button];e.className&&i.push(e.className);var o=i.join(" "),l=Mt(Mt({},a.button_reset),a.button);return e.style&&Object.assign(l,e.style),s.jsx("button",Mt({},e,{ref:t,type:"button",className:o,style:l}))});function kSe(e){var t,r,n=qr(),a=n.dir,i=n.locale,o=n.classNames,l=n.styles,c=n.labels,d=c.labelPrevious,u=c.labelNext,f=n.components;if(!e.nextMonth&&!e.previousMonth)return s.jsx(s.Fragment,{});var h=d(e.previousMonth,{locale:i}),m=[o.nav_button,o.nav_button_previous].join(" "),g=u(e.nextMonth,{locale:i}),x=[o.nav_button,o.nav_button_next].join(" "),v=(t=f==null?void 0:f.IconRight)!==null&&t!==void 0?t:SSe,b=(r=f==null?void 0:f.IconLeft)!==null&&r!==void 0?r:NSe;return s.jsxs("div",{className:o.nav,style:l.nav,children:[!e.hidePrevious&&s.jsx(xj,{name:"previous-month","aria-label":h,className:m,style:l.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:a==="rtl"?s.jsx(v,{className:o.nav_icon,style:l.nav_icon}):s.jsx(b,{className:o.nav_icon,style:l.nav_icon})}),!e.hideNext&&s.jsx(xj,{name:"next-month","aria-label":g,className:x,style:l.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:a==="rtl"?s.jsx(b,{className:o.nav_icon,style:l.nav_icon}):s.jsx(v,{className:o.nav_icon,style:l.nav_icon})})]})}function AR(e){var t=qr().numberOfMonths,r=Fv(),n=r.previousMonth,a=r.nextMonth,i=r.goToMonth,o=r.displayMonths,l=o.findIndex(function(g){return vN(e.displayMonth,g)}),c=l===0,d=l===o.length-1,u=t>1&&(c||!d),f=t>1&&(d||!c),h=function(){n&&i(n)},m=function(){a&&i(a)};return s.jsx(kSe,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:f,nextMonth:a,previousMonth:n,onPreviousClick:h,onNextClick:m})}function CSe(e){var t,r=qr(),n=r.classNames,a=r.disableNavigation,i=r.styles,o=r.captionLayout,l=r.components,c=(t=l==null?void 0:l.CaptionLabel)!==null&&t!==void 0?t:cQ,d;return a?d=s.jsx(c,{id:e.id,displayMonth:e.displayMonth}):o==="dropdown"?d=s.jsx(OR,{displayMonth:e.displayMonth,id:e.id}):o==="dropdown-buttons"?d=s.jsxs(s.Fragment,{children:[s.jsx(OR,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),s.jsx(AR,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):d=s.jsxs(s.Fragment,{children:[s.jsx(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(AR,{displayMonth:e.displayMonth,id:e.id})]}),s.jsx("div",{className:n.caption,style:i.caption,children:d})}function TSe(e){var t=qr(),r=t.footer,n=t.styles,a=t.classNames.tfoot;return r?s.jsx("tfoot",{className:a,style:n.tfoot,children:s.jsx("tr",{children:s.jsx("td",{colSpan:8,children:r})})}):s.jsx(s.Fragment,{})}function _Se(e,t,r){for(var n=r?$l(new Date):Ms(new Date,{locale:e,weekStartsOn:t}),a=[],i=0;i<7;i++){var o=bn(n,i);a.push(o)}return a}function PSe(){var e=qr(),t=e.classNames,r=e.styles,n=e.showWeekNumber,a=e.locale,i=e.weekStartsOn,o=e.ISOWeek,l=e.formatters.formatWeekdayName,c=e.labels.labelWeekday,d=_Se(a,i,o);return s.jsxs("tr",{style:r.head_row,className:t.head_row,children:[n&&s.jsx("td",{style:r.head_cell,className:t.head_cell}),d.map(function(u,f){return s.jsx("th",{scope:"col",className:t.head_cell,style:r.head_cell,"aria-label":c(u,{locale:a}),children:l(u,{locale:a})},f)})]})}function ESe(){var e,t=qr(),r=t.classNames,n=t.styles,a=t.components,i=(e=a==null?void 0:a.HeadRow)!==null&&e!==void 0?e:PSe;return s.jsx("thead",{style:n.head,className:r.head,children:s.jsx(i,{})})}function OSe(e){var t=qr(),r=t.locale,n=t.formatters.formatDay;return s.jsx(s.Fragment,{children:n(e.date,{locale:r})})}var hO=p.createContext(void 0);function ASe(e){if(!$v(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return s.jsx(hO.Provider,{value:t,children:e.children})}return s.jsx(DSe,{initialProps:e.initialProps,children:e.children})}function DSe(e){var t=e.initialProps,r=e.children,n=t.selected,a=t.min,i=t.max,o=function(d,u,f){var h,m;(h=t.onDayClick)===null||h===void 0||h.call(t,d,u,f);var g=!!(u.selected&&a&&(n==null?void 0:n.length)===a);if(!g){var x=!!(!u.selected&&i&&(n==null?void 0:n.length)===i);if(!x){var v=n?oQ([],n):[];if(u.selected){var b=v.findIndex(function(y){return Zn(d,y)});v.splice(b,1)}else v.push(d);(m=t.onSelect)===null||m===void 0||m.call(t,v,d,u,f)}}},l={disabled:[]};n&&l.disabled.push(function(d){var u=i&&n.length>i-1,f=n.some(function(h){return Zn(h,d)});return!!(u&&!f)});
675var c={selected:n,onDayClick:o,modifiers:l};return s.jsx(hO.Provider,{value:c,children:r})}function mO(){var e=p.useContext(hO);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function MSe(e,t){var r=t||{},n=r.from,a=r.to;return n&&a?Zn(a,e)&&Zn(n,e)?void 0:Zn(a,e)?{from:a,to:void 0}:Zn(n,e)?void 0:Bc(n,e)?{from:e,to:a}:{from:n,to:e}:a?Bc(e,a)?{from:a,to:e}:{from:e,to:a}:n?wu(e,n)?{from:e,to:n}:{from:n,to:e}:{from:e,to:void 0}}var pO=p.createContext(void 0);function ISe(e){if(!Lv(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return s.jsx(pO.Provider,{value:t,children:e.children})}return s.jsx(RSe,{initialProps:e.initialProps,children:e.children})}function RSe(e){var t=e.initialProps,r=e.children,n=t.selected,a=n||{},i=a.from,o=a.to,l=t.min,c=t.max,d=function(m,g,x){var v,b;(v=t.onDayClick)===null||v===void 0||v.call(t,m,g,x);var y=MSe(m,n);(b=t.onSelect)===null||b===void 0||b.call(t,y,m,g,x)},u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(u.range_start=[i],o?(u.range_end=[o],Zn(i,o)||(u.range_middle=[{after:i,before:o}])):u.range_end=[i]):o&&(u.range_start=[o],u.range_end=[o]),l&&(i&&!o&&u.disabled.push({after:ug(i,l-1),before:bn(i,l-1)}),i&&o&&u.disabled.push({after:i,before:bn(i,l-1)}),!i&&o&&u.disabled.push({after:ug(o,l-1),before:bn(o,l-1)})),c){if(i&&!o&&(u.disabled.push({before:bn(i,-c+1)}),u.disabled.push({after:bn(i,c-1)})),i&&o){var f=ko(o,i)+1,h=c-f;u.disabled.push({before:ug(i,h)}),u.disabled.push({after:bn(o,h)})}!i&&o&&(u.disabled.push({before:bn(o,-c+1)}),u.disabled.push({after:bn(o,c-1)}))}return s.jsx(pO.Provider,{value:{selected:n,onDayClick:d,modifiers:u},children:r})}function gO(){var e=p.useContext(pO);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Hb(e){return Array.isArray(e)?oQ([],e):e!==void 0?[e]:[]}function $Se(e){var t={};return Object.entries(e).forEach(function(r){var n=r[0],a=r[1];t[n]=Hb(a)}),t}var qi;(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"})(qi||(qi={}));var LSe=qi.Selected,Xo=qi.Disabled,FSe=qi.Hidden,BSe=qi.Today,nk=qi.RangeEnd,sk=qi.RangeMiddle,ak=qi.RangeStart,USe=qi.Outside;function zSe(e,t,r){var n,a=(n={},n[LSe]=Hb(e.selected),n[Xo]=Hb(e.disabled),n[FSe]=Hb(e.hidden),n[BSe]=[e.today],n[nk]=[],n[sk]=[],n[ak]=[],n[USe]=[],n);return e.fromDate&&a[Xo].push({before:e.fromDate}),e.toDate&&a[Xo].push({after:e.toDate}),$v(e)?a[Xo]=a[Xo].concat(t.modifiers[Xo]):Lv(e)&&(a[Xo]=a[Xo].concat(r.modifiers[Xo]),a[ak]=r.modifiers[ak],a[sk]=r.modifiers[sk],a[nk]=r.modifiers[nk]),a}var fQ=p.createContext(void 0);function WSe(e){var t=qr(),r=mO(),n=gO(),a=zSe(t,r,n),i=$Se(t.modifiers),o=Mt(Mt({},a),i);return s.jsx(fQ.Provider,{value:o,children:e.children})}function hQ(){var e=p.useContext(fQ);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function VSe(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function HSe(e){return!!(e&&typeof e=="object"&&"from"in e)}function qSe(e){return!!(e&&typeof e=="object"&&"after"in e)}function YSe(e){return!!(e&&typeof e=="object"&&"before"in e)}function GSe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function KSe(e,t){var r,n=t.from,a=t.to;if(n&&a){var i=ko(a,n)<0;i&&(r=[a,n],n=r[0],a=r[1]);var o=ko(e,n)>=0&&ko(a,e)>=0;return o}return a?Zn(a,e):n?Zn(n,e):!1}function QSe(e){return W2(e)}function ZSe(e){return Array.isArray(e)&&e.every(W2)}function XSe(e,t){return t.some(function(r){if(typeof r=="boolean")return r;if(QSe(r))return Zn(e,r);if(ZSe(r))return r.includes(e);if(HSe(r))return KSe(e,r);if(GSe(r))return r.dayOfWeek.includes(e.getDay());if(VSe(r)){var n=ko(r.before,e),a=ko(r.after,e),i=n>0,o=a<0,l=Bc(r.before,r.after);return l?o&&i:i||o}return qSe(r)?ko(e,r.after)>0:YSe(r)?ko(r.before,e)>0:typeof r=="function"?r(e):!1})}function xO(e,t,r){var n=Object.keys(t).reduce(function(i,o){var l=t[o];return XSe(e,l)&&i.push(o),i},[]),a={};
675return n.forEach(function(i){return a[i]=!0}),r&&!vN(e,r)&&(a.outside=!0),a}function JSe(e,t){for(var r=Ps(e[0]),n=Av(e[e.length-1]),a,i,o=r;o<=n;){var l=xO(o,t),c=!l.disabled&&!l.hidden;if(!c){o=bn(o,1);continue}if(l.selected)return o;l.today&&!i&&(i=o),a||(a=o),o=bn(o,1)}return i||a}var eke=365;function mQ(e,t){var r=t.moveBy,n=t.direction,a=t.context,i=t.modifiers,o=t.retry,l=o===void 0?{count:0,lastFocused:e}:o,c=a.weekStartsOn,d=a.fromDate,u=a.toDate,f=a.locale,h={day:bn,week:CT,month:Wa,year:Vve,startOfWeek:function(v){return a.ISOWeek?$l(v):Ms(v,{locale:f,weekStartsOn:c})},endOfWeek:function(v){return a.ISOWeek?yG(v):Dv(v,{locale:f,weekStartsOn:c})}},m=h[r](e,n==="after"?1:-1);n==="before"&&d?m=Hve([d,m]):n==="after"&&u&&(m=qve([u,m]));var g=!0;if(i){var x=xO(m,i);g=!x.disabled&&!x.hidden}return g?m:l.count>eke?l.lastFocused:mQ(m,{moveBy:r,direction:n,context:a,modifiers:i,retry:Mt(Mt({},l),{count:l.count+1})})}var pQ=p.createContext(void 0);function tke(e){var t=Fv(),r=hQ(),n=p.useState(),a=n[0],i=n[1],o=p.useState(),l=o[0],c=o[1],d=JSe(t.displayMonths,r),u=a??(l&&t.isDateDisplayed(l))?l:d,f=function(){c(a),i(void 0)},h=function(v){i(v)},m=qr(),g=function(v,b){if(a){var y=mQ(a,{moveBy:v,direction:b,context:m,modifiers:r});Zn(a,y)||(t.goToDate(y,a),h(y))}},x={focusedDay:a,focusTarget:u,blur:f,focus:h,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return s.jsx(pQ.Provider,{value:x,children:e.children})}function vO(){var e=p.useContext(pQ);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function rke(e,t){var r=hQ(),n=xO(e,r,t);return n}var yO=p.createContext(void 0);function nke(e){if(!_N(e.initialProps)){var t={selected:void 0};return s.jsx(yO.Provider,{value:t,children:e.children})}return s.jsx(ske,{initialProps:e.initialProps,children:e.children})}function ske(e){var t=e.initialProps,r=e.children,n=function(i,o,l){var c,d,u;if((c=t.onDayClick)===null||c===void 0||c.call(t,i,o,l),o.selected&&!t.required){(d=t.onSelect)===null||d===void 0||d.call(t,void 0,i,o,l);return}(u=t.onSelect)===null||u===void 0||u.call(t,i,i,o,l)},a={selected:t.selected,onDayClick:n};return s.jsx(yO.Provider,{value:a,children:r})}function gQ(){var e=p.useContext(yO);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function ake(e,t){var r=qr(),n=gQ(),a=mO(),i=gO(),o=vO(),l=o.focusDayAfter,c=o.focusDayBefore,d=o.focusWeekAfter,u=o.focusWeekBefore,f=o.blur,h=o.focus,m=o.focusMonthBefore,g=o.focusMonthAfter,x=o.focusYearBefore,v=o.focusYearAfter,b=o.focusStartOfWeek,y=o.focusEndOfWeek,j=function(z){var R,q,V,se;_N(r)?(R=n.onDayClick)===null||R===void 0||R.call(n,e,t,z):$v(r)?(q=a.onDayClick)===null||q===void 0||q.call(a,e,t,z):Lv(r)?(V=i.onDayClick)===null||V===void 0||V.call(i,e,t,z):(se=r.onDayClick)===null||se===void 0||se.call(r,e,t,z)},w=function(z){var R;h(e),(R=r.onDayFocus)===null||R===void 0||R.call(r,e,t,z)},N=function(z){var R;f(),(R=r.onDayBlur)===null||R===void 0||R.call(r,e,t,z)},S=function(z){var R;(R=r.onDayMouseEnter)===null||R===void 0||R.call(r,e,t,z)},k=function(z){var R;(R=r.onDayMouseLeave)===null||R===void 0||R.call(r,e,t,z)},T=function(z){var R;(R=r.onDayPointerEnter)===null||R===void 0||R.call(r,e,t,z)},C=function(z){var R;(R=r.onDayPointerLeave)===null||R===void 0||R.call(r,e,t,z)},E=function(z){var R;(R=r.onDayTouchCancel)===null||R===void 0||R.call(r,e,t,z)},P=function(z){var R;(R=r.onDayTouchEnd)===null||R===void 0||R.call(r,e,t,z)},_=function(z){var R;(R=r.onDayTouchMove)===null||R===void 0||R.call(r,e,t,z)},I=function(z){var R;(R=r.onDayTouchStart)===null||R===void 0||R.call(r,e,t,z)},F=function(z){var R;(R=r.onDayKeyUp)===null||R===void 0||R.call(r,e,t,z)},H=function(z){var R;switch(z.key){case"ArrowLeft":z.preventDefault(),z.stopPropagation(),r.dir==="rtl"?l(
675):c();break;case"ArrowRight":z.preventDefault(),z.stopPropagation(),r.dir==="rtl"?c():l();break;case"ArrowDown":z.preventDefault(),z.stopPropagation(),d();break;case"ArrowUp":z.preventDefault(),z.stopPropagation(),u();break;case"PageUp":z.preventDefault(),z.stopPropagation(),z.shiftKey?x():m();break;case"PageDown":z.preventDefault(),z.stopPropagation(),z.shiftKey?v():g();break;case"Home":z.preventDefault(),z.stopPropagation(),b();break;case"End":z.preventDefault(),z.stopPropagation(),y();break}(R=r.onDayKeyDown)===null||R===void 0||R.call(r,e,t,z)},W={onClick:j,onFocus:w,onBlur:N,onKeyDown:H,onKeyUp:F,onMouseEnter:S,onMouseLeave:k,onPointerEnter:T,onPointerLeave:C,onTouchCancel:E,onTouchEnd:P,onTouchMove:_,onTouchStart:I};return W}function ike(){var e=qr(),t=gQ(),r=mO(),n=gO(),a=_N(e)?t.selected:$v(e)?r.selected:Lv(e)?n.selected:void 0;return a}function oke(e){return Object.values(qi).includes(e)}function lke(e,t){var r=[e.classNames.day];return Object.keys(t).forEach(function(n){var a=e.modifiersClassNames[n];if(a)r.push(a);else if(oke(n)){var i=e.classNames["day_".concat(n)];i&&r.push(i)}}),r}function cke(e,t){var r=Mt({},e.styles.day);return Object.keys(t).forEach(function(n){var a;r=Mt(Mt({},r),(a=e.modifiersStyles)===null||a===void 0?void 0:a[n])}),r}function dke(e,t,r){var n,a,i,o=qr(),l=vO(),c=rke(e,t),d=ake(e,c),u=ike(),f=!!(o.onDayCl
675ick||o.mode!=="default");p.useEffect(function(){var S;c.outside||l.focusedDay&&f&&Zn(l.focusedDay,e)&&((S=r.current)===null||S===void 0||S.focus())},[l.focusedDay,e,r,f,c.outside]);var h=lke(o,c).join(" "),m=cke(o,c),g=!!(c.outside&&!o.showOutsideDays||c.hidden),x=(i=(a=o.components)===null||a===void 0?void 0:a.DayContent)!==null&&i!==void 0?i:OSe,v=s.jsx(x,{date:e,displayMonth:t,activeModifiers:c}),b={style:m,className:h,children:v,role:"gridcell"},y=l.focusTarget&&Zn(l.focusTarget,e)&&!c.outside,j=l.focusedDay&&Zn(l.focusedDay,e),w=Mt(Mt(Mt({},b),(n={disabled:c.disabled,role:"gridcell"},n["aria-selected"]=c.selected,n.tabIndex=j||y?0:-1,n)),d),N={isButton:f,isHidden:g,activeModifiers:c,selectedDays:u,buttonProps:w,divProps:b};return N}function uke(e){var t=p.useRef(null),r=dke(e.date,e.displayMonth,t);return r.isHidden?s.jsx("div",{role:"gridcell"}):r.isButton?s.jsx(xj,Mt({name:"day",ref:t},r.buttonProps)):s.jsx("div",Mt({},r.divProps))}function fke(e){var t=e.number,r=e.dates,n=qr(),a=n.onWeekNumberClick,i=n.styles,o=n.classNames,l=n.locale,c=n.labels.labelWeekNumber,d=n.formatters.formatWeekNumber,u=d(Number(t),{locale:l});if(!a)return s.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:u});var f=c(Number(t),{locale:l}),h=function(m){a(t,r,m)};return s.jsx(xj,{name:"week-number","aria-label":f,className:o.weeknumber,style:i.weeknumber,onClick:h,children:u})}function hke(e){var t,r,n=qr(),a=n.styles,i=n.classNames,o=n.showWeekNumber,l=n.components,c=(t=l==null?void 0:l.Day)!==null&&t!==void 0?t:uke,d=(r=l==null?void 0:l.WeekNumber)!==null&&r!==void 0?r:fke,u;return o&&(u=s.jsx("td",{className:i.cell,style:a.cell,children:s.jsx(d,{number:e.weekNumber,dates:e.dates})})),s.jsxs("tr",{className:i.row,style:a.row,children:[u,e.dates.map(function(f){return s.jsx("td",{className:i.cell,style:a.cell,role:"presentation",children:s.jsx(c,{displayMonth:e.displayMonth,date:f})},qye(f))})]})}function DR(e,t,r){for(var n=r!=null&&r.ISOWeek?yG(t):Dv(t,r),a=r!=null&&r.ISOWeek?$l(e):Ms(e,r),i=ko(n,a),o=[],l=0;l<=i;l++)o.push(bn(a,l));var c=o.reduce(function(d,u){var f=r!=null&&r.ISOWeek?q2(u):G2(u,r),h=d.find(function(m){return m.weekNumber===f});return h?(h.dates.push(u),d):(d.push({weekNumber:f,dates:[u]}),d)},[]);return c}function mke(e,t){var r=DR(Ps(e),Av(e),t);if(t!=null&&t.useFixedWeeks){var n=Gye(e,t);if(n<6){var a=r[r.length-1],i=a.dates[a.dates.length-1],o=CT(i,6-n),l=DR(CT(i,1),o,t);r.push.apply(r,l)}}return r}function pke(e){var t,r,n,a=qr(),i=a.locale,o=a.classNames,l=a.styles,c=a.hideHead,d=a.fixedWeeks,u=a.components,f=a.weekStartsOn,h=a.firstWeekContainsDate,m=a.ISOWeek,g=mke(e.displayMonth,{useFixedWeeks:!!d,ISOWeek:m,locale:i,weekStartsOn:f,firstWeekContainsDate:h}),x=(t=u==null?void 0:u.Head)!==null&&t!==void 0?t:ESe,v=(r=u==null?void 0:u.Row)!==null&&r!==void 0?r:hke,b=(n=u==null?void 0:u.Footer)!==null&&n!==void 0?n:TSe;return s.jsxs("table",{id:e.id,className:o.table,style:l.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!c&&s.jsx(x,{}),s.jsx("tbody",{className:o.tbody,style:l.tbody,children:g.map(function(y){return s.jsx(v,{displayMonth:e.displayMonth,dates:y.dates,weekNumber:y.weekNumber},y.weekNumber)})}),s.jsx(b,{displayMonth:e.displayMonth})]})}function gke(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var xke=gke()?p.useLayoutEffect:p.useEffect,ik=!1,vke=0;function MR(){return"react-day-picker-".concat(++vke)}function yke(e){var t,r=e??(ik?MR():null),n=p.useState(r),a=n[0],i=n[1];return xke(function(){a===null&&i(MR())},[]),p.useEffect(function(){ik===!1&&(ik=!0)},[]),(t=e??a)!==null&&t!==void 0?t:void 0}function bke(e){var t,r,n=qr(),a=n.dir,i=n.classNames,o=n.styles,l=n.components,c=Fv().displayMonths,d=yke(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),u=n.id?"".concat(n.id,"-grid-").concat(e.displayIndex):void 0,f=[i.month],h=o.month,m=e.displayIndex===0,g=e.displayIndex===c.length-1,x=!m&&!g;a==="rtl"&&(t=[m,g],g=t[0],m=t[1]),m&&(f.push(i.caption_start),h=Mt(Mt({},h),o.caption_start)),g&&(f.push(i.caption_end),h=Mt(Mt({},h),o.caption_end)),x&&(f.push(i.caption_between),h=Mt(Mt({},h),o.caption_between));var v=(r=l==null?void 0:l.Caption)!==null&&r!==void 0?r:CSe;return s.jsxs("div",{className:f.join(" "),style:h,children:[s.jsx(v,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),s.jsx(pke,{id:u,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function jke(e){var t=qr(),r=t.classNames,n=t.styles;return s.jsx("div",{className:r.months,style:n.months,children:e.children})}function wke(e){var t,r,n=e.initialProps,a=qr(),i=vO(),o=Fv(),l=p.useState(!1),c=l[0],d=l[1];p.useEffect(function(){a.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),d(!0)))},[a.initialFocus,c,i.focus,i.focusTarget,i]);var u=[a.classNames.root,a.className];a.numberOfMonths>1&&u.push(a.classNames.multiple_months),a.showWeekNumber&&u.push(a.classNames.with_weeknumber);var f=Mt(Mt({},a.styles.root),a.style),h=Object.keys(n).filter(function(g){return g.startsWith("data-")}).reduce(function(g,x){var v;return Mt(Mt({},g),(v={},v[x]=n[x],v))},{}),m=(r=(t=n.components)===null||t===void 0?void 0:t.Months)!==null&&r!==void 0?r:jke;return s.jsx("div",Mt({className:u.join(" "),style:f,dir:a.dir,id:a.id,nonce:n.nonce,title:n.title,lang:n.lang},h,{children:s.jsx(m,{children:o.displayMonths.map(function(g,x){return s.jsx(bke,{displayIndex:x,displayMonth:g},x)})})}))}function Nke(e){var t=e.children,r=Y1e(e,["children"]);return s.jsx(fSe,{initialProps:r,children:s.jsx(wSe,{children:s.jsx(nke,{initialProps:r,children:s.jsx(ASe,{initialProps:r,children:s.jsx(ISe,{initialProps:r,children:s.jsx(WSe,{children:s.jsx(tke,{children:t})})})})})})})}function Ske(e){return s.jsx(Nke,Mt({},e,{children:s.jsx(wke,{initialProps:e})}))}function PN({className:e,classNames:t,showOutsideDays:r=!0,...n}){return s.jsx(Ske,{showOutsideDays:r,className:Oe("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:sp
675ace-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:Oe(ax({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:Oe(ax({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:({...a})=>s.jsx(as,{className:"h-4 w-4"}),IconRight:({...a})=>s.jsx(Wi,{className:"h-4 w-4"})},...n})}PN.displayName="Calendar";const ok=768;function kke(){const[e,t]=p.useState(void 0);return p.useEffect(()=>{const r=window.matchMedia(`(max-width: ${ok-1}px)`),n=()=>{t(window.innerWidth<ok)};return r.addEventListener("change",n),t(window.innerWidth<ok),()=>r.removeEventListener("change",n)},[]),!!e}const Cke="Left",Tke="Right",_ke="Up",Pke="Down",Sf={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},WT={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},IR="mousemove",RR="mouseup",Eke="touchend",Oke="touchmove",Ake="touchstart";function Dke(e,t,r,n){return e>t?r>0?Tke:Cke:n>0?Pke:_ke}function $R(e,t){if(t===0)return e;const r=Math.PI/180*t,n=e[0]*Math.cos(r)+e[1]*Math.sin(r),a=e[1]*Math.cos(r)-e[0]*Math.sin(r);return[n,a]}function Mke(e,t){const r=u=>{const f="touches"in u;f&&u.touches.length>1||e((h,m)=>{m.trackMouse&&!f&&(document.addEventListener(IR,n),document.addEventListener(RR,o));const{clientX:g,clientY:x}=f?u.touches[0]:u,v=$R([g,x],m.rotationAngle);return m.onTouchStartOrOnMouseDown&&m.onTouchStartOrOnMouseDown({event:u}),Object.assign(Object.assign(Object.assign({},h),WT),{initial:v.slice(),xy:v,start:u.timeStamp||0})})},n=u=>{e((f,h)=>{const m="touches"in u;if(m&&u.touches.length>1)return f;if(u.timeStamp-f.start>h.swipeDuration)return f.swiping?Object.assign(Object.assign({},f),{swiping:!1}):f;const{clientX:g,clientY:x}=m?u.touches[0]:u,[v,b]=$R([g,x],h.rotationAngle),y=v-f.xy[0],j=b-f.xy[1],w=Math.abs(y),N=Math.abs(j),S=(u.timeStamp||0)-f.start,k=Math.sqrt(w*w+N*N)/(S||1),T=[y/(S||1),j/(S||1)],C=Dke(w,N,y,j),E=typeof h.delta=="number"?h.delta:h.delta[C.toLowerCase()]||Sf.delta;if(w<E&&N<E&&!f.swiping)return f;const P={absX:w,absY:N,deltaX:y,deltaY:j,dir:C,event:u,first:f.first,initial:f.initial,velocity:k,vxvy:T};P.first&&h.onSwipeStart&&h.onSwipeStart(P),h.onSwiping&&h.onSwiping(P);let _=!1;return(h.onSwiping||h.onSwiped||h[`onSwiped${C}`])&&(_=!0),_&&h.preventScrollOnSwipe&&h.trackTouch&&u.cancelable&&u.preventDefault(),Object.assign(Object.assign({},f),{first:!1,eventData:P,swiping:!0})})},a=u=>{e((f,h)=>{let m;if(f.swiping&&f.eventData){if(u.timeStamp-f.start<h.swipeDuration){m=Object.assign(Object.assign({},f.eventData),{event:u}),h.onSwiped&&h.onSwiped(m);const g=h[`onSwiped${m.dir}`];g&&g(m)}}else h.onTap&&h.onTap({event:u});return h.onTouchEndOrOnMouseUp&&h.onTouchEndOrOnMouseUp({event:u}),Object.assign(Object.assign(Object.assign({},f),WT),{eventData:m})})},i=()=>{document.removeEventListener(IR,n),document.removeEventListener(RR,o)},o=u=>{i(),a(u)},l=(u,f)=>{let h=()=>{};if(u&&u.addEventListener){const m=Object.assign(Object.assign({},Sf.touchEventOptions),f.touchEventOptions),g=[[Ake,r,m],[Oke,n,Object.assign(Object.assign({},m),f.preventScrollOnSwipe?{passive:!1}:{})],[Eke,a,m]];g.forEach(([x,v,b])=>u.addEventListener(x,v,b)),h=()=>g.forEach(([x,v])=>u.removeEventListener(x,v))}return h},d={ref:u=>{u!==null&&e((f,h)=>
675{if(f.el===u)return f;const m={};return f.el&&f.el!==u&&f.cleanUpTouch&&(f.cleanUpTouch(),m.cleanUpTouch=void 0),h.trackTouch&&u&&(m.cleanUpTouch=l(u,h)),Object.assign(Object.assign(Object.assign({},f),{el:u}),m)})}};return t.trackMouse&&(d.onMouseDown=r),[d,l]}function Ike(e,t,r,n){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==r.preventScrollOnSwipe||t.touchEventOptions.passive!==r.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:n(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:n(e.el,t)})}function Rke(e){const{trackMouse:t}=e,r=p.useRef(Object.assign({},WT)),n=p.useRef(Object.assign({},Sf)),a=p.useRef(Object.assign({},n.current));a.current=Object.assign({},n.current),n.current=Object.assign(Object.assign({},Sf),e);let i;for(i in Sf)n.current[i]===void 0&&(n.current[i]=Sf[i]);const[o,l]=p.useMemo(()=>Mke(c=>r.current=c(r.current,n.current),{trackMouse:t}),[t]);return r.current=Ike(r.current,n.current,a.current,l),o}function $ke({currentDate:e,timeZone:t,onEventClick:r,onDateChange:n,organizationId:a,teamId:i}){const{data:o=[],isLoading:l}=EG(e,void 0,void 0,a||void 0,i||void 0),c=o.filter(v=>{const b=new Date(v.startTime);return Zn(b,e)});p.useState(!1),p.useState(0);const d=p.useRef(null),u=Rke({onSwipedLeft:()=>{const v=bn(e,1);n(v)},onSwipedRight:()=>{const v=ug(e,1);n(v)},trackMouse:!1,preventScrollOnSwipe:!1}),f=()=>{const v=ug(e,1);n(v)},h=()=>{const v=bn(e,1);n(v)},m=()=>{n(new Date)},g=v=>{const b=new Date(v.startTime),y=new Date(v.endTime),j=Fb(v.calendarType||"default"),w=b.getHours()*60+b.getMinutes(),N=(y.getTime()-b.getTime())/(60*1e3);return{top:w+"px",height:Math.max(N,30)+"px",...j}},x=Zn(e,new Date);return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex-shrink-0 bg-white dark:bg-slate-900 border-b border-neutral-200 dark:border-slate-700 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx(D,{variant:"outline",size:"sm",onClick:f,className:"px-2",children:s.jsx(as,{className:"h-4 w-4"})}),s.jsxs("div",{className:"flex-1 text-center",children:[s.jsx("div",{className:"text-xs text-neutral-600 dar
675k:text-slate-400 uppercase tracking-wide",children:pt(e,"EEEE")}),s.jsx("div",{className:"text-lg font-semibold text-neutral-900 dark:text-slate-100",children:pt(e,"MMMM d, yyyy")})]}),s.jsx(D,{variant:"outline",size:"sm",onClick:h,className:"px-2",children:s.jsx(Wi,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx(D,{variant:x?"default":"outline",size:"sm",onClick:m,className:"flex-1",children:"Today"}),s.jsxs("div",{className:"text-xs text-neutral-500 dark:text-slate-400",children:[c.length," ",c.length===1?"event":"events"]})]}),s.jsx("div",{className:"mt-2 text-center text-xs text-neutral-400 dark:text-slate-500",children:"â Swipe to change days â"})]}),s.jsx("div",{...u,ref:d,className:"flex-1 overflow-y-auto relative bg-neutral-50 dark:bg-slate-800",children:s.jsxs("div",{className:"min-h-full relative",children:[s.jsx("div",{className:"relative",children:Kp.map(v=>s.jsxs("div",{className:"flex border-b border-neutral-200 dark:border-slate-700",style:{height:"60px"},children:[s.jsx("div",{className:"w-16 flex-shrink-0 pr-2 pt-1 text-right",children:s.jsxs("span",{className:"text-xs text-neutral-500 dark:text-slate-400 font-medium",children:[v===0?"12":v>12?v-12:v,v>=12?"PM":"AM"]})}),s.jsx("div",{className:"flex-1 relative bg-white dark:bg-slate-900 border-l border-neutral-200 dark:border-slate-700",children:s.jsx("div",{className:"absolute top-1/2 left-0 right-0 h-px bg-neutral-100 dark:bg-slate-700"})})]},v))}),s.jsx("div",{className:"absolute top-0 left-16 right-0 bottom-0 pointer-events-none",children:!l&&c.map(v=>{const b=g(v);return s.jsx("div",{onClick:()=>r(v),className:`absolute left-2 right-2 ${b.bg} ${b.text} ${b.border} rounded-lg shadow-sm pointer-events-auto cursor-pointer transition-transform active:scale-98`,style:{to
675p:b.top,height:b.height,minHeight:"44px"},children:s.jsxs("div",{className:"p-2 h-full overflow-hidden flex flex-col",children:[s.jsx("div",{className:"font-medium text-sm line-clamp-2",children:v.title}),s.jsxs("div",{className:"text-xs mt-1 opacity-90",children:[Nf(new Date(v.startTime).getHours(),new Date(v.startTime).getMinutes())," ","-"," ",Nf(new Date(v.endTime).getHours(),new Date(v.endTime).getMinutes())]}),v.location&&s.jsxs("div",{className:"text-xs mt-1 opacity-75 truncate",children:["ð ",v.location]})]})},v.id)})}),l&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/50 dark:bg-slate-900/50",children:s.jsx("div",{className:"text-sm text-neutral-600 dark:text-slate-400",children:"Loading events..."})}),!l&&c.length===0&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:s.jsxs("div",{className:"text-center p-6",children:[s.jsx("div",{className:"text-4xl mb-2",children:"ð
"}),s.jsx("div",{className:"text-sm text-neutral-600 dark:text-slate-400",children:"No events scheduled"}),s.jsx("div",{className:"text-xs text-neutral-500 dark:text-slate-500 mt-1",children:x?"for today":`for ${pt(e,"MMM d")}`})]})})]})})]})}function Lke({currentDate:e,timeZone:t,onEventClick:r,onDateChange:n,currentView:a="week",organizationId:i,teamId:o}){const l=kke(),{data:c=[],isLoading:d}=EG(e,void 0,void 0,i||void 0,o||void 0),u=Ps(e),f=Av(e),{data:h=[],isLoading:m}=tO(u,f,void 0,void 0,i||void 0,o||void 0),g=c.filter(k=>{const T=new Date(k.startTime);return Zn(T,e)}),[x,v]=p.useState(Ms(e));p.useEffect(()=>{v(Ms(e))},[e]);const b=Array.from({length:7},(k,T)=>{const C=bn(x,T);return{name:V1e[C.getDay()],date:C.getDate(),fullDate:C,isToday:pt(C,"yyyy-MM-dd")===pt(new Date,"yyyy-MM-dd")}}),y=(k,T="week")=>{const C=new Date(k.startTime),E=new Date(k.endTime),P=Fb(k.calendarType||"default");if(T==="day"){const _=C.getHours()*60+C.getMinutes(),I=(E.getTime()-C.getTime())/(60*1e3);return{top:_+"px",left:"calc(12.5% + 5px)",width:"calc(87.5% - 10px)",height:I+"px",...P}}else{const _=C.getDay(),I=C.getHours()*60+C.getMinutes(),F=(E.getTime()-C.getTime())/(60*1e3);return{top:I+"px",left:`calc(${(_+1)*12.5}% + 5px)`,width:"calc(12.5% - 10px)",height:F+"px",...P}}},j=h.reduce((k,T)=>{const C=pt(new Date(T.startTime),"yyyy-MM-dd");return k[C]||(k[C]=[]),k[C].push(T),k},{}),w=()=>s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsxs("div",{className:"calendar-grid min-w-full relative",style:{display:"grid",gridTemplateColumns:"80px 1fr",gridTemplateRows:"60px repeat(24, 60px)"},children:[s.jsxs("div",{className:"sticky left-0 z-10 bg-white border-r border-neutral-300",children:[s.jsx("div",{className:"h-[60px]"}),Kp.map(k=>s.jsx("div",{className:"h-[60px] pr-2 text-right text-sm text-neutral-500 relative",children:s.jsxs("span",{className:"absolute right-2 -top-2",children:[k===0?"12":k>12?k-12:k," ",k>=12?"PM":"AM"]})},k))]}),s.jsxs("div",{className:"h-[60px] border-b border-neutral-300 flex flex-col justify-center items-center text-sm font-medium",children:[s.jsx("div",{className:"text-neutral-600",children:pt(e,"EEEE")}),s.jsx("div",{className:"text-xl font-semibold text-primary bg-blue-50 w-8 h-8 rounded-full flex items-center justify-center",children:pt(e,"d")})]}),Kp.map(k=>s.jsx("div",{className:"time-slot relative border-t border-neutral-300 p-[8px]",style:{gridRow:k+2,gridColumn:2}},`${k}`)),!d&&g.map(k=>{const T=y(k,"day");return s.jsxs("div",{onClick:()=>r(k),className:`calendar-event ${T.bg} ${T.text} ${T.border} cursor-pointer`,style:{position:"absolute",top:T.top,left:T.left,width:T.width,height:T.height,borderRadius:"4px",padding:"4px 8px",fontSize:"12px",overflow:"hidden",zIndex:10},children:[s.jsx("div",{className:"font-medium",children:k.title}),s.jsxs("div",{className:"text-xs",children:[Nf(new Date(k.startTime).getHours(),new Date(k.startTime).getMinutes())," -",Nf(new Date(k.endTime).getHours(),new Date(k.endTime).getMinutes())]}),s.jsx("div",{className:"absolute inset-0 bg-primary/5 opacity-0 hover:opacity-100 transition-opacity cursor-pointer flex items-center justify-center",children:s.jsx("span",{className:"text-sm text-primary font-medium",children:"Click to view details"})})]},k.id)})]})}),N=()=>s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsxs("div",{className:"calendar-grid min-w-full relative",style:{display:"grid",gridTemplateColumns:"80px repeat(7, 1fr)",gridTemplateRows:"60px repeat(24, 60px)"},children:[s.jsxs("div",{className:"sticky left-0 z-10 bg-white border-r border-neutral-300",children:[s.jsx("div",{className:"h-[60px]"}),Kp.map(k=>s.jsx("div",{className:"h-[60px] pr-2 text-right text-sm text-neutral-500 relative",children:s.jsxs("span",{className:"absolute right-2 -top-2",children:[k===0?"12":k>12?k-12:k," ",k>=12?"PM":"AM"]})},k))]}),b.map((k,T)=>s.jsxs("div",{className:"h-[60px] border-b border-neutral-300 flex flex-col justify-center items-center text-sm font-medium",children:[s.jsx("div",{className:"text-neutral-600",children:k.name}),s.jsx("div",{className:`text-xl font-semibold ${k.isToday?"text-primary bg-blue-50 w-8 h-8 rounded-full flex items-center justify-center":"text-neutral-700"}`,children:k.date})]},T)),Kp.map(k=>Array.from({length:7},(T,C)=>s.jsx("div",{className:"time-slot relative border-t border-neutral-300 p-[8px]",style:{gridRow:k+2,gridColumn:C+2}},`${k}-${C}`))),!d&&c.map(k=>{const T=y(k);return s.jsxs("div",{onClick:()=>r(k),className:`calendar-event ${T.bg} ${T.text} ${T.border}
675 cursor-pointer`,style:{position:"absolute",top:T.top,left:T.left,width:T.width,height:T.height,borderRadius:"4px",padding:"4px 8px",fontSize:"12px",overflow:"hidden",zIndex:10},children:[s.jsx("div",{className:"font-medium",children:k.title}),s.jsxs("div",{className:"text-xs",children:[Nf(new Date(k.startTime).getHours(),new Date(k.startTime).getMinutes())," -",Nf(new Date(k.endTime).getHours(),new Date(k.endTime).getMinutes())]}),s.jsx("div",{className:"absolute inset-0 bg-primary/5 opacity-0 hover:opacity-100 transition-opacity cursor-pointer flex items-center justify-center",children:s.jsx("span",{className:"text-sm text-primary font-medium",children:"Click to view details"})})]},k.id)})]})}),S=()=>s.jsx("div",{className:"flex-1 overflow-auto p-4",children:s.jsx("div",{className:"bg-white rounded-lg shadow-sm",children:s.jsx(PN,{mode:"single",selected:e,month:e,showOutsideDays:!0,classNames:{day:"h-14 w-full p-0 font-normal aria-selected:opacity-100 rounded-none relative"},components:{Day:k=>{const T=k.date,C=pt(T,"yyyy-MM-dd"),E=j[C]||[],P=k.selected||Zn(T,e),_=vN(T,e);return s.jsx("div",{className:`h-full w-full border border-neutral-200 hover:bg-neutral-50 transition-colors 676 ${P?"bg-blue-50":""} 677 ${_?"":"opacity-40"}`,onClick:()=>k.onClick&&k.onClick(T),children:s.jsxs("div",{className:"p-1",children:[s.jsx("div",{className:`text-right mb-1 ${P?"font-bold":""}`,children:Uye(T)}),s.jsxs("div",{className:"space-y-1 max-h-[70px] overflow-hidden",children:[E.slice(0,3).map((I,F)=>s.jsx("div",{onClick:H=>{H.stopPropagation(),r(I)},className:`text-xs truncate rounded px-1 py-0.5 ${Fb(I.calendarType||"default").bg} ${Fb(I.calendarType||"default").text}`,children:I.title},I.id)),E.length>3&&s.jsxs("div",{className:"text-xs text-neutral-600 pl-1",children:["+",E.length-3," more"]})]})]})})}}})})});if(l)return s.jsx($ke,{currentDate:e,timeZone:t,onEventClick:r,onDateChange:n||(()=>{}),organizationId:i,teamId:o});switch(a){case"day":return w();case"month":return S();case"week":default:return N()}}
677const Fke=[{id:"America/New_York",name:"Eastern Time (US & Canada)",standardOffset:"-05:00",abbr:"ET"},{id:"America/Chicago",name:"Central Time (US & Canada)",standardOffset:"-06:00",abbr:"CT"},{id:"America/Denver",name:"Mountain Time (US & Canada)",standardOffset:"-07:00",abbr:"MT"},{id:"America/Los_Angeles",name:"Pacific Time (US & Canada)",standardOffset:"-08:00",abbr:"PT"},{id:"America/Anchorage",name:"Alaska",standardOffset:"-09:00",abbr:"AKT"},{id:"Pacific/Honolulu",name:"Hawaii",standardOffset:"-10:00",abbr:"HST"},{id:"America/Phoenix",name:"Arizona",standardOffset:"-07:00",abbr:"MST"},{id:"Europe/London",name:"London",standardOffset:"+00:00",abbr:"GMT"},{id:"Europe/Paris",name:"Paris",standardOffset:"+01:00",abbr:"CET"},{id:"Europe/Berlin",name:"Berlin",standardOffset:"+01:00",abbr:"CET"},{id:"Europe/Athens",name:"Athens",standardOffset:"+02:00",abbr:"EET"},{id:"Asia/Dubai",name:"Dubai",standardOffset:"+04:00",abbr:"GST"},{id:"Asia/Kolkata",name:"Mumbai",standardOffset:"+05:30",abbr:"IST"},{id:"Asia/Shanghai",name:"Beijing",standardOffset:"+08:00",abbr:"CST"},{id:"Asia/Tokyo",name:"Tokyo",standardOffset:"+09:00",abbr:"JST"},{id:"Australia/Sydney",name:"Sydney",standardOffset:"+10:00",abbr:"AEST"},{id:"Pacific/Auckland",name:"Auckland",standardOffset:"+12:00",abbr:"NZST"},{id:"UTC",name:"UTC",standardOffset:"+00:00",abbr:"UTC"}],Bke=Fke.map(e=>({id:e.id,name:e.name,offset:e.standardOffset,abbr:e.abbr}));function Uke({currentDate:e,onDateChange:t,onViewChange:r,onTimeZoneChange:n,currentView:a="week",currentTimeZone:i="UTC"}){const{start:o,end:l}=H1e(e),c=q1e(o,l),d=()=>{const h=new Date(e);a==="day"?h.setDate(h.getDate()-1):a==="week"?h.setDate(h.getDate()-7):a==="month"&&h.setMonth(h.getMonth()-1),t(h)},u=()=>{const h=new Date(e);a==="day"?h.setDate(h.getDate()+1):a==="week"?h.setDate(h.getDate()+7):a==="month"&&h.setMonth(h.getMonth()+1),t(h)},f=()=>{t(new Date)};return s.jsxs("div",{className:"border-b border-neutral-300 p-4 flex items-center justify-between bg-white",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(D,{variant:"ghost",size:"icon",onClick:d,children:s.jsx(as,{className:"h-5 w-5"})}),s.jsx(D,{variant:"ghost",size:"icon",onClick:u,children:s.jsx(Wi,{className:"h-5 w-5"})}),s.jsx("h2",{className:"text-lg font-semibold text-neutral-700 ml-2",children:c}),s.jsx(D,{variant:"outline",size:"sm",className:"ml-4 px-3 py-1 text-sm text-neutral-600 border border-neutral-300 rounded-md hover:bg-neutral-100",onClick:f,children:"Today"})]}),s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:"relative hidden md:block",children:s.jsxs(Xe,{value:a,onValueChange:r,children:[s.jsx(Qe,{className:"w-[120px]",children:s.jsx(Je,{placeholder:"View"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"day",children:"Day"}),s.jsx(Z,{value:"week",children:"Week"}),s.jsx(Z,{value:"month",children:"Month"})]})]})}),s.jsx("div",{className:"relative hidden md:block",children:s.jsxs(Xe,{value:i,onValueChange:n,children:[s.jsx(Qe,{className:"w-[180px]",children:s.jsx(Je,{placeholder:"Time Zone"})}),s.jsx(Ze,{children:Bke.map(h=>s.jsx(Z,{value:h.id,children:h.name},h.id))})]})})]})]})}function zke(e,t=[]){let r=[];function n(i,o){const l=p.createContext(o),c=r.length;r=[...r,o];function d(f){const{scope:h,children:m,...g}=f,x=(h==null?void 0:h[e][c])||l,v=p.useMemo(()=>g,Object.values(g));return s.jsx(x.Provider,{value:v,children:m})}function u(f,h){const m=(h==null?void 0:h[e][c])||l,g=p.useContext(m);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return d.displayName=i+"Provider",[d,u]}const a=()=>{const i=r.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 a.scopeName=e,[n,Wke(a,...t)]}function Wke(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=n.reduce((l,{useScope:c,scopeName:d})=>{const f=c(i)[`__scope${d}`];return{...l,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return r.scopeName=t.scopeName,r}var Vke="Toggle",bO=p.forwardRef((e,t)=>
677{const{pressed:r,defaultPressed:n=!1,onPressedChange:a,...i}=e,[o=!1,l]=xs({prop:r,onChange:a,defaultProp:n});return s.jsx(Ke.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":e.disabled?"":void 0,...i,ref:t,onClick:$e(e.onClick,()=>{e.disabled||l(!o)})})});bO.displayName=Vke;var xQ=bO,Em="ToggleGroup",[vQ,DZe]=zke(Em,[dd]),yQ=dd(),jO=O.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const a=n;return s.jsx(Hke,{...a,ref:t})}if(r==="multiple"){const a=n;return s.jsx(qke,{...a,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Em}\``)});jO.displayName=Em;var[bQ,jQ]=vQ(Em),Hke=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...i}=e,[o,l]=xs({prop:r,defaultProp:n,onChange:a});return s.jsx(bQ,{scope:e.__scopeToggleGroup,type:"single",value:o?[o]:[],onItemActivate:l,onItemDeactivate:O.useCallback(()=>l(""),[l]),children:s.jsx(wQ,{...i,ref:t})})}),qke=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...i}=e,[o=[],l]=xs({prop:r,defaultProp:n,onChange:a}),c=O.useCallback(u=>l((f=[])=>[...f,u]),[l]),d=O.useCallback(u=>l((f=[])=>f.filter(h=>h!==u)),[l]);return s.jsx(bQ,{scope:e.__scopeToggleGroup,type:"multiple",value:o,onItemActivate:c,onItemDeactivate:d,children:s.jsx(wQ,{...i,ref:t})})});jO.displayName=Em;var[Yke,Gke]=vQ(Em),wQ=O.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:a=!0,orientation:i,dir:o,loop:l=!0,...c}=e,d=yQ(r),u=cd(o),f={role:"group",dir:u,...c};return s.jsx(Yke,{scope:r,rovingFocus:a,disabled:n,children:a?s.jsx(cN,{asChild:!0,...d,orientation:i,dir:u,loop:l,children:s.jsx(Ke.div,{...f,ref:t})}):s.jsx(Ke.div,{...f,ref:t})})}),vj="ToggleGroupItem",NQ=O.forwardRef((e,t)=>{const r=jQ(vj,e.__scopeToggleGroup),n=Gke(vj,e.__scopeToggleGroup),a=yQ(e.__scopeToggleGroup),i=r.value.includes(e.value),o=n.disabled||e.disabled,l={...e,pressed:i,disabled:o},c=O.useRef(null);return n.rovingFocus?s.jsx(dN,{asChild:!0,...a,focusable:!o,active:i,ref:c,children:s.jsx(LR,{...l,ref:t})}):s.jsx(LR,{...l,ref:t})});NQ.displayName=vj;var LR=O.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...a}=e,i=jQ(vj,r),o={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=i.type==="single"?o:void 0;return s.jsx(bO,{...l,...a,ref:t,onPressedChange:c=>{c?i.onItemActivate(n):i.onItemDeactivate(n)}})}),SQ=jO,kQ=NQ;const CQ=Mu("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),Kke=p.forwardRef(({className:e,variant:t,size:r,...n},a)=>s.jsx(xQ,{ref:a,className:Oe(CQ({variant:t,size:r,className:e})),...n}));Kke.displayName=xQ.displayName;const TQ=p.createContext({size:"default",variant:"default"}),_Q=p.forwardRef(({className:e,variant:t,size:r,children:n,...a},i)=>s.jsx(SQ,{ref:i,className:Oe("flex items-center justify-center gap-1",e),...a,children:s.jsx(TQ.Provider,{value:{variant:t,size:r},children:n})}));_Q.displayName=SQ.displayName;const VT=p.forwardRef(({className:e,children:t,variant:r,size:n,...a},i)=>{const o=p.useContext(TQ);return s.jsx(kQ,{ref:i,className:Oe(CQ({variant:o.variant||r,size:o.size||n}),e),...a,children:t})});VT.displayName=kQ.displayName;var wO="Popover",[PQ,MZe]=Is(wO,[Tm]),Bv=Tm(),[Qke,hd]=PQ(wO),EQ=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:o=!1}=e,l=Bv(t),c=p.useRef(null),[d,u]=p.useState(!1),[f=!1,h]=xs({prop:n,defaultProp:a,onChange:i});return s.jsx(m2,{...l,children:s.jsx(Qke,{scope:t,contentId:La(),triggerRef:c,open:f,onOpenChange:h,onOpenToggle:p.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:d,onCustomAnchorAdd:p.useCallback(()=>u(!0),[]),onCustomAnchorRemove:p.useCallback(()=>u(!1),[]),modal:o,children:r})})};EQ.displayName=wO;var OQ="PopoverAnchor",Zke=p.forwardRef((e,t)=>
vendor: 4,433 bytes, line 677
677{const{__scopePopover:r,...n}=e,a=hd(OQ,r),i=Bv(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=a;return p.useEffect(()=>(o(),()=>l()),[o,l]),s.jsx(oN,{...i,...n,ref:t})});Zke.displayName=OQ;var AQ="PopoverTrigger",DQ=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=hd(AQ,r),i=Bv(r),o=Ft(t,a.triggerRef),l=s.jsx(Ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":LQ(a.open),...n,ref:o,onClick:$e(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:s.jsx(oN,{asChild:!0,...i,children:l})});DQ.displayName=AQ;var NO="PopoverPortal",[Xke,Jke]=PQ(NO,{forceMount:void 0}),MQ=e=>{const{__scopePopover:t,forceMount:r,children:n,container:a}=e,i=hd(NO,t);return s.jsx(Xke,{scope:t,forceMount:r,children:s.jsx(Jn,{present:r||i.open,children:s.jsx(vm,{asChild:!0,container:a,children:n})})})};MQ.displayName=NO;var Lh="PopoverContent",IQ=p.forwardRef((e,t)=>{const r=Jke(Lh,e.__scopePopover),{forceMount:n=r.forceMount,...a}=e,i=hd(Lh,e.__scopePopover);return s.jsx(Jn,{present:n||i.open,children:i.modal?s.jsx(eCe,{...a,ref:t}):s.jsx(tCe,{...a,ref:t})})});IQ.displayName=Lh;var eCe=p.forwardRef((e,t)=>{const r=hd(Lh,e.__scopePopover),n=p.useRef(null),a=Ft(t,n),i=p.useRef(!1);return p.useEffect(()=>{const o=n.current;if(o)return rN(o)},[]),s.jsx(wv,{as:$o,allowPinchZoom:!0,children:s.jsx(RQ,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$e(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),i.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:$e(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:$e(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),tCe=p.forwardRef((e,t)=>{const r=hd(Lh,e.__scopePopover),n=p.useRef(!1),a=p.useRef(!1);return s.jsx(RQ,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((d=r.triggerRef.current)==null?void 0:d.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),RQ=p.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...f}=e,h=hd(Lh,r),m=Bv(r);return eN(),s.jsx(jv,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(xm,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:s.jsx(p2,{"data-state":LQ(h.open),role:"dialog",id:h.contentId,...m,...f,ref:t,style:{...f.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)"}})})})}),$Q="PopoverClose",rCe=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=hd($Q,r);return s.jsx(Ke.button,{type:"button",...n,ref:t,onClick:$e(e.onClick,()=>a.onOpenChange(!1))})});rCe.displayName=$Q;var nCe="PopoverArrow",sCe=p.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,a=Bv(r);return s.jsx(g2,{...a,...n,ref:t})});sCe.displayName=nCe;function LQ(e){return e?"open":"closed"}var aCe=EQ,iCe=DQ,oCe=MQ,FQ=IQ;const BQ=aCe,UQ=iCe,SO=p.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},a)=>s.jsx(oCe,{children:s.jsx(FQ,{ref:a,align:t,sideOffset:r,className:Oe("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]:sli
677de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));SO.displayName=FQ.displayName;function lCe(){const[e,t]=p.useState(""),[r,n]=p.useState(null),[a,i]=p.useState(!1),[o,l]=p.useState(!1),[c,d]=p.useState("upcoming"),[u,f]=p.useState(!1),[h,m]=p.useState(void 0),[g,x]=p.useState(!1),{timeZone:v}=J2(),[b,y]=p.useState("list"),[j,w]=p.useState("week"),[N,S]=p.useState(new Date),[k,T]=p.useState(v),[C,E]=p.useState("user"),P=["admin","org_manager","team_manager","team_member"].includes(C),[_,I]=p.useState({teams:[],hosts:[],eventTypes:[],statuses:[],inviteEmails:[],dateRange:{}}),[F,H]=p.useState(!1),[W,z]=p.useState("all"),{data:R=[],isLoading:q}=tO();p.useEffect(()=>{const Ne=_.teams.length>0||_.hosts.length>0||_.eventTypes.length>0||_.statuses.length>0||_.inviteEmails.length>0||!!_.dateRange.from||!!_.dateRange.to;H(Ne)},[_]),p.useEffect(()=>{T(v)},[v]);const V=()=>{l(!0)},se=Ne=>{n(Ne),i(!0)},oe=Ne=>{n(Ne),l(!0)},_e=()=>{f(!0)},U=()=>{f(!1)},M=()=>{const Ne=h?{from:h.from,to:h.to}:{};I(Re=>({...Re,dateRange:Ne})),f(!1)},G=()=>{I({teams:[],hosts:[],eventTypes:[],statuses:[],inviteEmails:[],dateRange:{}}),m(void 0),f(!1)},K=Ne=>{m(Ne)},je=new Date,ae=Hs(je),Ce=(Ne=>Ne.filter(Re=>{if(W!=="all"&&(Re.calendarType||"local")!==W||!(e===""||Re.title.toLowerCase().includes(e.toLowerCase())||Re.description&&Re.description.toLowerCase().includes(e.toLowerCase())))return!1;const Jr=new Date(Re.startTime),be=new Date(Re.endTime);return!(_.dateRange.from&&wu(be,Hs(_.dateRange.from))||_.dateRange.to&&Bc(Jr,V2(_.dateRange.to))||_.eventTypes.length>0&&!_.eventTypes.includes(Re.calendarType||"local"))}))(R),B=Ce.filter(Ne=>{const Re=new Date(Ne.startTime);return Bc(Re,je)||WS(Hs(Re),ae)}),me=Ce.filter(Ne=>{const Re=new Date(Ne.endTime);return wu(Re,je)&&!WS(Hs(Re),ae)}),ne=Ce.filter(Ne=>{const Re=new Date(Ne.startTime);return Bc(Re,je)||WS(Hs(Re),ae)?Ne.title.toLowerCase().includes("tentative")||Ne.title.toLowerCase().includes("pending")||Ne.description&&(Ne.description.toLowerCase().includes("tentative")||Ne.description.toLowerCase().includes("pending")||Ne.description.toLowerCase().includes("awaiting confirmation")):!1}),Be=Ne=>{const Re={};return Ne.forEach(or=>{const Jr=new Date(or.startTime).toDateString();Re[Jr]||(Re[Jr]=[]),Re[Jr].push(or)}),{grouped:Re,sortedDates:Object.keys(Re).sort((or,Jr)=>new Date(or).getTime()-new Date(Jr).getTime())}},{grouped:lt,sortedDates:ct}=Be(B),{grouped:Y,sortedDates:J}=Be(ne),{grouped:le,sortedDates:Le}=Be(me),L=[...Le].reverse(),he=Ne=>{switch(Ne){case"google":return"Google Calendar";case"outlook":return"Outlook Calendar";case"ical":return"iCalendar";default:return"Local Calendar"}},Me=Ne=>{switch(Ne){case"google":return"bg-blue-100 text-primary";case"outlook":return"bg-purple-100 text-purple-700";case"ical":return"bg-amber-100 text-amber-700";default:return"bg-green-100 text-green-700"}};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:V}),s.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-white dark:bg-slate-800",children:[s.jsx("div",{className:"border-b border-neutral-200 dark:border-slate-700 px-4 md:px-8 py-5 bg-white dark:bg-slate-800",children:s.jsx("div",{className:"max-w-6xl",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl md:text-2xl font-semibold text-neutral-900 dark:text-slate-100",children:"Scheduled Events"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400 mt-1",children:"View and manage all your upcoming, pending, and past events."})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs(_Q,{type:"single",value:b,onValueChange:Ne=>Ne&&y(Ne),className:"border border-neutral-200 dark:border-slate-600 rounded-md",children:[s.jsxs(VT,{value:"list","aria-label":"List view",className:"gap-1.5 h-9 px-3",children:[s.jsx(Moe,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden md:inline text-sm",children:"List"})]}),s.jsxs(VT,{value:"calendar","aria-label":"Calendar view",className:"gap-1.5 h-9 px-3",children:[s.jsx(Ei,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden md:inline text-sm",children:"Calendar"})]})]}),s.jsxs(D,{onClick:V,className:"gap-2 h-9",children:[s.jsx(Sr,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden sm:inline",children:"Create Event"}),s.jsx("span",{className:"sm:hidden",children:"Create"})]})]})]})})}),s.jsx("div",{className:"border-b border-neutral-200 dark:border-slate-700 px-4 md:px-8 py-3 bg-neutral-50 dark:bg-slate-800/50",children:s.jsxs("div",{className:"max-w-6xl flex flex-wrap items-center gap-2",children:[s.jsxs(Xe,{value:W,onValueChange:Ne=>z(Ne),children:[s.jsx(Qe,{className:"w-[160px] h-9 text-sm",children:s.jsx(Je,{placeholder:"All Calendars"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"all",children:"All Calendars"}),s.jsx(Z,{value:"google",children:"Google Calendar"}),s.jsx(Z,{value:"outlook",children:"Outlook Calendar"}),s.jsx(Z,{value:"ical",children:"iCalendar"}),s.jsx(Z,{value:"local",children:"Local Calendar"})]})]}),s.jsxs(BQ,{open:g,onOpenChange:x,children:[s.jsx(UQ,{asChild:!0,children:s.jsxs(D,{variant:"outline",className:"gap-2 h-9 text-sm",children:[s.jsx(Gt,{className:"h-4 w-4"}),_.dateRange.from&&_.dateRange.to?s.jsxs(s.Fragment,{children:[pt(_.dateRange.from,"MMM d")," - ",pt(_.dateRange.to,"MMM d")]}):_.dateRange.from?s.jsxs(s.Fragment,{children:["From ",pt(_.dateRange.from,"MMM d")]}):_.dateRange.to?s.jsxs(s.Fragment,{children:["Until ",pt(_.dateRange.to,"MMM d")]}):s.jsx("span",{children:"Date range"}),(_.dateRange.from||_.dateRange.to)&&s.jsxs(D,{variant:"ghost",size:"icon",className:"h-5 w-5 p-0 ml-1",onClick:Ne=>{Ne.stopPropagation(),I(Re=>({...Re,dateRange:{}})),m(void 0)},children:[s.jsx(Vn,{className:"h-3.5 w-3.5"}),s.jsx("span",{className:"sr-only",children:"Clear date range"})]})]})}),s.jsxs(SO,{className:"w-auto p-0",align:"start",children:[s.jsx(PN,{mode:"range",selected:{from:(h==null?void 0:h.from)||_.dateRange.from,to:(h==null?void 0:h.to)||_.dateRange.to},onSelect:K,initialFocus:!0,numberOfMonths:2}),s.jsxs("div",{className:"flex items-center justify-end gap-2 p-3 border-t",children:[s.jsx(D,{variant:"outline",size:"sm",onClick:()=>{m(void 0),x(!1)},children:"Cancel"}),s.jsx(D,{size:"sm",onClick:()=>{const Ne=h?{from:h.from,to:h.to}:{};I(Re=>({...Re,dateRange:Ne})),x(!1)},children:"Apply"})]})]})]}),s.jsxs(D,{variant:F?"default":"outline",onClick:_e,className:"gap-2 h-9 text-sm",children:[s.jsx(DE,{className:"h-4 w-4"}),s.jsx("span",{children:"Filter"}),F&&s.jsx(pe,{className:"ml-1 bg-white text-primary",variant:"outline",children:Object.values(_).flat().filter(
677Boolean).length})]}),s.jsx("div",{className:"flex-1"}),s.jsxs("div",{className:"relative w-full sm:w-auto",children:[s.jsx(jo,{className:"h-4 w-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-neutral-400"}),s.jsx(ie,{type:"text",placeholder:"Search events...",className:"pl-10 h-9 text-sm w-full sm:w-56 lg:w-64",value:e,onChange:Ne=>t(Ne.target.value)})]})]})}),b==="list"?s.jsx("div",{className:"border-b border-neutral-200 dark:border-slate-700 bg-white dark:bg-slate-800 px-4 md:px-8",children:s.jsx("div",{className:"max-w-6xl",children:s.jsx(Br,{value:c,onValueChange:d,className:"w-full",children:s.jsxs(Hr,{className:"grid w-full max-w-sm grid-cols-3 my-3",children:[s.jsxs(We,{value:"upcoming",className:"relative text-sm",children:["Upcoming",B.length>0&&s.jsx(pe,{className:"ml-2 text-xs",children:B.length})]}),s.jsxs(We,{value:"pending",className:"relative text-sm",children:["Pending",ne.length>0&&s.jsx(pe,{className:"ml-2 text-xs",children:ne.length})]}),s.jsxs(We,{value:"past",className:"relative text-sm",children:["Past",me.length>0&&s.jsx(pe,{className:"ml-2 text-xs",children:me.length})]})]})})})}):s.jsx(Uke,{currentDate:N,onDateChange:S,onViewChange:w,onTimeZoneChange:T,currentView:j,currentTimeZone:k}),s.jsx("div",{className:"flex-1 overflow-auto px-4 md:px-8 py-6 pb-20 md:pb-6","data-tutorial":"calendar-view",children:s.jsx("div",{className:"max-w-6xl",children:q?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-neutral-500 dark:text-slate-400",children:"Loading events..."})}):b==="calendar"?s.jsx(Lke,{currentDate:N,timeZone:k,onEventClick:se,currentView:j}):s.jsxs(Br,{value:c,className:"w-full",children:[s.jsx(Ve,{value:"upcoming",className:"mt-0",children:B.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[s.jsx(Lg,{className:"h-16 w-16 text-neutral-400 mb-2"}),s.jsx("h2",{className:"text-lg font-medium text-neutral-600 mb-1",children:"No upcoming events"}),s.jsx("p",{className:"text-neutral-500 mb-4",children:F?"No events match your filter criteria":"You don't have any upcoming events scheduled"}),s.jsxs(D,{onClick:V,children:[s.jsx(Sr,{className:"h-4 w-4 mr-1"}),"Create Event"]})]}):s.jsx("div",{className:"space-y-6",children:ct.map(Ne=>s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-lg font-semibold text-neutral-700 pb-2 border-b border-neutral-200",children:new Date(Ne).toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric",year:"numeric"})}),s.jsx("div",{className:"space-y-2",children:lt[Ne].map(Re=>s.jsx("div",{className:"p-4 border rounded-lg hover:bg-neutral-50 transition-colors cursor-pointer",onClick:()=>se(Re),children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-neutral-800",children:Re.title}),s.jsx("p",{className:"text-sm text-neutral-600 mt-1",children:Lb(Re.startTime,Re.endTime,Re.timezone||v)}),Re.location&&s.jsxs("p",{className:"text-sm text-neutral-600 mt-1 flex items-center",children:[Re.meetingUrl?s.jsx(ma,{className:"h-4 w-4 mr-1"}):s.jsx(Oo,{className:"h-4 w-4 mr-1"}),Re.location]})]}),s.jsx("div",{className:`px-2 py-1 rounded-full text-xs ${Me(Re.calendarType||"local")}`,children:he(Re.calendarType||"local")})]})},Re.id))})]},Ne))})}),s.jsx(Ve,{value:"pending",className:"mt-0",children:ne.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[s.jsx(Soe,{className:"h-16 w-16 text-neutral-400 mb-2"}),s.jsx("h2",{className:"text-lg font-medium text-neutral-600 mb-1",children:"No pending events"}),s.jsx("p",{className:"text-neutral-500 mb-4",children:F?"No events match your filter criteria":"You don't have any events awaiting confirmation"})]}):s.jsx("div",{className:"space-y-6",children:J.map(Ne=>s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-lg font-semibold text-neutral-700 pb-2 border-b border-neutral-200",children:new Date(Ne).toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric",year:"numeric"})}),s.jsx("div",{className:"space-y-2",children:Y[Ne].map(Re=>s.jsx("div",{className:"p-4 border border-amber-200 bg-amber-50 rounded-lg hover:bg-amber-100 transition-colors cursor-pointer",onClick:()=>se(Re),children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx("h3",{className:"font-medium text-neutral-800",children:Re.title}),s.jsx(pe,{variant:"outline",className:"ml-2 text-amber-600 bg-amber-100 border-amber-200",children:"Pending"})]}),s.jsx("p",{className:"text-sm text-neutral-600 mt-1",children:Lb(Re.startTime,Re.endTime,Re.timezone||v)}),Re.location&&s.jsxs("p",{className:"text-sm text-neutral-600 mt-1 flex items-center",children:[Re.meetingUrl?s.jsx(ma,{className:"h-4 w-4 mr-1"}):s.jsx(Oo,{className:"h-4 w-4 mr-1"}),Re.location]})]}),s.jsx("div",{className:`px-2 py-1 rounded-full text-xs ${Me(Re.calendarType||"local")}`,children:he(Re.calendarType||"local")})]})},Re.id))})]},Ne))})}),s.jsx(Ve,{value:"past",className:"mt-0",children:me.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[s.jsx(Eoe,{className:"h-16 w-16 text-neutral-400 mb-2"}),s.jsx("h2",{className:"text-lg font-medium text-neutral-600 mb-1",children:"No past events"}),s.jsx("p",{className:"text-neutral-500 mb-4",children:F?"No events match your filter criteria":"You don't have any past events in your history"})]}):s.jsx("div",{className:"space-y-6",children:L.map(Ne=>s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"text-lg font-semibold text-neutral-700 pb-2 border-b border-neutral-200",children:new Date(Ne).toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric",year:"numeric"})}),s.jsx("div",{className:"space-y-2",children:le[Ne].map(Re=>s.jsx("div",{className:"p-4 border border-neutral-200 bg-neutral-50 rounded-lg hover:bg-neutral-100 transition-colors cursor-pointer",onClick:()=>se(Re),children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-neutral-600",children:Re.title}),s.jsx("p",{className:"text-sm text-neutral-500 mt-1",children:Lb(Re.startTime,Re.endTime,Re.timezone||v)}),Re.location&&s.jsxs("p",{className:"text-sm text-neutral-500 mt-1 flex items-center",children:[Re.meetingUrl?s.jsx(ma,{className:"h-4 w-4 mr-1"}):s.jsx(Oo,{className:"h-4 w-4 mr-1"}),Re.location]})]}),s.jsx("div",{className:"px-2 py-1 rounded-full text-xs bg-neutral-200 text-neutral-700",children:he(Re.calendarType||"local")})]})},Re.id))})]},Ne))})})]})})})]}),s.jsx(W1e,{event:r,onClose:()=>i(!1),onEdit:oe,isOpen:a})]}),s.jsx(Ds,{onCreateEventClick:V}),s.jsx(Mn,{isOpen:o,onClose:()=>l(!1)}),s.jsx(Ot,{open:u,onOpenChange:U,children:s.jsxs(kt,{className:"sm:max-w-md",children:[s.jsx(Ct,{children:s.jsx(Tt,{children:"Filter Events"})}),s.jsxs("div",{className:"py-4 space-y-4",children:[P&&s.jsxs("div",{children:[s.jsx(ee,{className:"block mb-2",children:"Teams"}),s.jsxs(Xe,{children:[s.jsx(Qe,{className:"w-full",children:s.jsx(Je,{placeholder:"All Teams"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"all",children:"All Teams"}),s.jsx(Z,{value:"1",children:"Marketing Team"}),s.jsx(Z,{value:"2",children:"Engineering Team"}),s.jsx(Z,{value:"3",children:"Sales Team"})]})]})]}),["admin","org_manager","team_manager"].includes(C)&&s.jsxs("div",{children:[s.jsx(ee,{className:"block mb-2",children:"Host"}),s.jsxs(Xe,{children:[s.jsx(Qe,{className:"w-full",children:s.jsx(Je,{placeholder:"All Hosts"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"all",children:"All Hosts"}),s.jsx(Z,{value:"1",children:"John Doe"}),s.jsx(Z,{value:"2",children:"Jane Smith"}),s.jsx(Z,{value:"3",children:"Sam Wilson"})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{className:"block mb-2",children:"Event Type"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:"eventTypeLocal"}),s.jsx("label",{htmlFor:"eventTypeLocal",className:"text-sm",children:"Local Calendar"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:"eventTypeGoogle"}),s.jsx("label",{htmlFor:"eventTypeGoogle",className:"text-sm",children:"Google Calendar"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:"eventTypeOutlook"}),s.jsx("label",{htmlFor:"eventTypeOutlook",className:"text-sm",children:"Outlook"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:"eventTypeIcal"}),s.jsx("label",{htmlFor:"eventTypeIcal",className:"text-sm",children:"iCalendar"})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{className:"block mb-2",children:"Status"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:"statusActive"}),s.jsx("label",{htmlFor:"statusActive",className:"text-sm",children:"Active"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:"statusCancelled"}),s.jsx("label",{htmlFor:"statusCancelled",className:"text-sm",children:"Cancelled"})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"inviteEmail",className:"block mb-2",children:"Invite Email"}),s.jsx(ie,{id:"inviteEmail",placeholder:"[email protected]",className:"w-full"})]})]}),s.jsxs(Bt,{className:"flex justify-between sm:justify-between",children:[s.jsx(D,{variant:"outline",onClick:G,children:"Reset"}),s.jsx(D,{type:"submit",onClick:M,children:"Apply Filters"})]})]})})]})}var kO="Switch",[cCe,IZe]=Is(kO),[dCe,uCe]=cCe(kO),zQ=p.forwardRef((e,t)=>
677{const{__scopeSwitch:r,name:n,checked:a,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:d,form:u,...f}=e,[h,m]=p.useState(null),g=Ft(t,j=>m(j)),x=p.useRef(!1),v=h?u||!!h.closest("form"):!0,[b=!1,y]=xs({prop:a,defaultProp:i,onChange:d});return s.jsxs(dCe,{scope:r,checked:b,disabled:l,children:[s.jsx(Ke.button,{type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":HQ(b),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:g,onClick:$e(e.onClick,j=>{y(w=>!w),v&&(x.current=j.isPropagationStopped(),x.current||j.stopPropagation())})}),v&&s.jsx(fCe,{control:h,bubbles:!x.current,name:n,value:c,checked:b,required:o,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})});zQ.displayName=kO;var WQ="SwitchThumb",VQ=p.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,a=uCe(WQ,r);return s.jsx(Ke.span,{"data-state":HQ(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})});VQ.displayName=WQ;var fCe=e=>{const{control:t,checked:r,bubbles:n=!0,...a}=e,i=p.useRef(null),o=mN(r),l=iN(t);return p.useEffect(()=>{const c=i.current,d=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(d,"checked").set;if(o!==r&&f){const h=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(h)}},[o,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function HQ(e){return e?"checked":"unchecked"}var qQ=zQ,hCe=VQ;const gr=p.forwardRef(({className:e,...t},r)=>s.jsx(qQ,{className:Oe("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors 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 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:r,children:s.jsx(hCe,{className:Oe("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")})}));gr.displayName=qQ.displayName;const mCe=[{value:"text",label:"Text Input"},{value:"textarea",label:"Long Text"},{value:"dropdown",label:"Dropdown"},{value:"radio",label:"Radio Buttons"},{value:"checkbox",label:"Checkboxes"},{value:"phone",label:"Phone Number"}];function pCe({bookingLinkId:e}){const{toast:t}=Qt(),[r,n]=p.useState([]),[a,i]=p.useState(!1),{data:o=[],isLoading:l}=ut({queryKey:[`/api/booking/${e}/questions`],enabled:!!e});p.useEffect(()=>{o.length>0&&n(o.map(v=>({...v,options:v.options||[]})))}
677,[o]);const c=dt({mutationFn:async v=>(await Ue("PUT",`/api/booking/${e}/questions-bulk`,v)).json(),onSuccess:()=>{t({title:"Success",description:"Custom questions saved"}),i(!1),Wt.invalidateQueries({queryKey:[`/api/booking/${e}/questions`]})},onError:v=>t({title:"Error",description:v.message,variant:"destructive"})}),d=()=>{n([...r,{label:"",type:"text",required:!1,options:[],orderIndex:r.length,enabled:!0}]),i(!0)},u=(v,b)=>{const y=[...r];y[v]={...y[v],...b},n(y),i(!0)},f=v=>{n(r.filter((b,y)=>y!==v)),i(!0)},h=v=>{const b=[...r];b[v].options=[...b[v].options,""],n(b),i(!0)},m=(v,b,y)=>{const j=[...r];j[v].options[b]=y,n(j),i(!0)},g=(v,b)=>{const y=[...r];y[v].options=y[v].options.filter((j,w)=>w!==b),n(y),i(!0)},x=v=>["dropdown","radio","checkbox"].includes(v);return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-sm text-neutral-800",children:"Custom Invitee Questions"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Add custom fields to your booking form"})]}),s.jsxs(D,{type:"button",variant:"outline",size:"sm",onClick:d,children:[s.jsx(Sr,{className:"h-3.5 w-3.5 mr-1"}),"Add Question"]})]}),l?s.jsx("div",{className:"h-16 bg-neutral-100 rounded animate-pulse"}):r.length===0?s.jsx("p",{className:"text-sm text-neutral-400 text-center py-4",children:'No custom questions yet. Click "Add Question" to get started.'}):s.jsx("div",{className:"space-y-3",children:r.map((v,b)=>s.jsx("div",{className:"border border-neutral-200 rounded-lg p-3 space-y-3",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(ME,{className:"h-5 w-5 text-neutral-300 mt-1 flex-shrink-0"}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ie,{value:v.label,onChange:y=>u(b,{label:y.target.value}),placeholder:"Question label",className:"flex-1"}),s.jsxs(Xe,{value:v.type,onValueChange:y=>u(b,{type:y,options:x(y)&&v.options.length===0?["Option 1"]:v.options}),children:[s.jsx(Qe,{className:"w-36",children:s.jsx(Je,{})}),s.jsx(Ze,{children:mCe.map(y=>s.jsx(Z,{value:y.value,children:y.label},y.value))})]})]}),x(v.type)&&s.jsxs("div",{className:"pl-4 space-y-1",children:[s.jsx(ee,{className:"text-xs text-muted-foreground",children:"Options"}),v.options.map((y,j)=>s.jsxs("div",{className:"flex gap-1",children:[s.jsx(ie,{value:y,onChange:w=>m(b,j,w.target.value),placeholder:`Option ${j+1}`,className:"h-8 text-sm"}),s.jsx(D,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>g(b,j),children:s.jsx(Pr,{className:"h-3 w-3 text-red-400"})})]},j)),s.jsxs(D,{type:"button",variant:"ghost",size:"sm",className:"text-xs",onClick:()=>h(b),children:[s.jsx(Sr,{className:"h-3 w-3 mr-1"}),"Add Option"]})]}),s.jsx("div",{className:"flex items-center gap-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gr,{checked:v.required,onCheckedChange:y=>u(b,{required:y})}),s.jsx("span",{className:"text-xs text-neutral-500",children:"Required"})]})})]}),s.jsx(D,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(b),className:"flex-shrink-0",children:s.jsx(Pr,{className:"h-4 w-4 text-red-400"})})]})},b))}),a&&s.jsx(D,{type:"button",size:"sm",onClick:()=>c.mutate({questions:r}),disabled:c.isPending,children:c.isPending?"Saving...":"Save Questions"})]})}const gCe=({slug:e,isTeamBooking:t,teamId:r,bookingLinkId:n})=>{const[a,i]=p.useState(""),[o,l]=p.useState(!0);return p.useEffect(()=>{(async()=>{try{l(!0);const d=window.location.hostname,u=window.location.port?`:${window.location.port}`:"",h=`${window.location.protocol}//${d}${u}`,m=await fetch(`/api/booking/${n}/url`);if(m.ok){const g=await m.json();i(g.url)}else{if(t&&r){const g=await fetch(`/api/teams/${r}/public-page-path`);if(g.ok){const x=await g.json();i(`${h}${x.path}/${e}`);return}}i(`${h}/booking/${e}`)}}catch(d){console.error("Error generating URL:",d);const u=window.location.hostname,f=window.location.port?`:${window.location.port}`:"",m=`${window.location.protocol}//${u}${f}`;if(t&&r)try{const g=await fetch(`/api/teams/${r}/public-page-path`);if(g.ok){const x=await g.json();i(`${m}${x.path}/${e}`);return}}catch{}i(`${m}/booking/${e}`)}finally{l(!1)}})()},[e,n,t,r]),o?s.jsx("span",{className:"truncate text-neutral-400",children:"Loading URL..."}):s.jsx("span",{className:"truncate",children:a})},xCe=Tde.omit({userId:!0}).extend({slug:Ae.string().min(3,{message:"Slug must be at least 3 characters"}).regex(/^[a-z0-9-]+$/,{message:"Slug can only contain lowercase letters, numbers, and hyphens"}),availability:Ae.object({hours:Ae.object({start:Ae.string(),end:Ae.string()}),days:Ae.array(Ae.string()),window:Ae.number().default(30)}),startTimeDate:Ae.date().optional(),endTimeDate:Ae.date().optional(),bufferBefore:Ae.number().default(0),bufferAfter:Ae.number().default(0),maxBookingsPerDay:Ae.number().default(0),leadTime:Ae.number().default(60),meetingType:Ae.string().default("in-person"),location:Ae.string().optional(),meetingUrl:Ae.string().optional(),startTimeIncrement:Ae.number().default(30),isHidden:Ae.boolean().default(!1),availabilityScheduleId:Ae.number().nullable().optional(),brandLogo:Ae.string().nullable().optional(),brandColor:Ae.string().nullable().optional(),removeBranding:Ae.boolean().default(!1),redirectUrl:Ae.string().nullable().optional(),confirmationMessage:Ae.string().nullable().optional(),confirmationCta:Ae.any().nullable().optional(),isOneOff:Ae.boolean().default(!1),isExpired:Ae.boolean().default(!1),requirePayment:Ae.boolean().default(!1),price:Ae.number().nullable().optional(),currency:Ae.string().default("usd"),autoCreateMeetLink:Ae.boolean().default(!1),maxBookingsPerWeek:Ae.number().default(0),maxBookingsPerMonth:Ae.number().default(0),requiresConfirmation:Ae.boolean().default(!1),maxSeats:Ae.number().default(0),allowRecurring:Ae.boolean().default(!1),recurringOptions:Ae.any().default({maxOccurrences:12,frequencies:["weekly"]}),roundRobinGroups:Ae.any().default([]),isCollective:Ae.boolean().default(!1),assignmentMethod:Ae.string().default("round-robin"),teamMemberWeights:Ae.any().default({}),collectiveMemberIds:Ae.array(Ae.number()).default([]),rotatingMemberIds:Ae.array(Ae.number()).default([]),teamId:Ae.number().nullable().optional(),teamMemberIds:Ae.array(Ae.number()).default([]),isTeamBooking:Ae.boolean().default(!1)});function vCe({bookingLinkId:e}){const{toast:t}=Qt(),{data:r}=ut({queryKey:[`/api/booking/${e}/embed`]}),n=(a,i)=>{navigator.clipboard.writeText(a),t({title:"Copied",description:`${i} embed code copied to clipboard`})};return r?s.jsxs("div",{children:[s.jsxs("h3",{className:"font-medium text-sm text-neutral-800 mb-3 flex items-center",children:[s.jsx(gW,{className:"h-4 w-4 mr-2"}),"Embed Code"]}
677),s.jsxs(Br,{defaultValue:"inline",className:"w-full",children:[s.jsxs(Hr,{className:"grid w-full grid-cols-3",children:[s.jsx(We,{value:"inline",children:"Inline"}),s.jsx(We,{value:"popup-widget",children:"Popup Widget"}),s.jsx(We,{value:"popup-link",children:"Popup Link"})]}),s.jsxs(Ve,{value:"inline",className:"space-y-2",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Embed the booking form directly in your webpage."}),s.jsxs("div",{className:"relative",children:[s.jsx("pre",{className:"bg-neutral-50 p-3 rounded text-xs overflow-x-auto border max-h-32",children:r.inlineEmbed}),s.jsx(D,{type:"button",size:"sm",variant:"outline",className:"absolute top-2 right-2",onClick:()=>n(r.inlineEmbed,"Inline"),children:s.jsx(ea,{className:"h-3 w-3"})})]})]}),s.jsxs(Ve,{value:"popup-widget",className:"space-y-2",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Add a floating button that opens the booking form in a popup."}),s.jsxs("div",{className:"relative",children:[s.jsx("pre",{className:"bg-neutral-50 p-3 rounded text-xs overflow-x-auto border max-h-32",children:r.popupWidget}),s.jsx(D,{type:"button",size:"sm",variant:"outline",className:"absolute top-2 right-2",onClick:()=>n(r.popupWidget,"Popup Widget"),children:s.jsx(ea,{className:"h-3 w-3"})})]})]}),s.jsxs(Ve,{value:"popup-link",className:"space-y-2",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Add a text link that opens the booking form in a popup."}),s.jsxs("div",{className:"relative",children:[s.jsx("pre",{className:"bg-neutral-50 p-3 rounded text-xs overflow-x-auto border max-h-32",children:r.popupLink}),s.jsx(D,{type:"button",size:"sm",variant:"outline",className:"absolute top-2 right-2",onClick:()=>n(r.popupLink,"Popup Link"),children:s.jsx(ea,{className:"h-3 w-3"})})]})]})]})]}):null}function yCe({bookingLinkId:e}){const{data:t}=ut({queryKey:[`/api/qr-code/booking-link/${e}`]});if(!t)return null;const r=`https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(t.bookingUrl)}`,n=()=>{const a=document.createElement("a");a.href=r,a.download=`qr-${t.bookingLinkTitle.replace(/\s+/g,"-").toLowerCase()}.png`,a.click()};return s.jsxs("div",{className:"space-y-3",children:[s.jsxs("h3",{className:"font-medium text-sm text-neutral-800 flex items-center",children:[s.jsx(Boe,{className:"h-4 w-4 mr-2"}),"QR Code"]}),s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"border rounded-lg p-2 bg-white",children:s.jsx("img",{src:r,alt:"Booking link QR code",className:"w-[150px] h-[150px]"})}),s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Share this QR code so people can scan and book directly."}),s.jsx("p",{className:"text-xs font-mono text-muted-foreground break-all",children:t.bookingUrl}),s.jsxs(D,{type:"button",size:"sm",variant:"outline",onClick:n,children:[s.jsx(Coe,{className:"h-3 w-3 mr-1"}),"Download QR"]})]})]})]})}function bCe(){const[e,t]=p.useState(!1),[r,n]=p.useState(!1),[a,i]=p.useState(null),[o,l]=p.useState("in-person"),{toast:c}=Qt(),{data:d=[],isLoading:u}=ut({queryKey:["/api/booking"]});p.useEffect(()=>{if(u)return;const M=new URLSearchParams(window.location.search);M.get("create")==="true"&&(t(!0),window.history.replaceState({},"","/booking"));const G=M.get("edit");if(G&&d.length>0){const K=d.find(je=>je.id===parseInt(G,10));K&&(i(K),t(!0)),window.history.replaceState({},"","/booking")}},[u,d]);const{data:f=[]}=ut({queryKey:["/api/integrations"]}),{data:h=[]}=ut({queryKey:["/api/availability-schedules"]}),m=f.some(M=>M.type==="zoom"&&M.isConnected),g=f.some(M=>M.type==="google"&&M.isConnected),{data:x}=ut({queryKey:["/api/check-stripe-config"]}),v=(x==null?void 0:x.isStripeEnabled)===!0,{user:b,isCompanyAdmin:y,isAdmin:j}=gn(),w=!!(b!=null&&b.teamId),N=y||j,S=w||N,[k,T]=p.useState((b==null?void 0:b.teamId)??null),{data:C=[]}=ut({queryKey:[`/api/organizations/${b==null?void 0:b.organizationId}/teams`],enabled:N&&!w&&!!(b!=null&&b.organizationId)}),{data:E=[]}=ut({queryKey:["/api/teams"],enabled:j&&!w}),P=j&&!w?E:C,{data:_=[]}=ut({queryKey:[`/api/teams/${k}/users`],enabled:!!k}),{data:I}=ut({queryKey:[`/api/stripe/subscriptions/user/${b==null?void 0:b.id}`],enabled:!!(b!=null&&b.id)&&v}),F=!!(b!=null&&b.hasFreeAccess||I!=null&&I.plan&&I.plan!=="FREE"&&(I.status==="ACTIVE"||I.status==="TRIALING")),H=dt
677({mutationFn:async M=>{const G=a?"PUT":"POST",K=a?`/api/booking/${a.id}`:"/api/booking";return(await Ue(G,K,M)).json()},onSuccess:()=>{c({title:"Success",description:a?"Booking link updated successfully":"Booking link created successfully"}),t(!1),i(null),Wt.invalidateQueries({queryKey:["/api/booking"]})},onError:M=>{c({title:"Error",description:M instanceof Error?M.message:"Failed to save booking link",variant:"destructive"})}}),W=dt({mutationFn:async M=>(await Ue("DELETE",`/api/booking/${M}`,null)).json(),onSuccess:()=>{c({title:"Success",description:"Booking link deleted successfully"}),Wt.invalidateQueries({queryKey:["/api/booking"]})},onError:M=>{c({title:"Error",description:M instanceof Error?M.message:"Failed to delete booking link",variant:"destructive"})}});J2();const z=new Date,R=new Date(z);R.setHours(9,0,0,0);const q=new Date(z);q.setHours(17,0,0,0);const V=Lu({resolver:_m(xCe),defaultValues:{slug:"",title:"",description:"",duration:30,availability:{window:30,days:["1","2","3","4","5"],hours:{start:"09:00",end:"17:00"}},startTimeDate:R,endTimeDate:q,bufferBefore:0,bufferAfter:0,maxBookingsPerDay:0,leadTime:60,meetingType:"in-person",location:"",meetingUrl:"",startTimeIncrement:30,isHidden:!1,availabilityScheduleId:null,brandLogo:null,brandColor:null,removeBranding:!1,redirectUrl:null,confirmationMessage:null,confirmationCta:null,isOneOff:!1,isExpired:!1,requirePayment:!1,price:null,currency:"usd",autoCreateMeetLink:!1,maxBookingsPerWeek:0,maxBookingsPerMonth:0,requiresConfirmation:!1,maxSeats:0,allowRecurring:!1,recurringOptions:{maxOccurrences:12,frequencies:["weekly"]},roundRobinGroups:[],isCollective:!1,assignmentMethod:"round-robin",teamMemberWeights:{},collectiveMemberIds:[],rotatingMemberIds:[],teamId:null,teamMemberIds:[],isTeamBooking:!1}}),se=async M=>{if(M.meetingType==="zoom"&&m)try{return{...M,meetingType:"zoom"}}catch(G){return console.error("Error setting up Zoom meeting:",G),c({title:"Warning",description:"Could not set up Zoom integration. Using in-person meeting instead.",variant:"destructive"}),{...M,meetingType:"in-person"}}return M},oe=async M=>{const{startTimeDate:G,endTimeDate:K,...je}=M,ae=await se(je);H.mutate(ae)},_e=()=>{n(!0)},U=async M=>{try{const G=await fetch(`/api/booking/${M}/url`,{credentials:"include"});if(!G.ok)throw new Error("Could not resolve booking URL");const{url:K}=await G.json();await navigator.clipboard.writeText(K),c({title:"Link Copied",description:"Booking link copied to clipboard"})}catch(G){console.error("Error copying booking link:",G),c({title:"Error",description:"Could not copy booking link",variant:"destructive"})}};return p.useEffect(()=>{if(e&&a){const M=a.availability&&typeof a.availability=="object"?a.availability:{hours:{start:"09:00",end:"17:00"},days:["1","2","3","4","5"],window:30},G=a.meetingType||"in-person";l(G),V.reset({...a,meetingType:G,startTimeDate:z4(M.hours.start,"HH:mm",new Date),endTimeDate:z4(M.hours.end,"HH:mm",new Date),availability:M,bufferBefore:a.bufferBefore??0,bufferAfter:a.bufferAfter??0,maxBookingsPerDay:a.maxBookingsPerDay??0,leadTime:a.leadTime??60,duration:a.duration,startTimeIncrement:a.startTimeIncrement??30,isHidden:a.isHidden??!1,availabilityScheduleId:a.availabilityScheduleId??null})}else e||(V.reset(),i(null),l("in-person"))},[e,a,V]),s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:_e}),s.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-white dark:bg-slate-800",children:[s.jsx("div",{className:"border-b border-neutral-200 dark:border-slate-700 px-4 md:px-8 py-5 bg-white dark:bg-slate-800",children:s.jsxs("div",{className:"max-w-6xl flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl md:text-2xl font-semibold text-neutral-900 dark:text-slate-100",children:"Booking Links"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400 mt-1",children:"Create and manage booking links with detailed availability and scheduling rules."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(D,{variant:"outline",onClick:async()=>{try{const M=await fetch("/api/user/public-page-path");if(M.ok){const G=await M.json();window.open(G.path,"_blank")}}catch(M){console.error("Failed to get public page path",M)}},children:[s.jsx(Zr,{className:"h-4 w-4 mr-2"}),s.jsx("span",{children:"View Public Page"})]}),s.jsxs(D,{onClick:()=>t(!0),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),s.jsx("span",{children:"Create Booking Link"})]})]})]})}),s.jsx("div",{className:"flex-1 overflow-auto px-4 md:px-8 py-6 pb-20 md:pb-6",children:s.jsx("div",{className:"max-w-6xl",children:u?s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("p",{className:"text-neutral-500 dark:text-slate-400",children:"Loading booking links..."})}):d.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center",children:[s.jsx(Doe,{className:"h-16 w-16 text-neutral-400 dark:text-slate-500 mb-2"}),s.jsx("h2",{className:"text-lg font-medium text-neutral-600 dar
677k:text-slate-300 mb-1",children:"No booking links yet"}),s.jsx("p",{className:"text-neutral-500 dark:text-slate-400 mb-4",children:"Create booking links to allow others to schedule time with you"}),s.jsxs(D,{onClick:()=>t(!0),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),s.jsx("span",{children:"Create Booking Link"})]})]}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:d.map(M=>s.jsxs(X,{className:"overflow-hidden hover:shadow-md transition-shadow cursor-pointer",onClick:()=>{i(M),t(!0)},children:[s.jsx(ue,{className:"p-4 pb-2",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx(fe,{children:M.title}),s.jsx(ye,{className:"line-clamp-2",children:M.description||"No description"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[M.isHidden&&s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-neutral-100 text-neutral-500 font-medium",children:"Hidden"}),M.isOneOff&&s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium ${M.isExpired?"bg-red-100 text-red-600":"bg-blue-100 text-blue-600"}`,children:M.isExpired?"Expired":"One-Off"}),M.requiresConfirmation&&s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-amber-100 text-amber-700 font-medium",children:"Requires Confirmation"}),(M.maxSeats??0)>0&&s.jsxs("span",{className:"text-xs px-2 py-0.5 rounded-full bg-purple-100 text-purple-600 font-medium",children:[M.maxSeats," seats"]}),M.allowRecurring&&s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-100 text-green-700 font-medium",children:"Recurring"}),(M.roundRobinGroups||[]).length>0&&s.jsxs("span",{className:"text-xs px-2 py-0.5 rounded-full bg-indigo-100 text-indigo-600 font-medium",children:[M.roundRobinGroups.length," RR Groups"]}),s.jsx("span",{className:`text-xs font-medium ${M.isExpired?"text-red-600":"text-green-600"}`,children:M.isExpired?"Used":"Active"}),s.jsx(gr,{checked:!0,disabled:!0})]})]})}),s.jsxs(te,{className:"p-4 pt-2 space-y-3",children:[s.jsxs("div",{className:"flex items-center text-sm text-neutral-600",children:[s.jsx(dr,{className:"h-4 w-4 mr-2"}),s.jsxs("span",{children:[M.duration," minutes"]})]}),s.jsxs("div",{className:"flex items-center text-sm text-neutral-600",children:[M.meetingType==="zoom"||M.meetingType==="google-meet"?s.jsx(ma,{className:"h-4 w-4 mr-2"}):M.meetingType==="custom"?s.jsx(Ra,{className:"h-4 w-4 mr-2"}):s.jsx(Oo,{className:"h-4 w-4 mr-2"}),s.jsx("span",{children:M.meetingType==="zoom"?"Zoom Meeting":M.meetingType==="google-meet"?"Google Meet":M.meetingType==="custom"?"Custom Meeting URL":M.location||"In-Person"})]}),s.jsxs("div",{className:"flex flex-wrap items-center text-sm text-neutral-600",children:[s.jsx(Gt,{className:"h-4 w-4 mr-2"}),s.jsx("span",{children:M.availability&&typeof M.availability=="object"&&"days"in M.availability&&Array.isArray(M.availability.days)&&M.availability.days.length>0?M.availability.days.map(G=>{switch(G){case"0":return"Sun";case"1":return"Mon";case"2":return"Tue";case"3":return"Wed";case"4":return"Thu";case"5":return"Fri";case"6":return"Sat";default:return G}}).join(", "):"No available days"})]}),s.jsxs("div",{className:"flex items-center text-sm text-neutral-600",children:[s.jsx(dr,{className:"h-4 w-4 mr-2"}),s.jsx("span",{children:M.availability&&typeof M.availability=="object"&&"hours"in M.availability&&typeof M.availability.hours=="object"&&M.availability.hours!==null?`${M.availability.hours.start||"00:00"} - ${M.availability.hours.end||"00:00"}`:"No available hours"})]}),s.jsxs("div",{className:"border-t border-neutral-100 mt-2 pt-2",children:[s.jsx("p",{className:"text-xs text-neutral-500 mb-1",children:"Scheduling Rules:"}),s.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[s.jsxs("div",{className:"flex items-center text-xs text-neutral-600",children:[s.jsx(SW,{className:"h-3 w-3 mr-1"}),s.jsx("span",{children:(M.leadTime??0)>0?`${M.leadTime} min notice`:"No min notice"})]}),s.jsxs("div",{className:"flex items-center text-xs text-neutral-600",children:[s.jsx(N0,{className:"h-3 w-3 mr-1"}),s.jsx("span",{children:(M.maxBookingsPerDay??0)>0?`Max ${M.maxBookingsPerDay}/day`:"Unlimited bookings"})]}),((M.bufferBefore??0)>0||(M.bufferAfter??0)>0)&&s.jsxs("div",{className:"flex items-center text-xs text-neutral-600 col-span-2",children:[s.jsx(jW,{className:"h-3 w-3 mr-1"}),s.jsx("span",{children:(M.bufferBefore??0)>0&&(M.bufferAfter??0)>0?`${M.bufferBefore??0}min before / ${M.bufferAfter??0}min after`:(M.bufferBefore??0)>0?`${M.bufferBefore??0}min buffer before`:`${M.bufferAfter??0}min buffer after`})]})]})]}),s.jsxs("div",{className:"flex items-center text-sm text-primary break-all",children:[s.jsx(Ra,{className:"h-4 w-4 mr-2"}),s.jsx("span",{className:"truncate",children:s.jsx(gCe,{slug:M.slug,isTeamBooking:M.isTeamBooking,teamId:M.teamId,bookingLinkId:M.id})})]})]}),s.jsxs(ta,{className:"p-4 pt-0 flex justify-between gap-2",onClick:G=>G.stopPropagation(),children:[s.jsxs(D,{variant:"outline",size:"sm",onClick:()=>U(M.id),children:[s.jsx(ea,{className:"h-4 w-4 mr-1"}),"Copy Link"]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(D,{variant:"outline",size:"sm",onClick:()=>{i(M),t(!0)},children:[s.jsx(FE,{className:"h-4 w-4 mr-1"}),"Edit"]}),s.jsxs(D,{variant:"outline",size:"sm",className:"text-red-600 hover:text-red-700 hover:bg-red-50",onClick:()=>
677W.mutate(M.id),disabled:W.isPending,children:[s.jsx(Pr,{className:"h-4 w-4 mr-1"}),"Delete"]})]})]})]},M.id))})})})]})]}),s.jsx(Ds,{onCreateEventClick:_e}),s.jsx(Ot,{open:e,onOpenChange:t,children:s.jsxs(kt,{className:"w-[95vw] sm:max-w-[800px] max-h-[85vh] overflow-y-auto",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:a?"Edit Booking Link":"Create Booking Link"}),s.jsx($t,{children:a?"Update your booking link settings":"Set up your availability and booking preferences"})]}),s.jsx(RG,{...V,children:s.jsxs("form",{onSubmit:V.handleSubmit(oe),className:"space-y-5",children:[s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[s.jsx(Et,{control:V.control,name:"title",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Booking Title"}),s.jsx(wr,{children:s.jsx(ie,{placeholder:"e.g., Coffee Chat",...M})}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:V.control,name:"slug",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"URL Slug"}),s.jsx(wr,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("span",{className:"text-neutral-500 mr-1",children:"/booking/"}),s.jsx(ie,{placeholder:"coffee-chat",...M})]})}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:V.control,name:"duration",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Duration"}),s.jsxs(Xe,{value:M.value.toString(),onValueChange:G=>M.onChange(parseInt(G)),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select duration"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"15",children:"15 minutes"}),s.jsx(Z,{value:"30",children:"30 minutes"}),s.jsx(Z,{value:"45",children:"45 minutes"}),s.jsx(Z,{value:"60",children:"1 hour"}),s.jsx(Z,{value:"90",children:"1.5 hours"}),s.jsx(Z,{value:"120",children:"2 hours"})]})]}),s.jsx(Mr,{})]})})]}),s.jsx(Et,{control:V.control,name:"description",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Description"}),s.jsx(wr,{children:s.jsx(Es,{placeholder:"Describe the purpose of this meeting",className:"resize-none",rows:2,value:M.value||"",onChange:M.onChange,onBlur:M.onBlur,ref:M.ref})}),s.jsx(Mr,{})]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(gt,{children:"Meeting Type"}),s.jsxs(Xe,{value:o,onValueChange:M=>{l(M),V.setValue("meetingType",M),M==="in-person"?(V.setValue("meetingUrl",""),V.setValue("autoCreateMeetLink",!1)):M==="custom"?(V.setValue("location",""),V.setValue("autoCreateMeetLink",!1)):M==="zoom"?(V.setValue("location",""),V.setValue("meetingUrl",""),V.setValue("autoCreateMeetLink",!1)):M==="google-meet"&&(V.setValue("location",""),V.setValue("meetingUrl",""),V.setValue("autoCreateMeetLink",!0))},children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select meeting type"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"in-person",children:"In-Person"}),s.jsx(Z,{value:"custom",children:"Custom URL (Manual)"}),g&&s.jsx(Z,{value:"google-meet",children:"Google Meet"}),m&&s.jsx(Z,{value:"zoom",children:"Zoom Meeting"})]})]}),o==="zoom"&&!m&&s.jsx("p",{className:"text-red-500 text-sm mt-1",children:"Zoom integration not available. Please connect Zoom in Integrations."})]}),o==="in-person"&&s.jsx(Et,{control:V.control,name:"location",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Location"}),s.jsx(wr,{children:s.jsx(ie,{placeholder:"Add meeting location",value:M.value||"",onChange:M.onChange,onBlur:M.onBlur,ref:M.ref})}),s.jsx(Mr,{})]})}),o==="custom"&&s.jsx(Et,{control:V.control,name:"meetingUrl",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Meeting URL"}),s.jsx(wr,{children:s.jsx(ie,{placeholder:"Add meeting link",value:M.value||"",onChange:M.onChange,onBlur:M.onBlur,ref:M.ref})}),s.jsx(Mr,{})]})}),o==="zoom"&&m&&s.jsx("div",{className:"lg:col-span-2 text-sm text-neutral-600 bg-neutral-50 p-3 rounded-md border border-neutral-200",children:s.jsx("p",{children:"A Zoom meeting will be automatically created when someone books through this link."})}),o==="google-meet"&&g&&s.jsx("div",{className:"lg:col-span-2 text-sm text-neutral-600 bg-neutral-50 p-3 rounded-md border border-neutral-200",children:s.jsx("p",{children:"A Google Meet link will be automatically created when someone books through this link."})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[s.jsx(Et,{control:V.control,name:"availability.days",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Available Days"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:[{value:"1",label:"Mon"},{value:"2",label:"Tue"},{value:"3",label:"Wed"},{value:"4",label:"Thu"},{value:"5",label:"Fri"},{value:"6",label:"Sat"},{value:"0",label:"Sun"}].map(G=>s.jsxs(wt,{className:"flex items-center space-x-1",children:[s.jsx(wr,{children:s.jsx(Gn,{checked:M.value&&Array.isArray(M.value)&&M.value.includes(G.value),onCheckedChange:K=>{const je=M.value&&Array.isArray(M.value)?[...M.value]:[];K===!0?M.onChange([...je,G.value]):K===!1&&M.onChange(je.filter(ae=>ae!==G.value))}})}),s.jsx(gt,{className:"font-normal cursor-pointer",children:G.label})]},G.value))}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:V.control,name:"startTimeDate",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Start Time"}),s.jsx(wr,{children:s.jsx(ru,{selected:M.value,onChange:G=>{if(G){M.onChange(G);const K=pt(G,"HH:mm");V.setValue("availability.hours.start",K)}},showTimeSelect:!0,showTimeSelectOnly:!0,timeIntervals:15,timeFormat:"h:mm aa",dateFormat:"h:mm aa",wrapperClassName:"w-full",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:ring-offset-background"})}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:V.control,name:"endTimeDate",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"End Time"}),s.jsx(wr,{children:s.jsx(ru,{selected:M.value,onChange:G=>{if(G){M.onChange(G);const K=pt(G,"HH:mm");V.setValue("availability.hours.end",K)}},showTimeSelect:!0,showTimeSelectOnly:!0,timeIntervals:15,timeFormat:"h:mm aa",dateFormat:"h:mm aa",wrapperClassName:"w-full",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:ring-offset-background"})}),s.jsx(Mr,{})]})})]}),s.jsxs("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:[s.jsx("div",{className:"flex justify-between items-center mb-3",children:s.jsx("h3",{className:"font-medium text-sm text-neutral-800",children:"Scheduling Rules"})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(Et,{control:V.control,name:"leadTime",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Minimum Notice"}),s.jsxs(Xe,{value:(M.value??0).toString(),onValueChange:G=>M.onChange(parseInt(G)),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select minimum notice"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"0",children:"No minimum"}),s.jsx(Z,{value:"30",children:"30 minutes"}),s.jsx(Z,{value:"60",children:"1 hour"}),s.jsx(Z,{value:"120",children:"2 hours"}),s.jsx(Z,{value:"240",children:"4 hours"}),s.jsx(Z,{value:"480",children:"8 hours"}),s.jsx(Z,{value:"1440",children:"24 hours"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Minimum time required before a booking"}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:V.control,name:"maxBookingsPerDay",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Max Bookings Per Day"}),s.jsxs(Xe,{value:(M.value??0).toString(),onValueChange:G=>M.onChange(parseInt(G)),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select maximum bookings"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"0",children:"Unlimited"}),s.jsx(Z,{value:"1",children:"1 booking"}),s.jsx(Z,{value:"2",children:"2 bookings"}),s.jsx(Z,{value:"3",children:"3 bookings"}),s.jsx(Z,{value:"4",children:"4 bookings"}),s.jsx(Z,{value:"5",children:"5 bookings"}),s.jsx(Z,{value:"10",children:"10 bookings"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Maximum bookings per day (0 = unlimited)"}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:V.control,name:"bufferBefore",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Buffer Before"}),s.jsxs(Xe,{value:(M.value??0).toString(),onValueChange:G=>M.onChange(parseInt(G)),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select buffer time"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"0",children:"No buffer"}),s.jsx(Z,{value:"5",children:"5 minutes"}),s.jsx(Z,{value:"10",children:"10 minutes"}),s.jsx(Z,{value:"15",children:"15 minutes"}),s.jsx(Z,{value:"30",children:"30 minutes"}),s.jsx(Z,{value:"60",children:"1 hour"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Time buffer before meetings"}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:V.control,name:"bufferAfter",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Buffer After"}),s.jsxs(Xe,{value:(M.value??0).toString(),onValueChange:G=>M.onChange(parseInt(G)),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select buffer time"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"0",children:"No buffer"}),s.jsx(Z,{value:"5",children:"5 minutes"}),s.jsx(Z,{value:"10",children:"10 minutes"}),s.jsx(Z,{value:"15",children:"15 minutes"}),s.jsx(Z,{value:"30",children:"30 minutes"}),s.jsx(Z,{value:"60",children:"1 hour"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Time buffer after meetings"}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:V.control,name:"startTimeIncrement",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Start Time Increments"}),s.jsxs(Xe,{value:(M.value??30).toString(),onValueChange:G=>M.onChange(parseInt(G)),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select increment"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"5",children:"5 minutes"}),s.jsx(Z,{value:"10",children:"10 minutes"}),s.jsx(Z,{value:"15",children:"15 minutes"}),s.jsx(Z,{value:"20",children:"20 minutes"}),s.jsx(Z,{value:"30",children:"30 minutes"}),s.jsx(Z,{value:"60",children:"60 minutes"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Time between available start times"}),s.jsx(Mr,{})]})}),s.jsx(Et,{control:V.control,name:"isHidden",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Visibility"}),s.jsxs(Xe,{value:M.value?"hidden":"visible",onValueChange:G=>M.onChange(G==="hidden"),children:[s.jsx(Qe,{children:s.jsx(Je,{})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"visible",children:"Public"}),s.jsx(Z,{value:"hidden",children:"Hidden"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Hidden links are only accessible via direct URL"}),s.jsx(Mr,{})]})}),h.length>0&&s.jsx(Et,{control:V.control,name:"availabilityScheduleId",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Availability Schedule"}),s.jsxs(Xe,{value:M.value?M.value.toString():"default",onValueChange:G=>M.onChange(G==="default"?null:parseInt(G)),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Use default availability"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"default",children:"Use booking link availability"}),h.map(G=>s.jsxs(Z,{value:G.id.toString(),children:[G.name,G.isDefault?" (Default)":""]},G.id))]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Override with a named availability schedule"}),s.jsx(Mr,{})]})})]})]}),a&&s.jsx("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:s.jsx(pCe,{bookingLinkId:a.id})}),s.jsxs("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:[s.jsxs("h3",{className:"font-medium text-sm text-neutral-800 mb-3 flex items-center",children:[s.jsx(Loe,{className:"h-4 w-4 mr-2"}),"Branding & Customization"]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[s.jsx(Et,{control:V.control,name:"brandLogo",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Logo URL"}),s.jsx(wr,{children:s.jsx(ie,{placeholder:"https://example.com/logo.png",value:M.value||"",onChange:M.onChange})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Custom logo for your booking page"})]})}),s.jsx(Et,{control:V.control,name:"brandColor",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Brand Color"}),s.jsx(wr,{children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"color",value:M.value||"#4F46E5",onChange:G=>M.onChange(G.target.value),className:"w-10 h-10 rounded border border-input cursor-pointer"}),s.jsx(ie,{placeholder:"#4F46E5",value:M.value||"",onChange:M.onChange,className:"flex-1"})]})})]})}),F&&s.jsx(Et,{control:V.control,name:"removeBranding",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Remove Branding"}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsx(gr,{checked:M.value||!1,onCheckedChange:M.onChange}),s.jsx("span",{className:"text-sm text-muted-foreground",children:M.value?"SmartScheduler branding hidden":"SmartScheduler branding shown"})]})]})})]})]}),s.jsxs("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:[s.jsxs("h3",{className:"font-medium text-sm text-neutral-800 mb-3 flex items-center",children:[s.jsx(Zr,{className:"h-4 w-4 mr-2"}),"Post-Booking Settings"]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Et,{control:V.control,name:"redirectUrl",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Redirect URL (after booking)"}),s.jsx(wr,{children:s.jsx(ie,{placeholder:"https://example.com/thank-you",value:M.value||"",onChange:M.onChange})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Redirect invitees after they book"})]})}),s.jsx(Et,{control:V.control,name:"confirmationMessage",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Custom Confirmation Message"}),s.jsx(wr,{children:s.jsx(ie,{placeholder:"Thanks for booking! We'll see you soon.",value:M.value||"",onChange:M.onChange})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Shown on the confirmation page"})]})})]})]}),s.jsx("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.jsx(Et,{control:V.control,name:"isOneOff",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"One-Off Meeting"}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsx(gr,{checked:M.value||!1,onCheckedChange:M.onChange}),s.jsx("span",{className:"text-sm text-muted-foreground",children:M.value?"Expires after one booking":"Reusable link"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"One-off links automatically expire after a single booking"})]})})})}),s.jsxs("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:[s.jsxs("h3",{className:"font-medium text-sm text-neutral-800 mb-3 flex items-center",children:[s.jsx(NW,{className:"h-4 w-4 mr-2"}),"Booking Approval & Capacity"]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Et,{control:V.control,name:"requiresConfirmation",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Requires Confirmation"}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsx(gr,{checked:M.value||!1,onCheckedChange:M.onChange}),s.jsx("span",{className:"text-sm text-muted-foreground",children:M.value?"Bookings require your approval":"Bookings auto-confirmed"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:'When enabled, new bookings will be set to "pending" until you accept or decline them'})]})}),s.jsx(Et,{control:V.control,name:"maxSeats",render:({field:M})=>s.jsxs(wt,{children:[s.jsxs(gt,{className:"flex items-center gap-1",children:[s.jsx(ir,{className:"h-3.5 w-3.5"}),"Seats per Time Slot"]}),s.jsx(wr,{children:s.jsx(ie,{type:"number",min:0,max:1e3,placeholder:"0 = one-on-one (no seats)",value:M.value||"",onChange:G=>M.onChange(parseInt(G.target.value)||0)})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Set to 0 for one-on-one meetings. Set higher to allow multiple attendees per time slot (group bookings)."}),s.jsx(Mr,{})]})})]})]}),s.jsxs("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:[s.jsxs("h3",{className:"font-medium text-sm text-neutral-800 mb-3 flex items-center",children:[s.jsx(RE,{className:"h-4 w-4 mr-2"}),"Recurring Bookings"]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Et,{control:V.control,name:"allowRecurring",render:({field:M})=
677>s.jsxs(wt,{children:[s.jsx(gt,{children:"Allow Recurring Bookings"}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsx(gr,{checked:M.value||!1,onCheckedChange:M.onChange}),s.jsx("span",{className:"text-sm text-muted-foreground",children:M.value?"Bookers can schedule repeating appointments":"One-time bookings only"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"When enabled, bookers can choose to repeat their booking on a weekly, biweekly, or monthly basis"})]})}),V.watch("allowRecurring")&&s.jsx(Et,{control:V.control,name:"recurringOptions",render:({field:M})=>{const G=M.value||{maxOccurrences:12,frequencies:["weekly"]};return s.jsxs(wt,{children:[s.jsx(gt,{children:"Max Occurrences"}),s.jsx(wr,{children:s.jsx(ie,{type:"number",min:2,max:52,value:G.maxOccurrences||12,onChange:K=>M.onChange({...G,maxOccurrences:parseInt(K.target.value)||12})})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Maximum number of recurring instances a booker can create (2-52)"}),s.jsx(Mr,{})]})}})]})]}),g&&o!=="google-meet"&&s.jsx("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.jsx(Et,{control:V.control,name:"autoCreateMeetLink",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Google Meet Auto-Link"}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsx(gr,{checked:M.value||!1,onCheckedChange:M.onChange}),s.jsx("span",{className:"text-sm text-muted-foreground",children:M.value?"Auto-creates Meet link":"No auto Meet link"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"A Google Meet link is automatically generated when a booking is made."})]})})})}),v&&s.jsxs("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:[s.jsx("h4",{className:"text-sm font-medium mb-3",children:"Payment Collection"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Et,{control:V.control,name:"requirePayment",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Require Payment"}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsx(gr,{checked:M.value||!1,onCheckedChange:M.onChange}),s.jsx("span",{className:"text-sm text-muted-foreground",children:M.value?"Payment required":"Free booking"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Collect payment via Stripe before confirming the booking"})]})}),V.watch("requirePayment")&&s.jsxs(s.Fragment,{children:[s.jsx(Et,{control:V.control,name:"price",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Price (in cents)"}),s.jsx(wr,{children:s.jsx(ie,{type:"number",min:"50",placeholder:"e.g. 5000 for $50.00",value:M.value??"",onChange:G=>M.onChange(G.target.value?parseInt(G.target.value):null)})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Amount in cents (e.g. 5000 = $50.00)"})]})}),s.jsx(Et,{control:V.control,name:"currency",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Currency"}),s.jsx(wr,{children:s.jsxs("select",{className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",value:M.value||"usd",onChange:M.onChange,children:[s.jsx("option",{value:"usd",children:"USD"}),s.jsx("option",{value:"eur",children:"EUR"}),s.jsx("option",{value:"gbp",children:"GBP"}),s.jsx("option",{value:"cad",children:"CAD"}),s.jsx("option",{value:"aud",children:"AUD"})]})})]})})]})]})]}),s.jsxs("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:[s.jsx("h4",{className:"text-sm font-medium mb-3",children:"Booking Limits"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(Et,{control:V.control,name:"maxBookingsPerDay",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Per Day"}),s.jsx(wr,{children:s.jsx(ie,{type:"number",min:"0",placeholder:"0 = unlimited",value:M.value??0,onChange:G=>M.onChange(parseInt(G.target.value)||0)})})]})}),s.jsx(Et,{control:V.control,name:"maxBookingsPerWeek",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Per Week"}),s.jsx(wr,{children:s.jsx(ie,{type:"number",min:"0",placeholder:"0 = unlimited",value:M.value??0,onChange:G=>M.onChange(parseInt(G.target.value)||0)})})]})}),s.jsx(Et,{control:V.control,name:"maxBookingsPerMonth",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Per Month"}),s.jsx(wr,{children:s.jsx(ie,{type:"number",min:"0",placeholder:"0 = unlimited",value:M.value??0,onChange:G=>M.onChange(parseInt(G.target.value)||0)})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"0 = unlimited"})]})})]})]}),S&&s.jsxs("div",{className:"border-t border-neutral-200 pt-4 mt-4",children:[s.jsx("h4",{className:"text-sm font-medium mb-3",children:"Team Settings"}),s.jsx("div",{className:"mb-4",children:s.jsx(Et,{control:V.control,name:"isTeamBooking",render:({field:M})=>s.jsxs(wt,{className:"flex flex-row items-center justify-between rounded-lg border p-3 shadow-sm",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(gt,{children:"Enable Team Booking"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow this booking link to distribute meetings across team members"})]}),s.jsx(wr,{children:s.jsx(gr,{checked:M.value||!1,onCheckedChange:G=>{var K;if(M.onChange(G),G&&!V.getValues("teamId")&&(w||P.length>0)){const je=w?b==null?void 0:b.teamId:(K=P[0])==null?void 0:K.id;je&&(V.setValue("teamId",je),T(je))}}})})]})})}),V.watch("isTeamBooking")&&N&&!w&&P.length>0&&s.jsx("div",{className:"mb-4",children:s.jsx(Et,{control:V.control,name:"teamId",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Select Team"}),s.jsx(wr,{children:s.jsxs("select",{className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",value:M.value??"",onChange:G=>{const K=parseInt(G.target.value)||null;M.onChange(K),T(K),V.setValue("teamMemberIds",[]),V.setValue("collectiveMemberIds",[]),V.setValue("rotatingMemberIds",[])},children:[s.jsx("option",{value:"",children:"Select a team..."}),P.map(G=>s.jsx("option",{value:G.id,children:G.name},G.id))]})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Choose which team will handle bookings from this link"})]})})}),V.watch("isTeamBooking")&&(w||V.watch("teamId"))&&_.length>0&&s.jsx("div",{className:"mb-4 p-3 bg-neutral-50 dark:bg-neutral-900 rounded-lg border",children:s.jsx(Et,{control:V.control,name:"teamMemberIds",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Team Members in Rotation"}),s.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Select which team members should be included in the booking rotation. Leave empty to include all team members."}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 max-h-48 overflow-y-auto",children:_.map(G=>{var K;return s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:`member-${G.id}`,checked:((K=M.value)==null?void 0:K.includes(G.id))||!1,onCheckedChange:je=>{const ae=M.value||[];je?M.onChange([...ae,G.id]):M.onChange(ae.filter(de=>de!==G.id))}}),s.jsxs("label",{htmlFor:`member-${G.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:[G.displayName||G.username,s.jsxs("span",{className:"text-xs text-muted-foreground ml-1",children:["(",G.email,")"]})]})]},G.id)})})]})})}),V.watch("isTeamBooking")&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Et,{control:V.control,name:"assignmentMethod",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Assignment Method"}),s.jsx(wr,{children:s.jsxs("select",{className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",value:M.value||"round-robin",onChange:M.onChange,children:[s.jsx("option",{value:"round-robin",children:"Round Robin (weighted)"}),s.jsx("option",{value:"equal-distribution",children:"Equal Distribution"}),s.jsx("option",{value:"pooled",children:"Pooled (first available)"}),s.jsx("option",{value:"specific",children:"Specific (first member)"}),s.jsx("option",{value:"hybrid",children:"Hybrid (Collective + Rotating)"})]})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"How bookings are assigned to team members"})]})}),s.jsx(Et,{control:V.control,name:"isCollective",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{children:"Collective Event"}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsx(gr,{checked:M.value||!1,onCheckedChange:G=>{M.onChange(G),G&&V.getValues("assignmentMethod")!=="hybrid"&&V.setValue("assignmentMethod","hybrid")}}),s.jsx("span",{className:"text-sm text-muted-foreground",children:M.value?"All team members must attend":"Single assignee"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"When enabled, all selected team members must be available and will attend"})]})})]}),V.watch("isTeamBooking")&&V.watch("assignmentMethod")==="hybrid"&&s.jsxs("div",{className:"mt-4 p-4 bg-blue-50 dark:bg-blue-950 rounded-lg border border-blue-200 dark:border-blue-800",children:[s.jsx("h5",{className:"text-sm font-medium mb-2",children:"Hybrid Team Assignment"}),s.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Required members must ALL be available. One rotating member is assigned per booking via round-robin."}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Et,{control:V.control,name:"collectiveMemberIds",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{className:"text-xs font-medium",children:"Required Members (must all attend)"}),s.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"These members' calendars are intersected - all must be free"}),_.length>0?s.jsx("div",{className:"space-y-2 max-h-32 overflow-y-auto border rounded-md p-2 bg-white dark:bg-neutral-950",children:_.map(G=>{var K;return s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:`collective-${G.id}`,checked:((K=M.value)==null?void 0:K.includes(G.id))||!1,onCheckedChange:je=>{const ae=M.value||[];je?M.onChange([...ae,G.id]):M.onChange(ae.filter(de=>de!==G.id))}}),s.jsx("label",{htmlFor:`collective-${G.id}`,className:"text-xs font-medium leading-none",children:G.displayName||G.username})]},G.id)})}):s.jsx("p",{className:"text-xs text-muted-foreground italic",children:"No team members available"})]})}),s.jsx(Et,{control:V.control,name:"rotatingMemberIds",render:({field:M})=>s.jsxs(wt,{children:[s.jsx(gt,{className:"text-xs font-medium",children:"Rotating Members (one assigned per booking)"}),s.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"One member from this pool is assigned via weighted round-robin"}),_.length>0?s.jsx("div",{className:"space-y-2 max-h-32 overflow-y-auto border rounded-md p-2 bg-white dark:bg-neutral-950",children:_.map(G=>{var K;return s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:`rotating-${G.id}`,checked:((K=M.value)==null?void 0:K.includes(G.id))||!1,onCheckedChange:je=>{const ae=M.value||[];je?M.onChange([...ae,G.id]):M.onChange(ae.filter(de=>de!==G.id))}}),s.jsx("label",{htmlFor:`rotating-${G.id}`,className:"text-xs font-medium leading-none",children:G.displayName||G.username})]},G.id)})}):s.jsx("p",{className:"text-xs text-muted-foreground italic",children:"No team members available"})]})})]})]})]}),a&&s.jsxs("div",{className:"border-t border-neutral-200 pt-4 mt-4 space-y-4",children:[s.jsx(vCe,{bookingLinkId:a.id}),s.jsx("div",{className:"border-t border-neutral-200 pt-4",children:s.jsx(yCe,{bookingLinkId:a.id})})]}),s.jsxs(Bt,{className:"flex justify-end space-x-3 pt-4 border-t border-neutral-200",children:[s.jsx(D,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsx(D,{type:"submit",disabled:H.isPending,children:H.isPending?"Saving...":"Save"})]})]})})]})}),s.jsx(Mn,{isOpen:r,onClose:()=>n(!1)})]})}function jCe(){var b;const{data:e,isLoading:t}=OG(),{mutate:r,isPending:n}=AG(),a=DG(),[i,o]=p.useState(!0),[l,c]=p.useState(!0),[d,u]=p.useState([15]),[f,h]=p.useState(!1);p.useEffect(()=>{e&&(o(e.emailNotifications??!0),c(e.pushNotifications??!0),u(e.defaultReminders||[15]),h(!1))},[e]);const m=()=>{r({emailNotifications:i,pushNotifications:l,defaultReminders:d},{onSuccess:()=>{h(!1)}})},g=y=>{const j=parseInt(y,10);u([j]),h(!0)},x=()=>{o(!i),h(!0)},v=()=>{c(!l),h(!0)};return t?s.jsx("div",{children:"Loading settings..."}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Reminder Settings"}),s.jsx(ye,{children:"Configure how and when you would like to be reminded about upcoming events"})]}),s.jsxs(te,{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-sm font-medium",children:"Default Reminder Time"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"This will be used for all new events unless specified otherwise"}),s.jsxs(Xe,{value:((b=d[0])==null?void 0:b.toString())||"15",onValueChange:g,children:[s.jsx(Qe,{className:"w-full sm:w-[250px]",children:s.jsx(Je,{placeholder:"Select reminder time"})}),s.jsx(Ze,{children:a.map(y=>s.jsx(Z,{value:y.value.toString(),children:y.label},y.value))})]})]}),s.jsxs("div",{className:"space-y-4 pt-4 border-t border-neutral-200",children:[s.jsx("h3",{className:"text-sm font-medium",children:"Notification Methods"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:"emailN
677otifications",checked:i,onCheckedChange:x}),s.jsx(ee,{htmlFor:"emailNotifications",className:"cursor-pointer",children:"Email notifications"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:"pushNotifications",checked:l,onCheckedChange:v}),s.jsx(ee,{htmlFor:"pushNotifications",className:"cursor-pointer",children:"Push notifications"})]})]})]}),f&&s.jsx("div",{className:"pt-4 flex justify-end",children:s.jsx(D,{onClick:m,disabled:n,children:n?"Saving...":"Save Changes"})})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Reminder Examples"}),s.jsx(ye,{children:"Here's how your reminders will appear"})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsxs("div",{className:"p-4 border rounded-lg bg-neutral-50",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Email Notification Example"}),s.jsxs("div",{className:"border rounded bg-white p-3 text-sm",children:[s.jsx("p",{className:"font-medium",children:"Meeting Reminder: Team Standup"}),s.jsxs("p",{className:"text-neutral-600 mt-1",children:['Your meeting "Team Standup" is scheduled to start in ',OT(d[0]||15).toLowerCase(),"."]}),s.jsxs("p",{className:"text-neutral-600 mt-2",children:["Time: 9:00 - 10:00 AM",s.jsx("br",{}),"Location: Google Meet"]}),s.jsx("div",{className:"mt-3 pt-3 border-t border-neutral-200",children:s.jsx(D,{size:"sm",variant:"outline",children:"View Event"})})]})]}),s.jsxs("div",{className:"p-4 border rounded-lg bg-neutral-50",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Push Notification Example"}),s.jsxs("div",{className:"border rounded bg-white p-3 flex items-start space-x-3 text-sm",children:[s.jsx(Gt,{className:"h-5 w-5 text-primary mt-1"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Team Standup"}),s.jsxs("p",{className:"text-neutral-600",children:["Starts in ",OT(d[0]||15).toLowerCase()]})]})]})]})]})]})]})}function wCe(){const{data:e,isLoading:t}=OG(),{mutate:r,isPending:n}=AG(),[a,i]=p.useState("google"),[o,l]=p.useState("12h"),[c,d]=p.useState(!1);p.useEffect(()=>{e&&(i(e.defaultCalendar||"google"),l(e.timeFormat||"12h"),d(!1))},[e]);const u=()=>{r({defaultCalendar:a,timeFormat:o},{onSuccess:()=>{d(!1)}})};return t?s.jsx("div",{children:"Loading settings..."}):s.jsx("div",{className:"space-y-6",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Privacy & Display Settings"}),s.jsx(ye,{children:"Manage your calendar display preferences and privacy settings"})]}),s.jsxs(te,{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-sm font-medium",children:"Default Calendar"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Select which calendar to use as your primary calendar"}),s.jsxs(Xe,{value:a,onValueChange:f=>{i(f),d(!0)},children:[s.jsx(Qe,{className:"w-full sm:w-[250px]",children:s.jsx(Je,{placeholder:"Select default calendar"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"google",children:"Google Calendar"}),s.jsx(Z,{value:"outlook",children:"Outlook Calendar"}),s.jsx(Z,{value:"ical",children:"iCalendar"}),s.jsx(Z,{value:"local",children:"Local Calendar"})]})]})]}),s.jsxs("div",{className:"space-y-4 pt-4 border-t border-neutral-200",children:[s.jsx("h3",{className:"text-sm font-medium",children:"Time Format"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(D,{variant:o==="12h"?"default":"outline",className:"w-20",onClick:()=>{l("12h"),d(!0)},children:"12-hour"}),s.jsx(D,{variant:o==="24h"?"default":"outline",className:"w-20",onClick:()=>{l("24h"),d(!0)},children:"24-hour"})]}),s.jsxs("div",{className:"text-sm text-neutral-500 mt-2",children:["Example: ",o==="12h"?"3:30 PM":"15:30"]})]}),s.jsxs("div",{className:"space-y-4 pt-4 border-t border-neutral-200",children:[s.jsx("h3",{className:"text-sm font-medium",children:"Calendar Visibility"}),s.jsxs(Br,{defaultValue:"availability",children:[s.jsxs(Hr,{children:[s.jsx(We,{value:"availability",children:"Free/Busy Time"}),s.jsx(We,{value:"details",children:"Event Details"})]}),s.jsx(Ve,{value:"availability",className:"mt-4 space-y-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"free-busy-public",className:"font-medium",children:"Public Free/Busy"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Allow others to see your availability without event details"})]}),s.jsx(gr,{id:"free-busy-public"})]})}),s.jsxs(Ve,{value:"details",className:"mt-4 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"team-details",className:"font-medium",children:"Team Members"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Share event details with team members"})]}),s.jsx(gr,{id:"team-details",defaultChecked:!0})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"public-detail
677s",className:"font-medium",children:"Public Users"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Share event details with public users"})]}),s.jsx(gr,{id:"public-details"})]})]})]})]}),s.jsxs("div",{className:"space-y-4 pt-4 border-t border-neutral-200",children:[s.jsx("h3",{className:"text-sm font-medium",children:"Booking Page Privacy"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"show-available-slots",className:"font-medium",children:"Show available time slots"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Make your availability visible on booking pages"})]}),s.jsx(gr,{id:"show-available-slots",defaultChecked:!0})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"require-approval",className:"font-medium",children:"Require approval"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Review and approve booking requests"})]}),s.jsx(gr,{id:"require-approval"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"show-attendees",className:"font-medium",children:"Show attendee list"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Display other attendees on booking pages"})]}),s.jsx(gr,{id:"show-attendees"})]})]})]}),c&&s.jsx("div",{className:"pt-4 flex justify-end",children:s.jsx(D,{onClick:u,disabled:n,children:n?"Saving...":"Save Changes"})})]})]})})}function YQ(e,t){return function(){return e.apply(t,arguments)}}const{toString:NCe}=Object.prototype,{getPrototypeOf:CO}=Object,{iterator:EN,toStringTag:GQ}=Symbol,ON=(e=>t=>{const r=NCe.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Qi=e=>(e=e.toLowerCase(),t=>ON(t)===e),AN=e=>t=>typeof t===e,{isArray:Om}=Array,Fh=AN("undefined");function Uv(e){return e!==null&&!Fh(e)&&e.constructor!==null&&!Fh(e.constructor)&&ba(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const KQ=Qi("ArrayBuffer");function SCe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&KQ(e.buffer),t}const kCe=AN("string"),ba=AN("function"),QQ=AN("number"),zv=e=>e!==null&&typeof e=="object",CCe=e=>e===!0||e===!1,qb=e=>{if(ON(e)!=="object")return!1;const t=CO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(GQ in e)&&!(EN in e)},TCe=e=>{if(!zv(e)||Uv(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_Ce=Qi("Date"),PCe=Qi("File"),ECe=Qi("Blob"),OCe=Qi("FileList"),ACe=e=>zv(e)&&ba(e.pipe),DCe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ba(e.append)&&((t=ON(e))==="formdata"||t==="object"&&ba(e.toString)&&e.toString()==="[object FormData]"))},MCe=Qi("URLSearchParams"),[ICe,RCe,$Ce,LCe]=["ReadableStream","Request","Response","Headers"].map(Qi),FCe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Wv(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),Om(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(Uv(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let l;for(n=0;n<o;n++)l=i[n],t.call(null,e[l],l,e)}}function ZQ(e,t){if(Uv(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const $d=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,XQ=e=>!Fh(e)&&e!==$d;function HT(){const{caseless:e,skipUndefined:t}=XQ(this)&&this||{},r={},n=(a,i)=>{const o=e&&ZQ(r,i)||i;qb(r[o])&&qb(a)?r[o]=HT(r[o],a):qb(a)?r[o]=HT({},a):Om(a)?r[o]=a.slice():(!t||!Fh(a))&&(r[o]=a)};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Wv(arguments[a],n);return r}const BCe=(e,t,r,{allOwnKeys:n}={})=>(Wv(t,(a,i)=>{r&&ba(a)?Object.defineProperty(e,i,{value:YQ(a,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),UCe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zCe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,
vendor: 11,553 bytes, lines 677-678
677configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},WCe=(e,t,r,n)=>{let a,i,o;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!n||n(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=r!==!1&&CO(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},VCe=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},HCe=e=>{if(!e)return null;if(Om(e))return e;let t=e.length;if(!QQ(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},qCe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&CO(Uint8Array)),YCe=(e,t)=>{const n=(e&&e[EN]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},GCe=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},KCe=Qi("HTMLFormElement"),QCe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),FR=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),ZCe=Qi("RegExp"),JQ=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Wv(r,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(n[i]=o||a)}),Object.defineProperties(e,n)},XCe=e=>{JQ(e,(t,r)=>{if(ba(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ba(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},JCe=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return Om(e)?n(e):n(String(e).split(t)),r},eTe=()=>{},tTe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function rTe(e){return!!(e&&ba(e.append)&&e[GQ]==="FormData"&&e[EN])}const nTe=e=>{const t=new Array(10),r=(n,a)=>{if(zv(n)){if(t.indexOf(n)>=0)return;if(Uv(n))return n;if(!("toJSON"in n)){t[a]=n;const i=Om(n)?[]:{};return Wv(n,(o,l)=>{const c=r(o,a+1);!Fh(c)&&(i[l]=c)}),t[a]=void 0,i}}return n};return r(e,0)},sTe=Qi("AsyncFunction"),aTe=e=>e&&(zv(e)||ba(e))&&ba(e.then)&&ba(e.catch),eZ=((e,t)=>e?setImmediate:t?((r,n)=>($d.addEventListener("message",({source:a,data:i})=>{a===$d&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),$d.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ba($d.postMessage)),iTe=typeof queueMicrotask<"u"?queueMicrotask.bind($d):typeof process<"u"&&process.nextTick||eZ,oTe=e=>e!=null&&ba(e[EN]),ce={isArray:Om,isArrayBuffer:KQ,isBuffer:Uv,isFormData:DCe,isArrayBufferView:SCe,isString:kCe,isNumber:QQ,isBoolean:CCe,isObject:zv,isPlainObject:qb,isEmptyObject:TCe,isReadableStream:ICe,isRequest:RCe,isResponse:$Ce,isHeaders:LCe,isUndefined:Fh,isDate:_Ce,isFile:PCe,isBlob:ECe,isRegExp:ZCe,isFunction:ba,isStream:ACe,isURLSearchParams:MCe,isTypedArray:qCe,isFileList:OCe,forEach:Wv,merge:HT,extend:BCe,trim:FCe,stripBOM:UCe,inherits:zCe,toFlatObject:WCe,kindOf:ON,kindOfTest:Qi,endsWith:VCe,toArray:HCe,forEachEntry:YCe,matchAll:GCe,isHTMLForm:KCe,hasOwnProperty:FR,hasOwnProp:FR,reduceDescriptors:JQ,freezeMethods:XCe,toObjectSet:JCe,toCamelCase:QCe,noop:eTe,toFiniteNumber:tTe,findKey:ZQ,global:$d,isContextDefined:XQ,isSpecCompliantForm:rTe,toJSONObject:nTe,isAsyncFn:sTe,isThenable:aTe,setImmediate:eZ,asap:iTe,isIterable:oTe};class Pt extends Error{static from(t,r,n,a,i,o){const l=new Pt(t.message,r||t.code,n,a,i);return l.cause=t,l.name=t.name,o&&Object.assign(l,o),l}constructor(t,r,n,a,i){super(t),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ce.toJSONObject(this.config),code:this.code,status:this.status}}}Pt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Pt.ERR_BAD_OPTION="ERR_BAD_OPTION";Pt.ECONNABORTED="ECONNABORTED";Pt.ETIMEDOUT="ETIMEDOUT";Pt.ERR_NETWORK="ERR_NETWORK";Pt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Pt.ERR_DEPRECATED="ERR_DEPRECATED";Pt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Pt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Pt.ERR_CANCELED="ERR_CANCELED";Pt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Pt.ERR_INVALID_URL="ERR_INVALID_URL";const lTe=null;function qT(e){return ce.isPlainObject(e)||ce.isArray(e)}function tZ(e){return ce.endsWith(e,"[]")?e.slice(0,-2):e}function BR(e,t,r){return e?e.concat(t).map(function(a,i){return a=tZ(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function cTe(e){return ce.isArray(e)&&!e.some(qT)}const dTe=ce.toFlatObject(ce,{},null,function(t){return/^is[A-Z]/.test(t)});function DN(e,t,r){if(!ce.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=ce.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!ce.isUndefined(v[x])});const n=r.metaTokens,a=r.visitor||u,i=r.dots,o=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&ce.isSpecCompliantForm(t);if(!ce.isFunction(a))throw new TypeError("visitor must be a function");function d(g){if(g===null)return"";if(ce.isDate(g))return g.toISOString();if(ce.isBoolean(g))return g.toString();if(!c&&ce.isBlob(g))throw new Pt("Blob is not supported. Use a Buffer instead.");return ce.isArrayBuffer(g)||ce.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,x,v){let b=g;if(g&&!v&&typeof g=="object"){if(ce.endsWith(x,"{}"))x=n?x:x.slice(0,-2),g=JSON.stringify(g);else if(ce.isArray(g)&&cTe(g)||(ce.isFileList(g)||ce.endsWith(x,"[]"))&&(b=ce.toArray(g)))return x=tZ(x),b.forEach(function(j,w){!(ce.isUndefined(j)||j===null)&&t.append(o===!0?BR([x],w,i):o===null?x:x+"[]",d(j))}),!1}return qT(g)?!0:(t.append(BR(v,x,i),d(g)),!1)}const f=[],h=Object.assign(dTe,{defaultVisitor:u,convertValue:d,isVisitable:qT});function m(g,x){if(!ce.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(g),ce.forEach(g,function(b,y){(!(ce.isUndefined(b)||b===null)&&a.call(t,b,ce.isString(y)?y.trim():y,x,h))===!0&&m(b,x?x.concat(y):[y])}),f.pop()}}if(!ce.isObject(e))throw new TypeError("data must be an object");return m(e),t}function UR(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function TO(e,t){this._pairs=[],e&&DN(e,this,t)}const rZ=TO.prototype;rZ.append=function(t,r){this._pairs.push([t,r])};rZ.toString=function(t){const r=t?function(n){return t.call(this,n,UR)}:UR;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function uTe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function nZ(e,t,r){if(!t)return e;const n=r&&r.encode||uTe,a=ce.isFunction(r)?{serialize:r}:r,i=a&&a.serialize;let o;if(i?o=i(t,a):o=ce.isURLSearchParams(t)?t.toString():new TO(t,a).toString(n),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class zR{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ce.forEach(this.handlers,function(n){n!==null&&t(n)})}}const sZ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fTe=typeof URLSearchParams<"u"?URLSearchParams:TO,hTe=typeof FormData<"u"?FormData:null,mTe=typeof Blob<"u"?Blob:null,pTe={isBrowser:!0,classes:{URLSearchParams:fTe,FormData:hTe,Blob:mTe},protocols:["http","https","file","blob","url","data"]},_O=typeof window<"u"&&typeof document<"u",YT=typeof navigator=="object"&&navigator||void 0,gTe=_O&&(!YT||["ReactNative","NativeScript","NS"].indexOf(YT.product)<0),xTe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vTe=_O&&window.location.href||"http://localhost",yTe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_O,hasStandardBrowserEnv:gTe,hasStandardBrowserWebWorkerEnv:xTe,navigator:YT,origin:vTe},Symbol.toStringTag,{value:"Module"})),_s={...yTe,...pTe};function bTe(e,t){return DN(e,new _s.classes.URLSearchParams,{visitor:function(r,n,a,i){return _s.isNode&&ce.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function jTe(e){return ce.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function wTe(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],t[i]=e[i];return t}function aZ(e){function t(r,n,a,i){let o=r[i++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=i>=r.length;return o=!o&&ce.isArray(a)?a.length:o,c?(ce.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!l):((!a[o]||!ce.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&ce.isArray(a[o])&&(a[o]=wTe(a[o])),!l)}if(ce.isFormData(e)&&ce.isFunction(e.entries)){const r={};return ce.forEachEntry(e,(n,a)=>{t(jTe(n),a,r,0)}),r}return null}function NTe(e,t,r){if(ce.isString(e))try{return(t||JSON.parse)(e),ce.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(e)}const Vv={transitional:sZ,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=ce.isObject(t);if(i&&ce.isHTMLForm(t)&&(t=new FormData(t)),ce.isFormData(t))return a?JSON.stringify(aZ(t)):t;if(ce.isArrayBuffer(t)||ce.isBuffer(t)||ce.isStream(t)||ce.isFile(t)||ce.isBlob(t)||ce.isReadableStream(t))return t;if(ce.isArrayBufferView(t))return t.buffer;if(ce.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return bTe(t,this.formSerializer).toString();if((l=ce.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return DN(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),NTe(t)):t}],transformResponse:[function(t){const r=this.transitional||Vv.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(ce.isResponse(t)||ce.isReadableStream(t))return t;if(t&&ce.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(l){if(o)throw l.name==="SyntaxError"?Pt.from(l,Pt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_s.classes.FormData,Blob:_s.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ce.forEach(["delete","get","head","post","put","patch"],e=>{Vv.headers[e]={}});const STe=ce.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kTe=e=>{const t={};let r,n,a;return e&&e.split(` 678`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&STe[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},WR=Symbol("internals");function wp(e){return e&&String(e).trim().toLowerCase()}function Yb(e){return e===!1||e==null?e:ce.isArray(e)?e.map(Yb):String(e)}function CTe(e){const t=Object.create(null),r=/([^\s,;
678=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const TTe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lk(e,t,r,n,a){if(ce.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!ce.isString(t)){if(ce.isString(n))return t.indexOf(n)!==-1;if(ce.isRegExp(n))return n.test(t)}}function _Te(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function PTe(e,t){const r=ce.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}class ja{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(l,c,d){const u=wp(c);if(!u)throw new Error("header name must be a non-empty string");const f=ce.findKey(a,u);(!f||a[f]===void 0||d===!0||d===void 0&&a[f]!==!1)&&(a[f||c]=Yb(l))}const o=(l,c)=>ce.forEach(l,(d,u)=>i(d,u,c));if(ce.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(ce.isString(t)&&(t=t.trim())&&!TTe(t))o(kTe(t),r);else if(ce.isObject(t)&&ce.isIterable(t)){let l={},c,d;for(const u of t){if(!ce.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[d=u[0]]=(c=l[d])?ce.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}o(l,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=wp(t),t){const n=ce.findKey(this,t);if(n){const a=this[n];if(!r)return a;
vendor: 5,297 bytes, lines 678-679
678if(r===!0)return CTe(a);if(ce.isFunction(r))return r.call(this,a,n);if(ce.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=wp(t),t){const n=ce.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||lk(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(o){if(o=wp(o),o){const l=ce.findKey(n,o);l&&(!r||lk(n,n[l],l,r))&&(delete n[l],a=!0)}}return ce.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||lk(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return ce.forEach(this,(a,i)=>{const o=ce.findKey(n,i);if(o){r[o]=Yb(a),delete r[i];return}const l=t?_Te(i):String(i).trim();l!==i&&delete r[i],r[l]=Yb(a),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ce.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&ce.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` 679`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[WR]=this[WR]={accessors:{}}).accessors,a=this.prototype;function i(o){const l=wp(o);n[l]||(PTe(a,o),n[l]=!0)}return ce.isArray(t)?t.forEach(i):i(t),this}}ja.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ce.reduceDescriptors(ja.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});ce.freezeMethods(ja);function ck(e,t){const r=this||Vv,n=t||r,a=ja.from(n.headers);let i=n.data;return ce.forEach(e,function(l){i=l.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function iZ(e){return!!(e&&e.__CANCEL__)}class Hv extends Pt{constructor(t,r,n){super(t??"canceled",Pt.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}}function oZ(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Pt("Request failed with status code "+r.status,[Pt.ERR_BAD_REQUEST,Pt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ETe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function OTe(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=n[i];o||(o=d),r[a]=c,n[a]=d;let f=i,h=0;for(;f!==a;)h+=r[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),d-o<t)return;const m=u&&d-u;return m?Math.round(h*1e3/m):void 0}}function ATe(e,t){let r=0,n=1e3/t,a,i;const o=(d,u=Date.now())=>{r=u,a=null,i&&(clearTimeout(i),i=null),e(...d)};return[(...d)=>{const u=Date.now(),f=u-r;f>=n?o(d,u):(a=d,i||(i=setTimeout(()=>{i=null,o(a)},n-f)))},()=>a&&o(a)]}const yj=(e,t,r=3)=>{let n=0;const a=OTe(50,250);return ATe(i=>{const o=i.loaded,l=i.lengthComputable?i.total:void 0,c=o-n,d=a(c),u=o<=l;n=o;const f={loaded:o,total:l,progress:l?o/l:void 0,bytes:c,rate:d||void 0,estimated:d&&l&&u?(l-o)/d:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},r)},VR=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},HR=e=>(...t)=>ce.asap(()=>e(...t)),DTe=_s.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,_s.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(_s.origin),_s.navigator&&/(msie|trident)/i.test(_s.navigator.userAgent)):()=>!0,MTe=_s.hasStandardBrowserEnv?{write(e,t,r,n,a,i,o){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];ce.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),ce.isString(n)&&l.push(`path=${n}`),ce.isString(a)&&l.push(`domain=${a}`),i===!0&&l.push("secure"),ce.isString(o)&&l.push(`SameSite=${o}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ITe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function RTe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function lZ(e,t,r){let n=!ITe(t);return e&&(n||r==!1)?RTe(e,t):t}const qR=e=>e instanceof ja?{...e}:e;function Cu(e,t){t=t||{};const r={};function n(d,u,f,h){return ce.isPlainObject(d)&&ce.isPlainObject(u)?ce.merge.call({caseless:h},d,u):ce.isPlainObject(u)?ce.merge({},u):ce.isArray(u)?u.slice():u}function a(d,u,f,h){if(ce.isUndefined(u)){if(!ce.isUndefined(d))return n(void 0,d,f,h)}else return n(d,u,f,h)}function i(d,u){if(!ce.isUndefined(u))return n(void 0,u)}function o(d,u){if(ce.isUndefined(u)){if(!ce.isUndefined(d))return n(void 0,d)}else return n(void 0,u)}function l(d,u,f){if(f in t)return n(d,u);if(f in e)return n(void 0,d)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBo
vendor: 12,960 bytes, lines 679-682
679dyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(d,u,f)=>a(qR(d),qR(u),f,!0)};return ce.forEach(Object.keys({...e,...t}),function(u){const f=c[u]||a,h=f(e[u],t[u],u);ce.isUndefined(h)&&f!==l||(r[u]=h)}),r}const cZ=e=>{const t=Cu({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:l}=t;if(t.headers=o=ja.from(o),t.url=nZ(lZ(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),ce.isFormData(r)){if(_s.hasStandardBrowserEnv||_s.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(ce.isFunction(r.getHeaders)){const c=r.getHeaders(),d=["content-type","content-length"];Object.entries(c).forEach(([u,f])=>{d.includes(u.toLowerCase())&&o.set(u,f)})}}if(_s.hasStandardBrowserEnv&&(n&&ce.isFunction(n)&&(n=n(t)),n||n!==!1&&DTe(t.url))){const c=a&&i&&MTe.read(i);c&&o.set(a,c)}return t},$Te=typeof XMLHttpRequest<"u",LTe=$Te&&function(e){return new Promise(function(r,n){const a=cZ(e);let i=a.data;const o=ja.from(a.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=a,u,f,h,m,g;function x(){m&&m(),g&&g(),a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function b(){if(!v)return;const j=ja.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),N={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:j,config:e,request:v};oZ(function(k){r(k),x()},function(k){n(k),x()},N),v=null}"onloadend"in v?v.onloadend=b:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(b)},v.onabort=function(){v&&(n(new Pt("Request aborted",Pt.ECONNABORTED,e,v)),v=null)},v.onerror=function(w){const N=w&&w.message?w.message:"Network Error",S=new Pt(N,Pt.ERR_NETWORK,e,v);S.event=w||null,n(S),v=null},v.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const N=a.transitional||sZ;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),n(new Pt(w,N.clarifyTimeoutError?Pt.ETIMEDOUT:Pt.ECONNABORTED,e,v)),v=null},i===void 0&&o.setContentType(null),"setRequestHeader"in v&&ce.forEach(o.toJSON(),function(w,N){v.setRequestHeader(N,w)}),ce.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),l&&l!=="json"&&(v.responseType=a.responseType),d&&([h,g]=yj(d,!0),v.addEventListener("progress",h)),c&&v.upload&&([f,m]=yj(c),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(u=j=>{v&&(n(!j||j.type?new Hv(null,e,v):j),v.abort(),v=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));const y=ETe(a.url);if(y&&_s.protocols.indexOf(y)===-1){n(new Pt("Unsupported protocol "+y+":",Pt.ERR_BAD_REQUEST,e));return}v.send(i||null)})},FTe=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const i=function(d){if(!a){a=!0,l();const u=d instanceof Error?d:this.reason;n.abort(u instanceof Pt?u:new Hv(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new Pt(`timeout of ${t}ms exceeded`,Pt.ETIMEDOUT))},t);const l=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>ce.asap(l),c}},BTe=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},UTe=async function*(e,t){for await(const r of zTe(e))yield*BTe(r,t)},zTe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},YR=(e,t,r,n)=>{const a=UTe(e,t);let i=0,o,l=c=>{o||(o=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await a.next();if(d){l(),c.close();return}let f=u.byteLength;if(r){let h=i+=f;r(h)}c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),a.return()}},{highWaterMark:2})},GR=64*1024,{isFunction:Yy}=ce,WTe=(({Request:e,Response:t})=>({Request:e,Response:t}))(ce.global),{ReadableStream:KR,TextEncoder:QR}=ce.global,ZR=(e,...t)=>{try{return!!e(...t)}catch{return!1}},VTe=e=>{e=ce.merge.call({skipUndefined:!0},WTe,e);const{fetch:t,Request:r,Response:n}=e,a=t?Yy(t):typeof fetch=="function",i=Yy(r),o=Yy(n);if(!a)return!1;const l=a&&Yy(KR),c=a&&(typeof QR=="function"?(g=>x=>g.encode(x))(new QR):async g=>new Uint8Array(await new r(g).arrayBuffer())),d=i&&l&&ZR(()=>{let g=!1;const x=new r(_s.origin,{body:new KR,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!x}),u=o&&l&&ZR(()=>ce.isReadableStream(new n("").body)),f={stream:u&&(g=>g.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!f[g]&&(f[g]=(x,v)=>{let b=x&&x[g];if(b)return b.call(x);throw new Pt(`Response type '${g}' is not supported`,Pt.ERR_NOT_SUPPORT,v)})});const h=async g=>{if(g==null)return 0;if(ce.isBlob(g))return g.size;if(ce.isSpecCompliantForm(g))return(await new r(_s.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(ce.isArrayBufferView(g)||ce.isArrayBuffer(g))return g.byteLength;if(ce.isURLSearchParams(g)&&(g=g+""),ce.isString(g))return(await c(g)).byteLength},m=async(g,x)=>{const v=ce.toFiniteNumber(g.getContentLength());return v??h(x)};return async g=>{let{url:x,method:v,data:b,signal:y,cancelToken:j,timeout:w,onDownloadProgress:N,onUploadProgress:S,responseType:k,headers:T,withCredentials:C="same-origin",fetchOptions:E}=cZ(g),P=t||fetch;k=k?(k+"").toLowerCase():"text";let _=FTe([y,j&&j.toAbortSignal()],w),I=null;const F=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let H;try{if(S&&d&&v!=="get"&&v!=="head"&&(H=await m(T,b))!==0){let se=new r(x,{method:"POST",body:b,duplex:"half"}),oe;if(ce.isFormData(b)&&(oe=se.headers.get("content-type"))&&T.setContentType(oe),se.body){const[_e,U]=VR(H,yj(HR(S)));b=YR(se.body,GR,_e,U)}}ce.isString(C)||(C=C?"include":"omit");const W=i&&"credentials"in r.prototype,z={...E,signal:_,method:v.toUpperCase(),headers:T.normalize().toJSON(),body:b,duplex:"half",credentials:W?C:void 0};I=i&&new r(x,z);let R=await(i?P(I,E):P(x,z));const q=u&&(k==="stream"||k==="response");if(u&&(N||q&&F)){const se={};["status","statusText","headers"].forEach(M=>{se[M]=R[M]});const oe=ce.toFiniteNumber(R.headers.get("content-length")),[_e,U]=N&&VR(oe,yj(HR(N),!0))||[];R=new n(YR(R.body,GR,_e,()=>{U&&U(),F&&F()}),se)}k=k||"text";let V=await f[ce.findKey(f,k)||"text"](R,g);return!q&&F&&F(),await new Promise((se,oe)=>{oZ(se,oe,{data:V,headers:ja.from(R.headers),status:R.status,statusText:R.statusText,config:g,request:I})})}catch(W){throw F&&F(),W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)?Object.assign(new Pt("Network Error",Pt.ERR_NETWORK,g,I),{cause:W.cause||W}):Pt.from(W,W&&W.code,g,I)}}},HTe=new Map,dZ=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:a}=t,i=[n,a,r];let o=i.length,l=o,c,d,u=HTe;for(;l--;)c=i[l],d=u.get(c),d===void 0&&u.set(c,d=l?new Map:VTe(t)),u=d;return d};dZ();const PO={http:lTe,xhr:LTe,fetch:{get:dZ}};ce.forEach(PO,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const XR=e=>`- ${e}`,qTe=e=>ce.isFunction(e)||e===null||e===!1;function YTe(e,t){e=ce.isArray(e)?e:[e];const{length:r}=e;let n,a;const i={};for(let o=0;o<r;o++){n=e[o];let l;if(a=n,!qTe(n)&&(a=PO[(l=String(n)).toLowerCase()],a===void 0))throw new Pt(`Unknown adapter '${l}'`);if(a&&(ce.isFunction(a)||(a=a.get(t))))break;i[l||"#"+o]=a}if(!a){const o=Object.entries(i).map(([c,d])=>`adapter ${c} `+(d===!1?"is not supported by the environment":"is not available in the build"));let l=r?o.length>1?`since : 680`+o.map(XR).join(` 681`):" "+XR(o[0]):"as no adapter specified";throw new Pt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return a}const uZ={getAdapter:YTe,adapters:PO};function dk(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hv(null,e)}function JR(e){return dk(e),e.headers=ja.from(e.headers),e.data=ck.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),uZ.getAdapter(e.adapter||Vv.adapter,e)(e).then(function(n){return dk(e),n.data=ck.call(e,e.transformResponse,n),n.headers=ja.from(n.headers),n},function(n){return iZ(n)||(dk(e),n&&n.response&&(n.response.data=ck.call(e,e.transformResponse,n.response),n.response.headers=ja.from(n.response.headers))),Promise.reject(n)})}const fZ="1.13.4",MN={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{MN[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const e$={};MN.transitional=function(t,r,n){function a(i,o){return"[Axios v"+fZ+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,l)=>{if(t===!1)throw new Pt(a(o," has been removed"+(r?" in "+r:"")),Pt.ERR_DEPRECATED);return r&&!e$[o]&&(e$[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,l):!0}};MN.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function GTe(e,t,r){if(typeof e!="object")throw new Pt("options must be an object",Pt.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],o=t[i];if(o){const l=e[i],c=l===void 0||o(l,i,e);if(c!==!0)throw new Pt("option "+i+" must be "+c,Pt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Pt("Unknown option "+i,Pt.ERR_BAD_OPTION)}}const Gb={assertOptions:GTe,validators:MN},to=Gb.validators;class nu{constructor(t){this.defaults=t||{},this.interceptors={request:new zR,response:new zR}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=` 682`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Cu(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&Gb.assertOptions(n,{silentJSONParsing:to.transitional(to.boolean),forcedJSONParsing:to.transitional(to.boolean),clarifyTimeoutError:to.transitional(to.boolean)},!1),a!=null&&(ce.isFunction(a)?r.paramsSerializer={serialize:a}:Gb.assertOptions(a,{encode:to.function,serialize:to.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Gb.assertOptions(r,{baseUrl:to.spelling("baseURL"),withXsrfToken:to.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&ce.merge(i.common,i[r.method]);i&&ce.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),r.headers=ja.concat(o,i);const l=[];let c=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(c=c&&x.synchronous,l.unshift(x.fulfilled,x.rejected))});const d=[];this.interceptors.response.forEach(function(x){d.push(x.fulfilled,x.rejected)});let u,f=0,h;if(!c){const g=[JR.bind(this),void 0];for(g.unshift(...l),g.push(...d),h=g.length,u=Promise.resolve(r);f<h;)u=u.then(g[f++],g[f++]);return u}h=l.length;let m=r;for(;f<h;){const g=l[f++],x=l[f++];try{m=g(m)}catch(v){x.call(this,v);break}}try{u=JR.call(this,m)}catch(g){return Promise.reject(g)}for(f=0,h=d.length;f<h;)u=u.then(d[f++],d[f++]);return u}getUri(t){t=Cu(this.defaults,t);const r=lZ(t.baseURL,t.url,t.allowAbsoluteUrls);return nZ(r,t.params,t.paramsSerializer)}}ce.forEach(["delete","get","head","options"],function(t){nu.prototype[t]=function(r,n){return this.request(Cu(n||{},{method:t,url:r,data:(n||{}).data}))}});ce.forEach(["post","put","patch"],function(t){function r(n){return function(i,o,l){return this.request(Cu(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}nu.prototype[t]=r(),nu.prototype[t+"Form"]=r(!0)});class EO{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(l=>{n.subscribe(l),i=l}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,l){n.reason||(n.reason=new Hv(i,o,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
682subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new EO(function(a){t=a}),cancel:t}}}function KTe(e){return function(r){return e.apply(null,r)}}function QTe(e){return ce.isObject(e)&&e.isAxiosError===!0}const GT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(GT).forEach(([e,t])=>{GT[t]=e});function hZ(e){const t=new nu(e),r=YQ(nu.prototype.request,t);return ce.extend(r,nu.prototype,t,{allOwnKeys:!0}),ce.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return hZ(Cu(e,a))},r}const Dn=hZ(Vv);Dn.Axios=nu;Dn.CanceledError=Hv;Dn.CancelToken=EO;Dn.isCancel=iZ;Dn.VERSION=fZ;Dn.toFormData=DN;Dn.AxiosError=Pt;Dn.Cancel=Dn.CanceledError;Dn.all=function(t){return Promise.all(t)};Dn.spread=KTe;Dn.isAxiosError=QTe;Dn.mergeConfig=Cu;Dn.AxiosHeaders=ja;Dn.formToJSON=e=>aZ(ce.isHTMLForm(e)?new FormData(e):e);Dn.getAdapter=uZ.getAdapter;Dn.HttpStatusCode=GT;Dn.default=Dn;const ZTe=Mu("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Rr=p.forwardRef(({className:e,variant:t,...r},n)=>s.jsx("div",{ref:n,role:"alert",className:Oe(ZTe({variant:t}),e),...r}));Rr.displayName="Alert";const fl=p.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:Oe("mb-1 font-medium leading-none tracking-tight",e),...t}));fl.displayName="AlertTitle";const $r=p.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:Oe("text-sm [&_p]:leading-relaxed",e),...t}));$r.displayName="AlertDescription";function XTe(){var v,b;const[e,t]=p.useState(""),[r,n]=p.useState(!1),[a,i]=p.useState(!1),[o,l]=p.useState(null),[c,d]=p.useState(null),[u,f]=p.useState(!1),[h,m]=p.useState(!1),g=async()=>{var y,j,w,N;if(!e||!e.includes("@")){Hn({title:"Invalid email",description:"Please enter a valid email address",variant:"destructive"});return}try{n(!0),l(null);const S=await Dn.post("/api/email/test",{email:e});l({success:!0,message:S.data.message,timestamp:new Date().toISOString()}),Hn({title:"Email sent successfully",description:"Check your inbox for the test email",variant:"default"})}catch(S){console.error("Error sending test email:",S),l({success:!1,error:((j=(y=S.response)==null?void 0:y.data)==null?void 0:j.message)||S.message||"Unknown error",timestamp:new Date().toISOString()}),Hn({title:"Failed to send email",description:((N=(w=S.response)==null?void 0:w.data)==null?void 0:N.message)||S.message||"Unknown error occurred",variant:"destructive"})}finally{n(!1)}},x=async()=>{var y,j;try{i(!0),d(null);const w=await Dn.get("/api/email/diagnostics");d(w.data),Hn({title:w.data.diagnostics.success?"Network Diagnostics Passed":"Network Issues Detected",description:w.data.diagnostics.success?"All SMTP connectivity tests were successful.":"Some SMTP connectivity issues were detected. Check the detailed report.",variant:w.data.diagnostics.success?"default":"destructive"})}catch(w){console.error("Error running network diagnostics:",w),Hn({title:"Failed to run diagnostics",description:((j=(y=w.response)==null?void 0:y.data)==null?void 0:j.message)||w.message||"Unknown error occurred",variant:"destructive"})}finally{i(!1)}};return s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Email Service Tester"}),s.jsx(ye,{children:"Test email delivery and diagnose connectivity issues in the production environment."})]}),s.jsx(te,{children:s.jsxs(Br,{defaultValue:"test",children:[s.jsxs(Hr,{className:"w-full mb-6",children:[s.jsx(We,{value:"test",className:"flex-1",children:"Send Test Email"}),s.jsx(We,{value:"diagnostics",className:"flex-1",children:"Network Diagnostics"})]}),s.jsxs(Ve,{value:"test",className:"space-y-4",children:[s.jsxs(Rr,{children:[s.jsx(fl,{children:"Email Testing Tool"}),s.jsx($r,{children:"This tool will send a test email to verify that the email service is working correctly. Use this to test email delivery in the production environment."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium",children:"Email Address"}),s.jsx(ie,{type:"email",placeholder:"Enter email address",value:e,onCh
682ange:y=>t(y.target.value)}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter the email address where you want to receive the test message"})]}),o&&s.jsxs(s.Fragment,{children:[s.jsx(Oi,{className:"my-4"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h3",{className:"text-sm font-medium",children:["Last Test Result:",s.jsx("span",{className:`ml-2 ${o.success?"text-green-500":"text-red-500"}`,children:o.success?"Success":"Failed"})]}),s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>f(!u),children:u?"Hide Details":"Show Details"})]}),u&&s.jsx("div",{className:"rounded bg-muted p-3 text-xs font-mono overflow-x-auto",children:s.jsx("pre",{children:JSON.stringify(o,null,2)})})]})]}),s.jsx("div",{className:"pt-4",children:s.jsx(D,{onClick:g,disabled:r,className:"w-full",children:r?"Sending...":"Send Test Email"})})]}),s.jsxs(Ve,{value:"diagnostics",className:"space-y-4",children:[s.jsxs(Rr,{children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx(fl,{children:"Production Environment Diagnostics"}),s.jsx($r,{children:"This tool tests network connectivity from your server to SMTP mail services. Use it to identify potential email delivery issues in the production environment."})]}),s.jsxs(D,{variant:"outline",onClick:x,disabled:a,className:"w-full",children:[s.jsx($oe,{className:"mr-2 h-4 w-4"}),a?"Running Diagnostics...":"Run Network Diagnostics"]}),c&&s.jsxs("div",{className:"mt-4 border rounded-md overflow-hidden",children:[s.jsx("div",{className:`p-3 ${c.diagnostics.success?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:s.jsxs("div",{className:"flex items-center",children:[c.diagnostics.success?s.jsx(Aa,{className:"h-5 w-5 mr-2"}):s.jsx(sn,{className:"h-5 w-5 mr-2"}),s.jsx("span",{className:"font-semibold",children:c.diagnostics.success?"All connectivity tests passed":"Connectivity issues detected"}),s.jsx(D,{variant:"ghost",size:"sm",className:"ml-auto",onClick:()=>m(!h),children:h?"Hide Details":"Show Details"})]})}),h&&s.jsxs("div",{className:"p-4 bg-muted",children:[s.jsxs("div",{className:"mb-4",children:[s.jsx("h4",{className:"text-sm font-medium mb-2",children:"Configuration"}),s.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[s.jsxs("div",{className:"p-2 bg-background rounded border",children:[s.jsx("strong",{children:"Environment:"})," ",c.environment]}),s.jsxs("div",{className:"p-2 bg-background rounded border",children:[s.jsx("strong",{children:"Timestamp:"})," ",new Date(c.timestamp).toLocaleString()]}),s.jsxs("div",{className:"p-2 bg-background rounded border",children:[s.jsx("strong",{children:"From Email:"})," ",c.emailConfig.fromEmail||"Not configured"]}),s.jsxs("div",{className:"p-2 bg-background rounded border",children:[s.jsx("strong",{children:"SMTP Server:"})," ",c.emailConfig.smtpConfigured?`Configured (${c.emailConfig.smtpHost})`:"Not configured"]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-2",children:"DNS Resolution"}),c.diagnostics.results.dns_lookup&&c.diagnostics.results.dns_lookup.success?s.jsxs("div",{className:"text-xs bg-green-50 p-2 rounded border border-green-200",children:[s.jsxs("p",{className:"flex items-center",children:[s.jsx(Aa,{className:"h-3 w-3 mr-1 text-green-600"}),s.jsx("strong",{children:"Status:"})," Success"]}),c.diagnostics.results.dns_lookup.resolvedIp&&s.jsxs("p",{children:[s.jsx("strong",{children:"Resolved IP:"})," ",c.diagnostics.results.dns_lookup.resolvedIp]})]}):s.jsxs("div",{className:"text-xs bg-red-50 p-2 rounded border border-red-200",children:[s.jsxs("p",{className:"flex items-center",children:[s.jsx(sn,{className:"h-3 w-3 mr-1 text-red-600"}),s.jsx("strong",{children:"Status:"})," Failed"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Error:"})," ",((v=c.diagnostics.errors.dns_lookup)==null?void 0:v.message)||"DNS resolution failed"]})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-2",children:"SSL/TLS Connection"}),c.diagnostics.results.tcp_connection&&c.diagnostics.results.tcp_connection.success?s.jsxs("div",{className:"text-xs bg-green-50 p-2 rounded border border-green-200",children:[s.jsxs("p",{className:"flex items-center",children:[s.jsx(Aa,{className:"h-3 w-3 mr-1 text-green-600"}),s.jsx("strong",{children:"Status:"})," Success"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Host:"})," ",c.diagnostics.results.tcp_connection.host||"N/A"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Port:"})," ",c.diagnostics.results.tcp_connection.port||"N/A"]})]}):s.jsxs("div",{className:"text-xs bg-red-50 p-2 rounded border border-red-200",children:[s.jsxs("p",{className:"flex items-center",children:[s.jsx(sn,{className:"h-3 w-3 mr-1 text-red-600"}),s.jsx("strong",{children:"Status:"})," Failed"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Error:"})," ",((b=c.diagnostics.errors.tcp_connection)==null?void 0:b.message)||"Connection failed"]})]})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium mb-2",children:"SMTP Connectivity Tests"}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:Object.entries(c.diagnostics.results).filter(([y])=>["dns_lookup","tcp_connection","smtp_auth","domain_dns"].includes(y)).map(([y,j])=>s.jsxs("div",{className:"text-xs bg-background p-2 rounded border",children:[s.jsx("p",{className:"font-semibold",children:y.replace("_"," ").toUpperCase()}),s.jsxs("p",{children:[s.jsx("strong",{children:"Status:"})," ",j.success?"Success":"Failed"]}),j.host&&s.jsxs("p",{className:"truncate",children:[s.jsx("strong",{children:"Host:"})," ",j.host]})]},y))})]}),!c.diagnostics.success&&s.jsxs("div",{className:"mt-4 bg-yellow-50 p-3 rounded border border-yellow-200",children:[s.jsx("h4",{className:"font-semibold text-yellow-800",children:"Troubleshooting Recommendations"}),s.jsxs("ul",{className:"list-disc ml-5 text-xs text-yellow-800 mt-2",children:[s.jsx("li",{children:"Check if outbound SMTP connections are allowed in your production environment"}),s.jsx("li",{children:"Verify SMTP credentials (username and password) are correct"}),s.jsx("li",{children:"Confirm that your SMTP server allows connections from your server's IP address"}),s.jsx("li",{children:"Test if DNS resolution is working properly for your SMTP host domain"}),s.jsx("li",{children:"Ensure your email domain has proper MX, SPF, and DMARC records configured"}),s.jsx("li",{children:"Check if your SMTP server requires SSL/TLS and that the correct port is being used"})]})]})]})]})]})]})})]})}function JTe(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var OO="ScrollArea",[mZ,RZe]=Is(OO),[e_e,pi]=mZ(OO),pZ=p.forwardRef((e,t)=>
vendor: 1,264 bytes, lines 682-688
682{const{__scopeScrollArea:r,type:n="hover",dir:a,scrollHideDelay:i=600,...o}=e,[l,c]=p.useState(null),[d,u]=p.useState(null),[f,h]=p.useState(null),[m,g]=p.useState(null),[x,v]=p.useState(null),[b,y]=p.useState(0),[j,w]=p.useState(0),[N,S]=p.useState(!1),[k,T]=p.useState(!1),C=Ft(t,P=>c(P)),E=cd(a);return s.jsx(e_e,{scope:r,type:n,dir:E,scrollHideDelay:i,scrollArea:l,viewport:d,onViewportChange:u,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:g,scrollbarXEnabled:N,onScrollbarXEnabledChange:S,scrollbarY:x,onScrollbarYChange:v,scrollbarYEnabled:k,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:w,children:s.jsx(Ke.div,{dir:E,...o,ref:C,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":j+"px",...e.style}})})});pZ.displayName=OO;var gZ="ScrollAreaViewport",xZ=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,asChild:a,nonce:i,...o}=e,l=pi(gZ,r),c=p.useRef(null),d=Ft(t,c,l.onViewportChange);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:` 683[data-radix-scroll-area-viewport] { 684 scrollbar-width: none; 685 -ms-overflow-style: none; 686 -webkit-overflow-scrolling: touch; 687} 688[data-radix-scroll-area-viewport]::-webkit-scrollbar {
689 display: none; 690} 691:where([data-radix-scroll-area-viewport]) { 692 display: flex; 693 flex-direction: column; 694 align-items: stretch; 695} 696:where([data-radix-scroll-area-content]) { 697 flex-grow: 1; 698} 699`},nonce:i}),s.jsx(Ke.div,{"data-radix-scroll-area-viewport":"",...o,asChild:a,ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:d_e({asChild:a,children:n},u=>s.jsx("div",{"data-radix-scroll-area-content":"",ref:l.onContentChange,style:{minWidth:l.scrollbarXEnabled?"fit-content":void 0},children:u}))})]})});xZ.displayName=gZ;var Vo="ScrollAreaScrollbar",AO=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=pi(Vo,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=a,l=e.orientation==="horizontal";return p.useEffect(()=>(l?i(!0):o(!0),()=>{l?i(!1):o(!1)}),[l,i,o]),a.type==="hover"?s.jsx(t_e,{...n,ref:t,forceMount:r}):a.type==="scroll"?s.jsx(r_e,{...n,ref:t,forceMount:r}):a.type==="auto"?s.jsx(vZ,{...n,ref:t,forceMount:r}):a.type==="always"?s.jsx(DO,{...n,ref:t}):null});AO.displayName=Vo;var t_e=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=pi(Vo,e.__scopeScrollArea),[i,o]=p.useState(!1);return p.useEffect(()=>{const l=a.scrollArea;let c=0;if(l){const d=()=>{window.clearTimeout(c),o(!0)},u=()=>{c=window.setTimeout(()=>o(!1),a.scrollHideDelay)};return l.addEventListener("pointerenter",d),l.addEventListener("pointerleave",u),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",d),l.removeEventListener("pointerleave",u)}}},[a.scrollArea,a.scrollHideDelay]),s.jsx(Jn,{present:r||i,children:s.jsx(vZ,{"data-state":i?"visible":"hidden",...n,ref:t})})}),r_e=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=pi(Vo,e.__scopeScrollArea),i=e.orientation==="horizontal",o=RN(()=>c("SCROLL_END"),100),[l,c]=JTe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(l==="idle"){const d=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(d)}},[l,a.scrollHideDelay,c]),p.useEffect(()=>{const d=a.viewport,u=i?"scrollLeft":"scrollTop";if(d){let f=d[u];const h=()=>{const m=d[u];f!==m&&(c("SCROLL"),o()),f=m};return d.addEventListener("scroll",h),()=>d.removeEventListener("scroll",h)}},[a.viewport,i,c,o]),s.jsx(Jn,{present:r||l!=="hidden",children:s.jsx(DO,{"data-state":l==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:$e(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:$e(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),vZ=p.forwardRef((e,t)=>{const r=pi(Vo,e.__scopeScrollArea),{forceMount:n,...a}=e,[i,o]=p.useState(!1),l=e.orientation==="horizontal",c=RN(()=>{if(r.viewport){const d=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;o(l?d:u)}},10);return Bh(r.viewport,c),Bh(r.content,c),s.jsx(Jn,{present:n||i,children:s.jsx(DO,{"data-state":i?"visible":"hidden",...a,ref:t})})}),DO=p.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,a=pi(Vo,e.__scopeScrollArea),i=p.useRef(null),o=p.useRef(0),[l,c]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=NZ(l.viewport,l.content),u={...n,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:h=>i.current=h,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:h=>o.current=h};function f(h,m){return l_e(h,o.current,l,m)}return r==="horizontal"?s.jsx(n_e,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const h=a.viewport.scrollLeft,m=t$(h,l,a.dir);i.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{a.viewport&&(a.viewport.scrollLeft=h)},onDragScroll:h=>{a.viewport&&(a.viewport.scrollLeft=f(h,a.dir))}}):r==="vertical"?s.jsx(s_e,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const h=a.viewport.scrollTop,m=t$(h,l);i.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{a.viewport&&(a.viewport.scrollTop=h)},onDragScroll:h=>{a.viewport&&(a.viewport.scrollTop=f(h))}}):null}),n_e=p.forwardRef((e,t)=>
vendor: 8,635 bytes, line 699
699{const{sizes:r,onSizesChange:n,...a}=e,i=pi(Vo,e.__scopeScrollArea),[o,l]=p.useState(),c=p.useRef(null),d=Ft(t,c,i.onScrollbarXChange);return p.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),s.jsx(bZ,{"data-orientation":"horizontal",...a,ref:d,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":IN(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(i.viewport){const h=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(h),kZ(h,f)&&u.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:jj(o.paddingLeft),paddingEnd:jj(o.paddingRight)}})}})}),s_e=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...a}=e,i=pi(Vo,e.__scopeScrollArea),[o,l]=p.useState(),c=p.useRef(null),d=Ft(t,c,i.onScrollbarYChange);return p.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),s.jsx(bZ,{"data-orientation":"vertical",...a,ref:d,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":IN(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(i.viewport){const h=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(h),kZ(h,f)&&u.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:jj(o.paddingTop),paddingEnd:jj(o.paddingBottom)}})}})}),[a_e,yZ]=mZ(Vo),bZ=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:a,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:d,onWheelScroll:u,onResize:f,...h}=e,m=pi(Vo,r),[g,x]=p.useState(null),v=Ft(t,C=>x(C)),b=p.useRef(null),y=p.useRef(""),j=m.viewport,w=n.content-n.viewport,N=nn(u),S=nn(c),k=RN(f,10);function T(C){if(b.current){const E=C.clientX-b.current.left,P=C.clientY-b.current.top;d({x:E,y:P})}}return p.useEffect(()=>{const C=E=>{const P=E.target;(g==null?void 0:g.contains(P))&&N(E,w)};return document.addEventListener("wheel",C,{passive:!1}),()=>document.removeEventListener("wheel",C,{passive:!1})},[j,g,w,N]),p.useEffect(S,[n,S]),Bh(g,k),Bh(m.content,k),s.jsx(a_e,{scope:r,scrollbar:g,hasThumb:a,onThumbChange:nn(i),onThumbPointerUp:nn(o),onThumbPositionChange:S,onThumbPointerDown:nn(l),children:s.jsx(Ke.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:$e(e.onPointerDown,C=>{C.button===0&&(C.target.setPointerCapture(C.pointerId),b.current=g.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),T(C))}),onPointerMove:$e(e.onPointerMove,T),onPointerUp:$e(e.onPointerUp,C=>{const E=C.target;E.hasPointerCapture(C.pointerId)&&E.releasePointerCapture(C.pointerId),document.body.style.webkitUserSelect=y.current,m.viewport&&(m.viewport.style.scrollBehavior=""),b.current=null})})})}),bj="ScrollAreaThumb",jZ=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,a=yZ(bj,e.__scopeScrollArea);return s.jsx(Jn,{present:r||a.hasThumb,children:s.jsx(i_e,{ref:t,...n})})}),i_e=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...a}=e,i=pi(bj,r),o=yZ(bj,r),{onThumbPositionChange:l}=o,c=Ft(t,f=>o.onThumbChange(f)),d=p.useRef(),u=RN(()=>{d.current&&(d.current(),d.current=void 0)},100);return p.useEffect(()=>{const f=i.viewport;if(f){const h=()=>{if(u(),!d.current){const m=c_e(f,l);d.current=m,l()}};return l(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[i.viewport,u,l]),s.jsx(Ke.div,{"data-state":o.hasThumb?"visible":"hidden",...a,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:$e(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),g=f.clientX-m.left,x=f.clientY-m.top;o.onThumbPointerDown({x:g,y:x})}),onPointerUp:$e(e.onPointerUp,o.onThumbPointerUp)})});jZ.displayName=bj;var MO="ScrollAreaCorner",wZ=p.forwardRef((e,t)=>{const r=pi(MO,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?s.jsx(o_e,{...e,ref:t}):null});wZ.displayName=MO;var o_e=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,a=pi(MO,r),[i,o]=p.useState(0),[l,c]=p.useState(0),d=!!(i&&l);return Bh(a.scrollbarX,()=>{var f;const u=((f=a.scrollbarX)==null?void 0:f.offsetHeight)||0;a.onCornerHeightChange(u),c(u)}),Bh(a.scrollbarY,()=>{var f;const u=((f=a.scrollbarY)==null?void 0:f.offsetWidth)||0;a.onCornerWidthChange(u),o(u)}),d?s.jsx(Ke.div,{...n,ref:t,style:{width:i,height:l,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function jj(e){return e?parseInt(e,10):0}function NZ(e,t){const r=e/t;return isNaN(r)?0:r}function IN(e){const t=NZ(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function l_e(e,t,r,n="ltr"){const a=IN(r),i=a/2,o=t||i,l=a-o,c=r.scrollbar.paddingStart+o,d=r.scrollbar.size-r.scrollbar.paddingEnd-l,u=r.content-r.viewport,f=n==="ltr"?[0,u]:[u*-1,0];return SZ([c,d],f)(e)}function t$(e,t,r="ltr"){const n=IN(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,o=t.content-t.viewport,l=i-n,c=r==="ltr"?[0,o]:[o*-1,0],d=AT(e,c);return SZ([0,o],[0,l])(d)}function SZ(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function kZ(e,t){return e>0&&e<t}var c_e=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function a(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,l=r.top!==i.top;(o||l)&&t(),r=i,n=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(n)};function RN(e,t){const r=nn(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Bh(e,t){const r=nn(t);Bn(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}function d_e(e,t){const{asChild:r,children:n}=e;if(!r)return typeof t=="function"?t(n):t;const a=p.Children.only(n);return p.cloneElement(a,{children:typeof t=="function"?t(a.props.children):t})}var CZ=pZ,u_e=xZ,f_e=wZ;const fg=p.forwardRef(({className:e,children:t,...r},n)=>s.jsxs(CZ,{ref:n,className:Oe("relative overflow-hidden",e),...r,children:[s.jsx(u_e,{className:"h-full w-full rounded-[inherit]",children:t}),s.jsx(TZ,{}),s.jsx(f_e,{})]}));fg.displayName=CZ.displayName;const TZ=p.forwardRef(({className:e,orientation:t="vertical",...r},n)=>s.jsx(AO,{ref:n,orientation:t,className:Oe("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:s.jsx(jZ,{className:"relative flex-1 rounded-full bg-border"})}));TZ.displayName=AO.displayName;var _Z="AlertDialog",[h_e,$Ze]=Is(_Z,[$H]),Vl=$H(),PZ=e=>{const{__scopeAlertDialog:t,...r}=e,n=Vl(t);return s.jsx(r2,{...n,...r,modal:!0})};PZ.displayName=_Z;var m_e="AlertDialogTrigger",EZ=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=Vl(r);return s.jsx(JH,{...a,...n,ref:t})});EZ.displayName=m_e;var p_e="AlertDialogPortal",OZ=e=>{const{__scopeAlertDialog:t,...r}=e,n=Vl(t);return s.jsx(n2,{...n,...r})};OZ.displayName=p_e;var g_e="AlertDialogOverlay",AZ=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=Vl(r);return s.jsx(Nv,{...a,...n,ref:t})});AZ.displayName=g_e;var qf="AlertDialogContent",[x_e,v_e]=h_e(qf),DZ=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...a}=e,i=Vl(r),o=p.useRef(null),l=Ft(t,o),c=p.useRef(null);return s.jsx(epe,{contentName:qf,titleName:MZ,docsSlug:"alert-dialog",children:s.jsx(x_e,{scope:r,cancelRef:c,children:s.jsxs(Sv,{role:"alertdialog",...i,...a,ref:l,onOpenAutoFocus:$e(a.onOpenAutoFocus,d=>{var u;d.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[s.jsx(V9,{children:n}),s.jsx(b_e,{contentRef:o})]})})})});DZ.displayName=qf;var MZ="AlertDialogTitle",IZ=p.forwardRef((e,t)=>
699{const{__scopeAlertDialog:r,...n}=e,a=Vl(r);return s.jsx(kv,{...a,...n,ref:t})});IZ.displayName=MZ;var RZ="AlertDialogDescription",$Z=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=Vl(r);return s.jsx(Cv,{...a,...n,ref:t})});$Z.displayName=RZ;var y_e="AlertDialogAction",LZ=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=Vl(r);return s.jsx(Tv,{...a,...n,ref:t})});LZ.displayName=y_e;var FZ="AlertDialogCancel",BZ=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:a}=v_e(FZ,r),i=Vl(r),o=Ft(t,a);return s.jsx(Tv,{...i,...n,ref:o})});BZ.displayName=FZ;var b_e=({contentRef:e})=>{const t=`\`${qf}\` requires a description for the component to be accessible for screen reader users. 700 701You can add a description to the \`${qf}\` by passing a \`${RZ}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 702 703Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${qf}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 704 705For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},j_e=PZ,w_e=EZ,N_e=OZ,UZ=AZ,zZ=DZ,WZ=LZ,VZ=BZ,HZ=IZ,qZ=$Z;const wj=j_e,KT=w_e,S_e=N_e,YZ=p.forwardRef(({className:e,...t},r)=>s.jsx(UZ,{className:Oe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));YZ.displayName=UZ.displayName;const hx=p.forwardRef(({className:e,...t},r)=>s.jsxs(S_e,{children:[s.jsx(YZ,{}),s.jsx(zZ,{ref:r,className:Oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));hx.displayName=zZ.displayName;const mx=({className:e,...t})=>s.jsx("div",{className:Oe("flex flex-col space-y-2 text-center sm:text-left",e),...t});mx.displayName="AlertDialogHeader";const px=({className:e,...t})=>s.jsx("div",{className:Oe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});px.displayName="AlertDialogFooter";const gx=p.forwardRef(({className:e,...t},r)=>s.jsx(HZ,{ref:r,className:Oe("text-lg font-semibold",e),...t}));gx.displayName=HZ.displayName;const xx=p.forwardRef(({className:e,...t},r)=>s.jsx(qZ,{ref:r,className:Oe("text-sm text-muted-foreground",e),...t}));xx.displayName=qZ.displayName;const vx=p.forwardRef(({className:e,...t},r)=>s.jsx(WZ,{ref:r,className:Oe(ax(),e),...t}));vx.displayName=WZ.displayName;const yx=p.forwardRef(({className:e,...t},r)=>s.jsx(VZ,{ref:r,className:Oe(ax({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));yx.displayName=VZ.displayName;function k_e(){return s.jsx("div",{className:"flex justify-center items-center p-8",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})}function C_e(){const[e,t]=p.useState(null),[r,n]=p.useState(null),[a,i]=p.useState(!1);p.useState("");const[o,l]=p.useState(null),[c,d]=p.useState(""),{toast:u}=Qt(),{data:f,isLoading:h,error:m}=ut({queryKey:["/api/email-templates"],enabled:!0}),g=dt({mutationFn:async P=>await Ue("PUT","/api/email-templates/"+P.id,{subject:P.subject,htmlContent:P.htmlContent,textContent:P.textContent,category:P.category,language:P.language,comment:P.comment||"Updated template"}),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/email-templates"]}),n(null),u({title:"Template updated",description:"Email template has been updated successfully"})},onError:P=>{u({title:"Error updating template",description:P instanceof Error?P.message:"An error occurred while updating the template",variant:"destructive"})}}),x=dt({mutationFn:async P=>await Ue("POST",`/api/email-templates/${P}/reset`),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/email-templates"]}),n(null),u({title:"Template reset",description:"Email template has been reset to default"})},onError:P=>{u({title:"Error resetting template",description:P instanceof Error?P.message:"An error occurred while resetting the template",variant:"destructive"})}}),v=dt({mutationFn:async()=>await Ue("POST","/api/email-templates/reset-all"),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/email-templates"]}),n(null),u({title:"All templates reset",description:"All email templates have been reset to defaults"})},onError:P=>{u({title:"Error resetting templates",description:P instanceof Error?P.message:"An error occurred while resetting templates",variant:"destructive"})}});dt({mutationFn:async P=>await Ue("GET",`/api/email-templates/${P}/preview`),onSuccess:P=>{i(!0),u({title:"Template preview generated",description:"Preview is now available with sample data"})},onError:P=>{u({title:"Error generating preview",description:P instanceof Error?P.message:"An error occurred while generating the preview",variant:"destructive"})}});const b=dt({mutationFn:async({templateId:P,versionIndex:_})=>await Ue("POST",`/api/email-templates/${P}/restore/${_}`),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/email-templates"]}),l(null),u({title:"Version restored",description:"Template has been restored to the selected version"})},onError:P=>{u({title:"Error restoring version",description:P instanceof Error?P.message:"An error occurred while restoring the version",variant:"destructive"})}}
705),y=dt({mutationFn:async({templateId:P,recipientEmail:_,variables:I})=>await Ue("POST",`/api/email-templates/${P}/test`,{recipientEmail:_,variables:I}),onSuccess:()=>{d(""),u({title:"Test email sent",description:"A test email has been sent to the specified address"})},onError:P=>{u({title:"Error sending test email",description:P instanceof Error?P.message:"An error occurred while sending the test email",variant:"destructive"})}});p.useEffect(()=>{f&&f.length>0&&!e&&t(f[0].id)},[f,e]);const j=()=>{r&&g.mutate(r)},w=()=>{n(null)},N=P=>{n({...P})},S=P=>{x.mutate(P)},k=()=>{v.mutate()},T=(P,_)=>{y.mutate({templateId:P,recipientEmail:_})},C=(P,_)=>{b.mutate({templateId:P,versionIndex:_})};if(h)return s.jsx(k_e,{});if(m)return s.jsxs("div",{className:"p-4 text-center",children:[s.jsx("p",{className:"text-destructive font-semibold",children:"Error loading email templates"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:m instanceof Error?m.message:"An error occurred while loading templates"})]});if(!f||f.length===0)return s.jsx("div",{className:"p-4 text-center",children:s.jsx("p",{className:"text-muted-foreground",children:"No email templates found"})});const E=f.find(P=>P.id===e);return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold mb-1",children:"Email Templates"}),s.jsx("p",{className:"text-muted-foreground",children:"Manage and customize system email templates"})]}),s.jsxs(wj,{children:[s.jsx(KT,{asChild:!0,children:s.jsx(D,{variant:"outline",className:"ml-auto",children:"Reset All Templates"})}),s.jsxs(hx,{children:[s.jsxs(mx,{children:[s.jsx(gx,{children:"Reset all templates?"}),s.jsx(xx,{children:"This will reset all email templates to their default values. This action cannot be undone."})]}),s.jsxs(px,{children:[s.jsx(yx,{children:"Cancel"}),s.jsx(vx,{onClick:k,disabled:v.isPending,children:v.isPending?"Resetting...":"Reset All"})]})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[s.jsxs("div",{className:"col-span-1 border rounded-lg p-2",children:[s.jsx("div",{className:"font-medium px-2 py-1.5 text-sm",children:"Template Type"}),s.jsx(Oi,{className:"my-2"}),s.jsx("div",{className:"grid gap-1 p-1",children:f.map(P=>s.jsx(D,{variant:P.id===e?"default":"ghost",className:"justify-start font-normal",onClick:()=>t(P.id),children:P.name},P.id))})]}),s.jsx("div",{className:"col-span-1 md:col-span-3",children:E&&s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:E.name}),s.jsx(ye,{children:E.description})]}),s.jsx(te,{children:r&&r.id===E.id?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"subject",children:"Subject"}),s.jsx(ie,{id:"subject",value:r.subject,onChange:P=>n({...r,subject:P.target.value}),placeholder:"Email subject line"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"comment",children:"Change Comment"}),s.jsx(ie,{id:"comment",value:r.comment||"",onChange:P=>n({...r,comment:P.target.value}),placeholder:"Describe your changes (for version history)"})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"category",children:"Category"}),s.jsxs(Xe,{value:r.category||"",onValueChange:P=>n({...r,category:P}),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select a category"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"system",children:"System"}),s.jsx(Z,{value:"notification",children:"Notification"}),s.jsx(Z,{value:"marketing",children:"Marketing"}),s.jsx(Z,{value:"booking",children:"Booking"}),s.jsx(Z,{value:"user",children:"User"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"language",children:"Language"}),s.jsxs(Xe,{value:r.language||"en",onValueChange:P=>n({...r,language:P}),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select a language"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"en",children:"English"}),s.jsx(Z,{value:"es",children:"Spanish"}),s.jsx(Z,{value:"fr",children:"French"}),s.jsx(Z,{value:"de",children:"German"}),s.jsx(Z,{value:"zh",children:"Chinese"})]})]})]})]}),s.jsxs(Br,{defaultValue:"html",className:"w-full",children:[s.jsxs(Hr,{className:"mb-2",children:[s.jsx(We,{value:"html",children:"HTML Content"}),s.jsx(We,{value:"text",children:"Plain Text"})]}),s.jsx(Ve,{value:"html",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"htmlContent",children:"HTML Content"}),s.jsx(Es,{id:"htmlContent",value:r.htmlContent,onChange:P=>n({...r,htmlContent:P.target.value}),placeholder:"HTML content of the email",className:"min-h-[400px] font-mono text-sm"})]})}),s.jsx(Ve,{value:"text",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"textContent",children:"Plain Text Content"}),s.jsx(Es,{id:"textContent",value:r.textContent,onChange:P=>n({...r,textContent:P.target.value}),placeholder:"Plain text content of the email",className:"min-h-[400px] font-mono text-sm"})]})})]})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-sm text-muted-foreground mb-1",children:"Subject"}),s.jsx("p",{className:"p-2 border rounded-md",children:E.subject})]}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[E.category&&s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-sm text-muted-foreground mb-1",children:"Category"}),s.jsx(pe,{variant:"outline",className:"capitalize",children:E.category})]}),E.language&&s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-sm text-muted-foreground mb-1",children:"Language"}),s.jsx(pe,{variant:"outline",children:E.language==="en"?"English":E.language==="es"?"Spanish":E.language==="fr"?"French":E.language==="de"?"German":E.language==="zh"?"Chinese":E.language})]})]}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsxs(Ot,{children:[s.jsx(_c,{asChild:!0,children:s.jsx(D,{variant:"outline",size:"sm",children:"Preview"})}),s.jsxs(kt,{className:"max-w-3xl",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Email Preview"}),s.jsx($t,{children:"Preview how this email will look with sample data."})]}),s.jsxs("div",{className:"border rounded-md p-4 my-2",children:[s.jsxs("h3",{className:"font-medium",children:["Subject: ",E.subject]}),s.jsx(Oi,{className:"my-2"}),s.jsx("iframe",{srcDoc:E.htmlContent,className:"w-full h-[400px] border-0",title:"Email Preview",sandbox:"allow-same-origin"})]}),s.jsx(Bt,{children:s.jsxs(Ot,{children:[s.jsx(_c,{asChild:!0,children:s.jsx(D,{variant:"outline",children:"Send Test Email"})}),s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Send Test Email"}),s.jsx($t,{children:"Send a test email to verify the template."})]}),s.jsx("div",{className:"space-y-4 py-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"test-email",children:"Recipient Email"}),s.jsx(ie,{id:"test-email",placeholder:"Enter email address",value:c,onChange:P=>d(P.target.value)})]})}),s.jsx(Bt,{children:s.jsx(D,{onClick:()=>{c&&T(E.id,c)},disabled:!c||y.isPending,children:y.isPending?"Sending...":"Send"})})]})]})})]})]}),E.versionHistory&&E.versionHistory.length>0&&s.jsxs(Ot,{children:[s.jsx(_c,{asChild:!0,children:s.jsx(D,{variant:"outline",size:"sm",children:"Version History"})}),s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Version History"}),s.jsx($t,{children:"View and restore previous versions of this template."})]}),s.jsx(fg,{className:"h-[300px] w-full",children:s.jsx("div",{className:"space-y-4",children:E.versionHistory.map((P,_)=>s.jsxs("div",{className:"border rounded-md p-3 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:P.createdAt&&new Date(P.createdAt).toLocaleStr
705ing()}),s.jsx("p",{className:"text-sm text-muted-foreground",children:P.createdBy&&`By: ${P.createdBy}`})]}),s.jsx(D,{variant:"outline",size:"sm",onClick:()=>C(E.id,_),children:"Restore"})]}),P.comment&&s.jsxs("p",{className:"text-sm",children:["Comment: ",P.comment]})]},_))})})]})]})]})]})]}),s.jsxs(Br,{defaultValue:"html",className:"w-full",children:[s.jsxs(Hr,{className:"mb-2",children:[s.jsx(We,{value:"html",children:"HTML Content"}),s.jsx(We,{value:"text",children:"Plain Text"})]}),s.jsx(Ve,{value:"html",children:s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-sm text-muted-foreground mb-1",children:"HTML Content"}),s.jsx(fg,{className:"h-[400px] w-full border rounded-md p-4",children:s.jsx("pre",{className:"whitespace-pre-wrap font-mono text-sm",children:E.htmlContent})})]})}),s.jsx(Ve,{value:"text",children:s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-sm text-muted-foreground mb-1",children:"Plain Text Content"}),s.jsx(fg,{className:"h-[400px] w-full border rounded-md p-4",children:s.jsx("pre",{className:"whitespace-pre-wrap font-mono text-sm",children:E.textContent})})]})})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-sm text-muted-foreground mb-1",children:"Available Variables"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:E.variables.map(P=>s.jsx("div",{className:"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold",children:`{${P}}`},P))})]}),E.lastUpdated&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last updated: ",new Date(E.lastUpdated).toLocaleString()]})]})}),s.jsx(ta,{className:"flex justify-between",children:r&&r.id===E.id?s.jsxs(s.Fragment,{children:[s.jsx(D,{variant:"outline",onClick:w,children:"Cancel"}),s.jsx(D,{onClick:j,disabled:g.isPending,children:g.isPending?"Saving...":"Save Changes"})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(wj,{children:[s.jsx(KT,{asChild:!0,children:s.jsx(D,{variant:"outline",children:"Reset to Default"})}),s.jsxs(hx,{children:[s.jsxs(mx,{children:[s.jsx(gx,{children:"Reset this template?"}),s.jsx(xx,{children:"This will reset the template to its default values. This action cannot be undone."})]}),s.jsxs(px,{children:[s.jsx(yx,{children:"Cancel"}),s.jsx(vx,{onClick:()=>S(E.id),disabled:x.isPending,children:x.isPending?"Resetting...":"Reset"})]})]})]}),s.jsxs(Ot,{children:[s.jsx(_c,{asChild:!0,children:s.jsx(D,{variant:"outline",children:"Send Test"})}),s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Send Test Email"}),s.jsx($t,{children:"Send a test email to verify this template."})]}),s.jsx("div",{className:"space-y-4 py-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"footer-test-email",children:"Recipient Email"}),s.jsx(ie,{id:"footer-test-email",placeholder:"Enter email address",value:c,onChange:P=>d(P.target.value)})]})}),s.jsx(Bt,{children:s.jsx(D,{onClick:()=>{c&&T(E.id,c)},disabled:!c||y.isPending,children:y.isPending?"Sending...":"Send"})})]})]})]}),s.jsx(D,{onClick:()=>N(E),children:"Edit Template"})]})})]})})]})]})}const r$=[{value:"smart-scheduler",label:"Smart-Scheduler.ai"},{value:"calendly",label:"Calendly"},{value:"custom",label:"Custom Integration"}];function T_e(){var E,P;const{toast:e}=Qt(),[t,r]=p.useState(!1),[n,a]=p.useState(!1),[i,o]=p.useState(null),[l,c]=p.useState(""),[d,u]=p.useState(!1),[f,h]=p.useState(null),[m,g]=p.useState(null),[x,v]=p.useState({name:"",source:"smart-scheduler",webhookSecret:"",apiEndpoint:"",callbackUrl:"",callbackSecret:""}),{data:b=[],isLoading:y}=ut({queryKey:["/api/webhook-integrations"]}),j=dt({mutationFn:async _=>{const I=_.webhookSecret||crypto.randomUUID().replace(/-/g,"")+crypto.randomUUID().replace(/-/g,"");return{...await Ue("POST","/api/webhook-integrations",{..._,webhookSecret:I}),generatedSecret:I}},onSuccess:_=>{Wt.invalidateQueries({queryKey:["/api/webhook-integrations"]}),r(!1),v({name:"",source:"smart-scheduler",webhookSecret:"",apiEndpoint:"",callbackUrl:"",callbackSecret:""}),o(_.generatedSecret),c("Integration Created - Copy Your Secret"),a(!0)},onError:_=>{e({title:"Error",description:_.message,variant:"destructive"})}}),w=dt({mutationFn:async _=>Ue("DELETE",`/api/webhook-integrations/${_}`,null),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/webhook-integrations"]}),e({title:"Integration deleted"})},onError:_=>{e({title:"Error",description:_.message,variant:"destructive"})}}),N=dt({mutationFn:async({id:_,isActive:I})=>Ue("PATCH",`/api/webhook-integrations/${_}`,{isActive:I}),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/webhook-integrations"]})},onError:_=>{e({title:"Error",description:_.message,variant:"destructive"})}}),S=dt({mutationFn:async _=>await Ue("POST",`/api/webhook-integrations/${_}/regenerate-secret`,{}),onSuccess:_=>{Wt.invalidateQueries({queryKey:["/api/webhook-integrations"]}),o(_.webhookSecret),c("Secret Regenerated - Copy Your New Secret"),a(!0)},onError:_=>{e({title:"Error",description:_.message,variant:"destructive"})}}),k=dt({mutationFn:async _=>(g(_),await(await Ue("POST",`/api/webhook-integrations/${_}/test`,{})).json()),onSuccess:_=>{h(_),u(!0),g(null)},onError:_=>{g(null),e({title:"Test Failed",description:_.message,variant:"destructive"})}}),T=(_,I)=>{navigator.clipboard.writeText(_),e({title:"Copied",description:`${I} copied to clipboard`})},C=`${window.location.origin}/api/webhooks/smart-scheduler`;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs(fe,{className:"flex items-center gap-2",children:[s.jsx(rT,{className:"h-5 w-5"}),"Webhook Integrations"]}),s.jsx(ye,{children:"Connect external scheduling systems to sync appointments automatically."})]}),s.jsxs(D,{onClick:()=>r(!0),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Add Integration"]})]})}),s.jsxs(te,{children:[s.jsxs(Rr,{className:"mb-6",children:[s.jsx(IE,{className:"h-4 w-4"}),s.jsx(fl,{children:"How to Connect Brand Voice Interview"}),s.jsx($r,{className:"mt-2",children:s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Step 1:"})," Add an integration below. A secret will be generated that you can copy."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Step 2:"})," In Brand Voice Interview, paste the webhook URL and secret from here."]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Step 3:"})," Brand Voice Interview will use the secret to sign webhook requests."]}),s.jsx("p",{className:"text-muted-foreground",children:"Both systems must share the same secret for secure communication."})]})})]}),s.jsxs("div",{className:"mb-6 p-4 bg-muted rounded-lg",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Your Webhook Endpoint URL"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("code",{className:"text-sm bg-background px-3 py-2 rounded border flex-1 overflow-x-auto",children:C}),s.jsx(D,{variant:"outline",size:"sm",onClick:()=>T(C,"Webhook URL"),children:s.jsx(ea,{className:"h-4 w-4"})})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Copy this URL to Brand Voice Interview's webhook configuration."})]}),y?s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Loading integrations..."}):b.length===0?s.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[s.jsx(rT,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),s.jsx("p",{children:"No webhook integrations configured yet."}),s.jsx("p",{className:"text-sm",children:"Add an integration to start receiving appointment updates."})]}):s.jsx("div",{className:"space-y-4",children:b.map(_=>{var I;return s.jsx(X,{className:"bg-background",children:s.jsx(te,{className:"pt-4",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("h4",{className:"font-medium",children:_.name}),s.jsx(pe,{variant:_.isActive?"default":"secondary",children:_.isActive?"Active":"Inactive"}),s.jsx(pe,{variant:"outline",children:((I=r$.find(F=>F.value===_.source))==null?void 0:I.label)||_.source})]}),s.jsxs("div",{className:"text-sm text-muted-foreground space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(eT,{className:"h-3 w-3"}),s.jsx("span",{children:"Secret:"}),s.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs",children:"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢"}),s.jsxs(D,{variant:"outline",size:"sm",onClick:()=>S.mutate(_.id),disabled:S.isPending,className:"ml-2",children:[s.jsx(Bg,{className:`h-3 w-3 mr-1 ${S.isPending?"animate-spin":""}`}),"Get New Secret"]}
705),s.jsxs(D,{variant:"outline",size:"sm",onClick:()=>k.mutate(_.id),disabled:k.isPending,className:"ml-2",children:[m===_.id?s.jsx(Fg,{className:"h-3 w-3 mr-1 animate-spin"}):s.jsx(wh,{className:"h-3 w-3 mr-1"}),"Test Connection"]})]}),s.jsxs("p",{className:"text-xs text-amber-600 dark:text-amber-400 flex items-center gap-1",children:[s.jsx(C0,{className:"h-3 w-3"}),'Secrets can only be viewed once when created. Click "Get New Secret" to generate a new one you can copy.']}),s.jsxs("div",{className:"flex items-center gap-4 text-xs mt-2",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(dr,{className:"h-3 w-3"}),"Last webhook: ",_.lastWebhookAt?new Date(_.lastWebhookAt).toLocaleDateString():"Never"]}),s.jsxs("span",{children:["Total received: ",_.webhookCount||0]})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gr,{checked:_.isActive,onCheckedChange:F=>N.mutate({id:_.id,isActive:F})}),s.jsx(D,{variant:"destructive",size:"sm",onClick:()=>w.mutate(_.id),children:s.jsx(Pr,{className:"h-4 w-4"})})]})]})})},_.id)})})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Supported Events"}),s.jsx(ye,{children:"The following webhook events are supported for Smart-Scheduler integration."})]}),s.jsx(te,{children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-muted",children:[s.jsx(Aa,{className:"h-5 w-5 text-green-500 mt-0.5"}),s.jsxs("div",{children:[s.jsx("h5",{className:"font-medium",children:"appointment.created"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"When a new appointment is booked"})]})]}),s.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-muted",children:[s.jsx(Aa,{className:"h-5 w-5 text-green-500 mt-0.5"}),s.jsxs("div",{children:[s.jsx("h5",{className:"font-medium",children:"appointment.updated"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"When an appointment is rescheduled"})]})]}),s.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-muted",children:[s.jsx(xl,{className:"h-5 w-5 text-red-500 mt-0.5"}),s.jsxs("div",{children:[s.jsx("h5",{className:"font-medium",children:"appointment.cancelled"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"When an appointment is cancelled"})]})]}),s.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-muted",children:[s.jsx(Aa,{className:"h-5 w-5 text-blue-500 mt-0.5"}),s.jsxs("div",{children:[s.jsx("h5",{className:"font-medium",children:"appointment.completed"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"When an appointment is marked complete"})]})]})]})})]}),s.jsx(Ot,{open:t,onOpenChange:r,children:s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Add Webhook Integration"}),s.jsx($t,{children:"Configure a new webhook integration to receive appointment updates."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"name",children:"Integration Name"}),s.jsx(ie,{id:"name",placeholder:"e.g., Smart-Scheduler Production",value:x.name,onChange:_=>v({...x,name:_.target.value})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"source",children:"Source"}),s.jsxs(Xe,{value:x.source,onValueChange:_=>v({...x,source:_}),children:[s.jsx(Qe,{children:s.jsx(Je,{})}),s.jsx(Ze,{children:r$.map(_=>s.jsx(Z,{value:_.value,children:_.label},_.value))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"secret",children:"Webhook Secret (optional)"}),s.jsx(ie,{id:"secret",placeholder:"Leave blank to auto-generate",value:x.webhookSecret,onChange:_=>v({...x,webhookSecret:_.target.value})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Used to verify signatures on webhooks we RECEIVE. If left blank, a secure secret will be generated."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"callbackUrl",children:"Send bookings to (optional)"}),s.jsx(ie,{id:"callbackUrl",placeholder:"https://example.com/api/webhooks/smart-scheduler",value:x.callbackUrl,onChange:_=>v({...x,callbackUrl:_.target.value}),"data-testid":"input-callback-url"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["When someone books, we POST an ",s.jsx("code",{children:"appointment.created"})," event to this URL. Leave blank to send nothing."]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"callbackSecret",children:"Signing secret for outbound (optional)"}),s.jsx(ie,{id:"callbackSecret",placeholder:"Shared secret the receiving system expects",value:x.callbackSecret,onChange:_=>v({...x,callbackSecret:_.target.value}),"data-testid":"input-callback-secret"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Signs outbound events (HMAC-SHA256, sent as ",s.jsx("code",{children:"X-Webhook-Signature"}),"). Must match what the receiving system is configured with â if it verifies signatures and this is blank, it will reject every event."]})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),s.jsx(D,{onClick:()=>j.mutate(x),disabled:!x.name||j.isPending,children:j.isPending?"Creating...":"Create Integration"})]})]})}),s.jsx(Ot,{open:n,onOpenChange:_=>{a(_),_||o(null)},children:s.jsxs(kt,{className:"sm:max-w-lg",children:[s.jsxs(Ct,{children:[s.jsxs(Tt,{className:"flex items-center gap-2",children:[s.jsx(eT,{className:"h-5 w-5"}),l]}),s.jsx($t,{children:"Copy this secret now and paste it into Brand Voice Interview's webhook configuration. This secret will not be shown again for security reasons."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs(Rr,{variant:"destructive",className:"bg-amber-50 dark:bg-amber-950 border-amber-200 dark:border-amber-800",children:[s.jsx(C0,{className:"h-4 w-4 text-amber-600"}),s.jsx(fl,{className:"text-amber-800 dark:text-amber-200",children:"Important"}),s.jsx($r,{className:"text-amber-700 dark:text-amber-300",children:"Copy this secret before closing. You won't be able to see it again."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Your Webhook Secret"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("code",{className:"flex-1 p-3 bg-muted rounded text-sm break-all font-mono border",children:i}),s.jsxs(D,{variant:"default",onClick:()=>i&&T(i,"Secret"),className:"shrink-0",children:[s.jsx(ea,{className:"h-4 w-4 mr-2"}),"Copy"]})]})]}),s.jsxs("div",{className:"text-sm text-muted-foreground bg-muted p-3 rounded",children:[s.jsx("p",{className:"font-medium mb-1",children:"Next step:"}),s.jsx("p",{children:"Paste this secret into Brand Voice Interview's webhook settings to complete the connection."})]})]}),s.jsx(Bt,{children:s.jsx(D,{onClick:()=>{a(!1),o(null)},children:"I've Copied the Secret"})})]})}),s.jsx(Ot,{open:d,onOpenChange:u,children:s.jsxs(kt,{className:"sm:max-w-lg",children:[s.jsxs(Ct,{children:[s.jsxs(Tt,{className:"flex items-center gap-2",children:[f!=null&&f.success?s.jsx(Aa,{className:"h-5 w-5 text-green-500"}):s.jsx(xl,{className:"h-5 w-5 text-red-500"}),"Connection Test ",f!=null&&f.success?"Passed":"Failed"]}),s.jsx($t,{children:f==null?void 0:f.message})]}),s.jsxs("div",{className:"space-y-4",children:[f!=null&&f.success?s.jsxs(Rr,{className:"bg-green-50 dark:bg-green-950 border-green-200 dark:border-green-800",children:[s.jsx(Aa,{className:"h-4 w-4 text-green-600"}),s.jsx(fl,{className:"text-green-800 dark:text-green-200",children:"SmartScheduler Ready"}),s.jsx($r,{className:"text-green-700 dark:text-green-300",children:"This integration is configured correctly. To complete the connection, ensure Brand Voice Interview has the same webhook secret configured."})]}):s.jsxs(Rr,{variant:"destructive",children:[s.jsx(xl,{className:"h-4 w-4"}),s.jsx(fl,{children:"Configuration Issue"}),s.jsx($r,{children:((E=f==null?void 0:f.details)==null?void 0:E.hasSecret)===!1?"No webhook secret is configured. Please generate a new secret.":(P=f==null?void 0:f.details)!=null&&P.integrationActive?"There was a problem verifying the configuration. Please check your settings.":"This integration is disabled. Enable it using the toggle to re
705ceive webhooks."})]}),(f==null?void 0:f.details)&&s.jsxs("div",{className:"bg-muted p-4 rounded-lg space-y-2",children:[s.jsx("h4",{className:"font-medium text-sm",children:"Test Details"}),s.jsxs("div",{className:"text-sm space-y-1",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Secret Configured:"}),s.jsx("span",{className:f.details.hasSecret?"text-green-600":"text-red-600",children:f.details.hasSecret?"Yes":"No"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Signature Valid:"}),s.jsx("span",{className:f.details.signatureValid?"text-green-600":"text-red-600",children:f.details.signatureValid?"Yes":"No"})]}),f.details.integrationActive!==void 0&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Integration Active:"}),s.jsx("span",{className:f.details.integrationActive?"text-green-600":"text-amber-600",children:f.details.integrationActive?"Yes":"No"})]}),f.details.webhookCount!==void 0&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Webhooks Received:"}),s.jsx("span",{children:f.details.webhookCount})]}),f.details.lastWebhookAt&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Last Webhook:"}),s.jsx("span",{children:new Date(f.details.lastWebhookAt).toLocaleString()})]}),f.details.generatedSignature&&s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Test Signature:"}),s.jsx("code",{className:"text-xs bg-background px-2 py-1 rounded",children:f.details.generatedSignature})]})]})]})]}),s.jsx(Bt,{children:s.jsx(D,{onClick:()=>u(!1),children:"Close"})})]})})]})}function __e(){const{toast:e}=Qt(),[t,r]=p.useState(!1),[n,a]=p.useState(""),[i,o]=p.useState(""),[l,c]=p.useState(""),[d,u]=p.useState(""),[f,h]=p.useState(""),{data:m=[],isLoading:g}=ut({queryKey:["/api/out-of-office"]}),x=dt({mutationFn:async w=>(await Ue("POST","/api/out-of-office",w)).json(),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/out-of-office"]}),r(!1),a(""),o(""),c(""),u(""),h(""),e({title:"Out-of-office created",description:"Your availability has been updated."})},onError:w=>{e({title:"Error",description:w.message,variant:"destructive"})}}),v=dt({mutationFn:async w=>{await Ue("DELETE",`/api/out-of-office/${w}`)},onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/out-of-office"]}),e({title:"Entry removed"})}}),b=dt({mutationFn:async({id:w,isActive:N})=>(await Ue("PUT",`/api/out-of-office/${w}`,{isActive:N})).json(),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/out-of-office"]})}}),y=()=>{if(!n||!i){e({title:"Error",description:"Start and end dates are required",variant:"destructive"});return}x.mutate({startDate:n,endDate:i,reason:l||null,message:d||null,redirectToBookingLinkSlug:f||null})},j=new Date().toISOString().split("T")[0];return s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsxs(fe,{className:"flex items-center gap-2",children:[s.jsx(Gt,{className:"h-5 w-5"}),"Out of Office"]}),s.jsx(ye,{children:"Set dates when you're unavailable. Optionally redirect bookers to a teammate's booking link."})]}),s.jsxs(te,{className:"space-y-4",children:[g?s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):m.length===0&&!t?s.jsx("p",{className:"text-sm text-muted-foreground",children:"No out-of-office entries configured."}):null,m.map(w=>{const N=w.isActive&&w.startDate<=j&&w.endDate>=j;return s.jsxs("div",{className:`flex items-center justify-between p-3 border rounded-lg ${N?"bg-amber-50 border-amber-200":"bg-gray-50"}`,children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"font-medium text-sm",children:[w.startDate," ",s.jsx(Gw,{className:"inline h-3 w-3"})," ",w.endDate]}),N&&s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-amber-100 text-amber-700 font-medium",children:"Currently active"})]}),w.reason&&s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:w.reason}),w.message&&s.jsxs("p",{className:"text-xs text-gray-500 mt-0.5 italic",children:['"',w.message,'"']}),w.redirectToBookingLinkSlug&&s.jsxs("p",{className:"text-xs text-blue-600 mt-0.5",children:["Redirecting to: ",w.redirectToBookingLinkSlug]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gr,{checked:w.isActive,onCheckedChange:S=>b.mutate({id:w.id,isActive:S})}),s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>v.mutate(w.id),children:s.jsx(Pr,{className:"h-4 w-4 text-red-500"})})]})]},w.id)}),t&&s.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-white",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Start Date"}),s.jsx(ie,{type:"date",value:n,onChange:w=>a(w.target.value),min:j,className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"End Date"}),s.jsx(ie,{type:"date",value:i,onChange:w=>o(w.target.value),min:n||j,className:"mt-1"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Reason (optional)"}
705),s.jsx(ie,{value:l,onChange:w=>c(w.target.value),placeholder:"e.g., Vacation, Conference",className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Message to bookers (optional)"}),s.jsx(Es,{value:d,onChange:w=>u(w.target.value),placeholder:"e.g., I'm on vacation until March 25. Please book with my colleague instead.",rows:2,className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Redirect to booking link slug (optional)"}),s.jsx(ie,{value:f,onChange:w=>h(w.target.value),placeholder:"e.g., colleague-30min",className:"mt-1"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Enter a teammate's booking link slug to redirect bookers there while you're away"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(D,{onClick:y,disabled:x.isPending,children:x.isPending?"Creating...":"Create"}),s.jsx(D,{variant:"outline",onClick:()=>r(!1),children:"Cancel"})]})]}),!t&&s.jsxs(D,{variant:"outline",onClick:()=>r(!0),children:[s.jsx(Sr,{className:"h-4 w-4 mr-1"}),"Add Out-of-Office Period"]})]})]})}function P_e(){const[e,t]=p.useState(!1),{isAdmin:r}=gn(),n=()=>{t(!0)};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:n}),s.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-white dark:bg-slate-800",children:[s.jsxs("div",{className:"border-b border-neutral-300 dark:border-slate-700 p-4 md:p-6 bg-white dark:bg-slate-800",children:[s.jsx("h1",{className:"text-lg md:text-xl font-semibold text-neutral-700 dark:text-slate-200",children:"Settings"}),s.jsx("p",{className:"text-xs md:text-sm text-neutral-500 dark:text-slate-400 mt-1",children:"Configure your account preferences and settings."})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4 md:p-6 pb-20 md:pb-6",children:s.jsxs(Br,{defaultValue:"reminders",className:"space-y-6",children:[s.jsxs(Hr,{className:"mb-6 w-full sm:w-auto overflow-x-auto flex-nowrap justify-start",children:[s.jsx(We,{value:"reminders",className:"whitespace-nowrap",children:"Reminders"}),s.jsx(We,{value:"privacy",className:"whitespace-nowrap",children:"Privacy"}),s.jsx(We,{value:"integrations",className:"whitespace-nowrap",children:"Webhooks"}),s.jsx(We,{value:"out-of-office",className:"whitespace-nowrap",children:"Out of Office"}),r&&s.jsxs(s.Fragment,{children:[s.jsx(We,{value:"notifications",className:"whitespace-nowrap",children:"Notifications"}),s.jsx(We,{value:"email-templates",className:"whitespace-nowrap",children:"Templates"})]})]}),s.jsx(Ve,{value:"reminders",children:s.jsx(jCe,{})}),s.jsx(Ve,{value:"privacy",children:s.jsx(wCe,{})}),s.jsx(Ve,{value:"integrations",children:s.jsx(T_e,{})}),s.jsx(Ve,{value:"out-of-office",children:s.jsx(__e,{})}),r&&s.jsxs(s.Fragment,{children:[s.jsx(Ve,{value:"notifications",children:s.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:s.jsx("div",{children:s.jsx(XTe,{})})})}),s.jsx(Ve,{value:"email-templates",children:s.jsx(C_e,{})})]})]})})]})]}),s.jsx(Ds,{onCreateEventClick:n}),s.jsx(Mn,{isOpen:e,onClose:()=>t(!1)}),s.jsx(hi,{})]})}const cs=[];for(let e=0;e<256;++e)cs.push((e+256).toString(16).slice(1));function E_e(e,t=0){return(cs[e[t+0]]+cs[e[t+1]]+cs[e[t+2]]+cs[e[t+3]]+"-"+cs[e[t+4]]+cs[e[t+5]]+"-"+cs[e[t+6]]+cs[e[t+7]]+"-"+cs[e[t+8]]+cs[e[t+9]]+"-"+cs[e[t+10]]+cs[e[t+11]]+cs[e[t+12]]+cs[e[t+13]]+cs[e[t+14]]+cs[e[t+15]]).toLowerCase()}let uk;const O_e=new Uint8Array(16);function A_e(){if(!uk){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");uk=crypto.getRandomValues.bind(crypto)}return uk(O_e)}const D_e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),n$={randomUUID:D_e};function Gy(e,t,r){var a;if(n$.randomUUID&&!t&&!e)return n$.randomUUID();e=e||{};const n=e.random??((a=e.rng)==null?void 0:a.call(e))??A_e();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,E_e(n)}function s$({selected:e,onSelect:t,className:r,id:n}){return s.jsxs(BQ,{children:[s.jsx(UQ,{asChild:!0,children:s.jsxs(D,{id:n,variant:"outline",className:Oe("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",r),children:[s.jsx(Gt,{className:"mr-2 h-4 w-4"}),e?pt(e,"PPP"):s.jsx("span",{children:"Pick a date"})]})}),s.jsx(SO,{className:"w-auto p-0",align:"start",children:s.jsx(PN,{mode:"single",selected:e,onSelect:t,initialFocus:!0})})]})}const GZ=()=>ut({queryKey:["/api/settings"],staleTime:1e3*60*5}),KZ=()=>dt({mutationFn:e=>Ue("PATCH","/api/settings",e),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/settings"]})}});function Ls({className:e,...t}){return s.jsx("div",{className:Oe("animate-pulse rounded-md bg-muted",e),...t})}const M_e={0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"};function I_e(){const[e,t]=p.useState([]),[r,n]=p.useState(!1),{data:a,isLoading:i}=ut({queryKey:["/api/booking"]});p.useEffect(()=>{if(!a||a.length===0)return;const u=Array.from({length:7},(f,h)=>({day:h.toString(),dayName:M_e[h.toString()],isAvailable:!1,timeRanges:[]}));a.forEach(f=>{!f.availability||!f.availability.days||f.availability.days.forEach(h=>{var x;const m=parseInt(h),g=u[m];if(g.isAvailable=!0,(x=f.availability)!=null&&x.hours){const{start:v,end:b}=f.availability.hours;g.timeRanges.some(j=>j.start===v&&j.end===b)||g.timeRanges.push({start:v,end:b})}})}),u.forEach(f=>{f.timeRanges.sort((h,m)=>h.start<m.start?-1:h.start>m.start?1:0)}),t(u)},[a]);const o=u=>{try{const[f,h]=u.split(":").map(Number),m=f>=12?"PM":"AM";return`${f%12||12}:${h.toString().padStart(2,"0")} ${m}`}catch{return u}},l=()=>{const u=e.filter(f=>f.isAvailable);
705return u.length===0?"No availability set":u.length===7?"Available every day":u.length===5&&!e[0].isAvailable&&!e[6].isAvailable?"Available Mon-Fri":`Available ${u.length} days/week`},c=()=>(e.filter(u=>u.isAvailable),e.filter(u=>!u.isAvailable),s.jsx("div",{className:"space-y-3",children:s.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.map(u=>s.jsx(pe,{variant:"outline",className:u.isAvailable?"bg-green-50 text-green-700 border-green-200 dark:bg-green-900/20 dark:text-green-400 dark:border-green-800":"bg-gray-50 text-gray-500 border-gray-200 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-700",children:u.dayName.slice(0,3)},u.day))})})),d=()=>s.jsxs("div",{className:"space-y-4 mt-4",children:[s.jsx("h3",{className:"text-sm font-medium",children:"Daily Schedule:"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.map(u=>s.jsxs("div",{className:`p-3 border rounded-md ${u.isAvailable?"border-green-200 bg-green-50":"border-gray-200 bg-gray-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"font-medium",children:u.dayName}),u.isAvailable?s.jsx(pe,{variant:"outline",className:"bg-green-100 text-green-800 border-green-300",children:"Available"}):s.jsx(pe,{variant:"outline",className:"bg-gray-100 text-gray-800 border-gray-300",children:"Unavailable"})]}),u.isAvailable?u.timeRanges.length>0?s.jsx("div",{className:"space-y-1 mt-2",children:u.timeRanges.map((f,h)=>s.jsxs("div",{className:"flex items-center text-sm",children:[s.jsx(dr,{className:"h-3 w-3 mr-1 text-green-600"}),s.jsxs("span",{children:[o(f.start)," - ",o(f.end)]})]},h))}):s.jsx("div",{className:"text-sm text-gray-500 mt-2",children:"No specific hours set"}):s.jsx("div",{className:"text-sm text-gray-500 mt-2",children:"Not available for bookings"})]},u.day))})]});return i?s.jsx(X,{children:s.jsx(te,{className:"py-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ls,{className:"h-10 w-10 rounded-full"}),s.jsxs("div",{className:"flex-1",children:[s.jsx(Ls,{className:"h-4 w-32 mb-1"}),s.jsx(Ls,{className:"h-3 w-48"})]})]})})}):!a||a.length===0?s.jsx(X,{children:s.jsx(te,{className:"py-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-10 w-10 rounded-full bg-muted flex items-center justify-center",children:s.jsx(Gt,{className:"h-5 w-5 text-muted-foreground"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:"Booking Hours"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"No booking links configured yet"})]})]}),s.jsx(Te,{href:"/booking",children:s.jsx(D,{variant:"outline",size:"sm",children:"Create Booking Link"})})]})})}):s.jsx(X,{children:s.jsx(Z0,{open:r,onOpenChange:n,children:s.jsxs(te,{className:"py-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(dr,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:"Booking Hours"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:l()})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Te,{href:"/booking",children:s.jsxs(D,{variant:"ghost",size:"sm",className:"text-xs",children:["Edit",s.jsx(Zr,{className:"h-3 w-3 ml-1"})]})}),s.jsx(X0,{asChild:!0,children:s.jsx(D,{variant:"ghost",size:"icon",className:"h-8 w-8",children:r?s.jsx(vh,{className:"h-4 w-4"}):s.jsx(Dl,{className:"h-4 w-4"})})})]})]}),s.jsx(J0,{className:"pt-4",children:s.jsxs("div",{className:"space-y-4 border-t pt-4",children:[c(),d()]})})]})})})}function R_e(){const{data:e}=GZ(),t=KZ(),{data:r,isLoading:n,userTimeZone:a}=eO(),[i,o]=p.useState("UTC"),[l,c]=p.useState(!1);p.useEffect(()=>{e!=null&&e.preferredTimezone?o(e.preferredTimezone):a&&o(a)},[e,a]);const d=f=>{o(f),c(!0)},u=()=>{t.mutate({preferredTimezone:i},{onSuccess:()=>{c(!1)}})};return s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Yc,{className:"h-5 w-5 text-primary"}),s.jsx(fe,{children:"Timezone Settings"})]}),s.jsx(ye,{children:"Set your preferred timezone for all bookings. When others schedule meetings with you, this timezone will be used as the default."})]}),s.jsx(te,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"timezone",children:"Preferred Timezone"}),s.jsxs(Xe,{value:i,onValueChange:d,disabled:n,children:[s.jsx(Qe,{id:"timezone",className:"w-full","data-tutorial":"timezone-selection",children:s.jsx(Je,{placeholder:"Select your timezone"})}),s.jsx(Ze,{children:r==null?void 0:r.map(f=>s.jsx(Z,{value:f.id,children:f.name},f.id))})]}),s.jsxs("div",{className:"text-sm text-muted-foreground mt-2",children:[s.jsx("p",{className:"mb-1",children:"This timezone will be used as the default when others book appointments with you. All your available booking slots will be shown in this timezone (9:00 AM - 5:00 PM)."}),s.jsx("p",{className:"font-medium text-primary",children:"Visitors will initially see times in your timezone, but they can switch to their local timezone if needed."})]})]}),l&&s.jsx("div",{className:"flex justify-end mt-4",children:s.jsx(D,{onClick:u,disabled:t.isPending,children:t.isPending?"Saving...":"Save Changes"})})]})})]})}function $_e(){const{data:e}=GZ(),t=KZ(),{toast:r}=Qt(),[n,a]=p.useState(!1),[i,o]=p.useState(!1);p.useState(!1);const[l,c]=p.useState(null),[d,u]=p.useState(!1),[f,h]=p.useState(!1),[m,g]=p.useState({id:Gy(),title:"",startDate:new Date,endD
705ate:new Date,allDay:!0,blockType:"custom",recurrence:"none"}),x=p.useMemo(()=>e?Array.isArray(e.timeBlocks)?e.timeBlocks.map(C=>({...C,startDate:new Date(C.startDate),endDate:new Date(C.endDate)})):[]:[],[e]),v=(C,E)=>{const P=pt(C,"MMM d"),_=pt(E,"MMM d");return P===_?`Time Off - ${P}`:`Time Off - ${P} to ${_}`},b=()=>{const C={...m,title:m.title.trim()||v(m.startDate,m.endDate)},E=[...x,C];t.mutate({timeBlocks:E},{onSuccess:()=>{r({title:"Time blocked",description:`"${C.title}" has been added to your calendar.`}),g({id:Gy(),title:"",startDate:new Date,endDate:new Date,allDay:!0,blockType:"custom",recurrence:"none"}),u(!1),h(!1),o(!1)},onError:P=>{r({title:"Error",description:(P==null?void 0:P.message)||"Failed to add time block. Please try again.",variant:"destructive"})}})},y=()=>{const C=new Date,E={id:Gy(),title:`Time Off - ${pt(C,"MMM d")}`,startDate:C,endDate:C,allDay:!0,blockType:"personal",recurrence:"none"},P=[...x,E];t.mutate({timeBlocks:P},{onSuccess:()=>{r({title:"Done",description:"Today has been blocked off."})}})},j=()=>{const C=new Date,E=Dv(C),P={id:Gy(),title:`Time Off - Week of ${pt(C,"MMM d")}`,startDate:C,endDate:E,allDay:!0,blockType:"personal",recurrence:"none"},_=[...x,P];t.mutate({timeBlocks:_},{onSuccess:()=>{r({title:"Done",description:"This week has been blocked off."})}})},w=C=>{const E=x.find(_=>_.id===C),P=x.filter(_=>_.id!==C);c(C),t.mutate({timeBlocks:P},{onSuccess:()=>{r({title:"Deleted",description:`"${(E==null?void 0:E.title)||"Unavailable time block"}" has been removed.`}),c(null)},onError:_=>{r({title:"Error",description:(_==null?void 0:_.message)||"Failed to delete unavailable time block. Please try again.",variant:"destructive"}),c(null)}})},N=p.useMemo(()=>{const C=new Date;return x.filter(E=>Bc(new Date(E.endDate),C))},[x]),S=p.useMemo(()=>{const C=new Date;return x.filter(E=>wu(new Date(E.endDate),C))},[x]),k=C=>{const E=pt(new Date(C.startDate),"MMM d, yyyy"),P=pt(new Date(C.endDate),"MMM d, yyyy");return E===P?E:`${E} - ${P}`},T=C=>s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg hover:bg-gray-50 dark:hover:bg-slate-700/50 transition-colors",children:[s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsxs("div",{className:`p-2 rounded-full ${C.blockType==="vacation"?"bg-blue-100 dark:bg-blue-900/30":C.blockType==="holiday"?"bg-green-100 dark:bg-green-900/30":C.blockType==="personal"?"bg-purple-100 dark:bg-purple-900/30":"bg-gray-100 dark:bg-gray-800"}`,children:[C.blockType==="vacation"&&s.jsx(Gt,{className:"h-4 w-4 text-blue-600"}),C.blockType==="holiday"&&s.jsx(Gt,{className:"h-4 w-4 text-green-600"}),C.blockType==="personal"&&s.jsx(Gt,{className:"h-4 w-4 text-purple-600"}),C.blockType==="custom"&&s.jsx(boe,{className:"h-4 w-4 text-gray-600"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-sm",children:C.title}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:k(C)}),C.recurrence&&C.recurrence!=="none"&&s.jsxs(pe,{variant:"outline",className:"mt-1 text-xs",children:["Repeats ",C.recurrence]})]})]}),s.jsxs(wj,{children:[s.jsx(KT,{asChild:!0,children:s.jsx(D,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-red-500 hover:bg-red-50",disabled:l===C.id,children:s.jsx(Pr,{className:"h-4 w-4"})})}),s.jsxs(hx,{children:[s.jsxs(mx,{children:[s.jsx(gx,{children:"Remove time block?"}),s.jsxs(xx,{children:['This will remove "',C.title,'" and make that time available for bookings again.']})]}),s.jsxs(px,{children:[s.jsx(yx,{children:"Cancel"}),s.jsx(vx,{onClick:()=>w(C.id),className:"bg-red-600 hover:bg-red-700",children:l===C.id?"Removing...":"Remove"})]})]})]})]},C.id);return s.jsxs("div",{className:"space-y-6",children:[s.jsx(I_e,{}),s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs(fe,{className:"flex items-center gap-2",children:[s.jsx(N0,{className:"h-5 w-5"}),"Time Off"]}),s.jsx(ye,{children:"Block dates when you're unavailable for bookings"})]}),s.jsxs(Ot,{open:f,onOpenChange:h,children:[s.jsx(_c,{asChild:!0,children:s.jsxs(D,{children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Block Time"]})}),s.jsxs(kt,{className:"sm:max-w-md",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Block Time Off"}),s.jsx($t,{children:"Select the dates you won't be available for meetings."})]}),s.jsxs("div",{className:"space-y-4 py-2",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"startDate",className:"text-sm",children:"From"}),s.jsx(s$,{id:"startDate",selected:m.startDate,onSelect:C=>{C&&g({...m,startDate:C,endDate:Bc(C,m.endDate)?C:m.endDate})},className:"mt-1 w-full"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"endDate",className:"text-sm",children:"To"}),s.jsx(s$,{id:"endDate",selected:m.endDate,onSelect:C=>C&&g({...m,endDate:C}),className:"mt-1 w-full"})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"title",className:"text-sm",children:"Label (optional)"}),s.jsx(ie,{id:"title",value:m.title,onChange:C=>g({...m,title:C.target.value}),placeholder:"e.g. Vacation, Doctor's appointment",className:"mt-1"})]}),s.jsxs(Z0,{open:d,onOpenChange:u,children:[s.jsx(X0,{asChild:!0,children:s.jsxs(D,{variant:"ghost",size:"sm",className:"w-full justify-between text-muted-foreground",children:["Advanced options",d?s.jsx(vh,{className:"h-4 w-4"}):s.jsx(Dl,{className:"h-4 w-4"})]})}),s.jsxs(J0,{className:"space-y-4 pt-2",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"blockType",className:"text-sm",children:"Type"}),s.jsxs(Xe,{value:m.blockType,onValueChange:C=>g({...m,blockType:C}),children:[s.jsx(Qe,{id:"blockType",className:"mt-1",children:s.jsx(Je,{})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"vacation",children:"Vacation"}),s.jsx(Z,{value:"holiday",children:"Holiday"}),s.jsx(Z,{value:"personal",children:"Personal Time"}),s.jsx(Z,{value:"custom",children:"Other"})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"recurrence",className:"text-sm",children:"Repeat"}),s.jsxs(Xe,{value:m.recurrence,onValueChange:C=>g({...m,recurrence:C}
705),children:[s.jsx(Qe,{id:"recurrence",className:"mt-1",children:s.jsx(Je,{})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"none",children:"Does not repeat"}),s.jsx(Z,{value:"weekly",children:"Weekly"}),s.jsx(Z,{value:"monthly",children:"Monthly"}),s.jsx(Z,{value:"yearly",children:"Yearly"})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"notes",className:"text-sm",children:"Notes"}),s.jsx(ie,{id:"notes",value:m.notes||"",onChange:C=>g({...m,notes:C.target.value}),placeholder:"Additional details",className:"mt-1"})]})]})]})]}),s.jsxs(Bt,{children:[s.jsx(ape,{asChild:!0,children:s.jsx(D,{variant:"outline",children:"Cancel"})}),s.jsx(D,{onClick:b,disabled:t.isPending,children:t.isPending?"Adding...":"Block Time"})]})]})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs(D,{variant:"outline",size:"sm",onClick:y,disabled:t.isPending,children:[s.jsx(wh,{className:"h-3 w-3 mr-1"}),"Block today"]}),s.jsxs(D,{variant:"outline",size:"sm",onClick:j,disabled:t.isPending,children:[s.jsx(wh,{className:"h-3 w-3 mr-1"}),"Block this week"]})]}),N.length===0&&S.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center border rounded-lg border-dashed",children:[s.jsx(N0,{className:"h-10 w-10 text-muted-foreground mb-3"}),s.jsx("h3",{className:"font-medium",children:"No time blocked"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mt-1",children:`Click "Block Time" to mark dates when you won't be available for bookings.`})]}):s.jsxs("div",{className:"space-y-2",children:[N.map(T),S.length>0&&s.jsxs(Z0,{open:n,onOpenChange:a,children:[s.jsx(X0,{asChild:!0,children:s.jsxs(D,{variant:"ghost",size:"sm",className:"w-full justify-center text-muted-foreground mt-4",children:[n?"Hide":"Show"," ",S.length," past ",S.length===1?"block":"blocks",n?s.jsx(vh,{className:"h-4 w-4 ml-1"}):s.jsx(Dl,{className:"h-4 w-4 ml-1"})]})}),s.jsx(J0,{className:"space-y-2 pt-2",children:S.map(C=>s.jsx("div",{className:"opacity-60",children:T(C)},C.id))})]})]})]})]}),s.jsx(R_e,{}),s.jsx(X,{children:s.jsx(te,{className:"py-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Gt,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:"Working Hours"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Set your regular availability in booking links"})]})]}),s.jsx(Te,{href:"/booking",children:s.jsxs(D,{variant:"outline",size:"sm",children:["Manage",s.jsx(Zr,{className:"h-3 w-3 ml-1"})]})})]})})})]})}const a$=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function L_e(){const[e,t]=p.useState(!1),[r,n]=p.useState(!1),[a,i]=p.useState(null),[o,l]=p.useState(!1),[c,d]=p.useState(null),{toast:u}=Qt(),[f,h]=p.useState(""),[m,g]=p.useState(!1),[x,v]=p.useState([{dayOfWeek:1,startTime:"09:00",endTime:"17:00"},{dayOfWeek:2,startTime:"09:00",endTime:"17:00"},{dayOfWeek:3,startTime:"09:00",endTime:"17:00"},{dayOfWeek:4,startTime:"09:00",endTime:"17:00"},{dayOfWeek:5,startTime:"09:00",endTime:"17:00"}]),[b,y]=p.useState(""),[j,w]=p.useState(!0),[N,S]=p.useState("09:00"),[k,T]=p.useState("17:00"),[C,E]=p.useState(""),{data:P=[],isLoading:_}=ut({queryKey:["/api/availability-schedules"]}),{data:I=[],isLoading:F}=ut({queryKey:["/api/date-overrides"]}),H=dt({mutationFn:async U=>a?(await Ue("PUT",`/api/availability-schedules/${a.id}`,U)).json():(await Ue("POST","/api/availability-schedules",U)).json(),onSuccess:()=>{u({title:"Success",description:a?"Schedule updated":"Schedule created"}),n(!1),i(null),Wt.invalidateQueries({queryKey:["/api/availability-schedules"]})},onError:U=>u({title:"Error",description:U.message,variant:"destructive"})}),W=dt({mutationFn:async U=>(await Ue("DELETE",`/api/availability-schedules/${U}`)).json(),onSuccess:()=>{u({title:"Success",description:"Schedule deleted"}),Wt.invalidateQueries({queryKey:["/api/availability-schedules"]})},onError:U=>u({title:"Error",description:U.message,variant:"destructive"})}),z=dt({mutationFn:async U=>c?(await Ue("PUT",`/api/date-overrides/${c.id}`,U)).json():(await Ue("POST","/api/date-overrides",U)).json(),onSuccess:()=>{u({title:"Success",description:c?"Override updated":"Override created"}),l(!1),d(null),Wt.invalidateQueries({queryKey:["/api/date-overrides"]})},onError:U=>u({title:"Error",description:U.message,variant:"destructive"})}),R=dt({mutationFn:async U=>(await Ue("DELETE",`/api/date-overrides/${U}`)).json(),onSuccess:()=>{u({title:"Success",description:"Override deleted"}),Wt.invalidateQueries({queryKey:["/api/date-overrides"]})},onError:U=>u({title:"Error",description:U.message,variant:"destructive"})}),q=U=>{U?(i(U),h(U.name),g(U.isDefault??!1),v(U.rules||[])):(i(null),h(""),g(!1),v([{dayOfWeek:1,startTime:"09:00",endTime:"17:00"},{dayOfWeek:2,startTime:"09:00",endTime:"17:00"},{dayOfWeek:3,startTime:"09:00",endTime:"17:00"},{dayOfWeek:4,startTime:"09:00",endTime:"17:00"},{dayOfWeek:5,startTime:"09:00",endTime:"17:00"}])),n(!0)},V=U=>{U?(d(U),y(U.date),w(U.isAvailable??!0),S(U.startTime||"09:00"),T(U.endTime||"17:00"),E(U.label||"")):(d(null),y(""),w(!0),S("09:00"),T("17:00"),E("")),l(!0)},se=U=>{const M=x.find(G=>G.dayOfWeek===U);v(M?x.filter(G=>G.dayOfWeek!==U):[...x,{dayOfWeek:U,startTime:"09:00",endTime:"17:00"}].sort((G,K)=>G.dayOfWeek-K.dayOfWeek))},oe=(U,M,G)=>{v(x.map(K=>K.dayOfWeek===U?{...K,[M]:G}:K))},_e=()=>{t(!0)};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dar
705k:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:_e}),s.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-white dark:bg-slate-800",children:[s.jsx("div",{className:"border-b border-neutral-200 dark:border-slate-700 px-4 md:px-8 py-5 bg-white dark:bg-slate-800",children:s.jsxs("div",{className:"max-w-6xl",children:[s.jsx("h1",{className:"text-xl md:text-2xl font-semibold text-neutral-900 dark:text-slate-100",children:"Availability"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400 mt-1",children:"Manage your schedule, availability schedules, and date overrides."})]})}),s.jsx("div",{className:"flex-1 overflow-auto px-4 md:px-8 py-6 pb-20 md:pb-6",children:s.jsx("div",{className:"max-w-6xl",children:s.jsxs(Br,{defaultValue:"general",className:"w-full",children:[s.jsxs(Hr,{className:"mb-6",children:[s.jsx(We,{value:"general",children:"General"}),s.jsx(We,{value:"schedules",children:"Schedules"}),s.jsx(We,{value:"overrides",children:"Date Overrides"})]}),s.jsx(Ve,{value:"general",children:s.jsx($_e,{})}),s.jsx(Ve,{value:"schedules",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-neutral-800 dark:text-slate-200",children:"Availability Schedules"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400",children:"Create named schedules and assign them to booking links."})]}),s.jsxs(D,{onClick:()=>q(),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"New Schedule"]})]}),_?s.jsx("div",{className:"space-y-3",children:[1,2].map(U=>s.jsx("div",{className:"h-24 bg-neutral-100 dark:bg-slate-700 rounded-lg animate-pulse"},U))}):P.length===0?s.jsx(X,{children:s.jsxs(te,{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(dr,{className:"h-12 w-12 text-neutral-300 dark:text-slate-600 mb-4"}),s.jsx("p",{className:"text-neutral-500 dark:text-slate-400 mb-4",children:"No availability schedules yet"}),s.jsxs(D,{variant:"outline",onClick:()=>q(),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Create Your First Schedule"]})]})}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:P.map(U=>{var M;return s.jsxs(X,{children:[s.jsx(ue,{className:"pb-2",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(fe,{className:"text-base",children:[U.name,U.isDefault&&s.jsx("span",{className:"ml-2 text-xs bg-primary/10 text-primary px-2 py-0.5 rounded-full",children:"Default"})]}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>q(U),children:s.jsx(vl,{className:"h-3.5 w-3.5"})}),s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>W.mutate(U.id),children:s.jsx(Pr,{className:"h-3.5 w-3.5 text-red-500"})})]})]})}),s.jsx(te,{children:s.jsx("div",{className:"space-y-1",children:(M=U.rules)==null?void 0:M.map(G=>
705s.jsxs("div",{className:"text-sm text-neutral-600 dark:text-slate-400 flex justify-between",children:[s.jsx("span",{children:a$[G.dayOfWeek]}),s.jsxs("span",{children:[G.startTime," - ",G.endTime]})]},G.dayOfWeek))})})]},U.id)})})]})}),s.jsx(Ve,{value:"overrides",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-neutral-800 dark:text-slate-200",children:"Date Overrides"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400",children:"Override your availability on specific dates. Applies to all booking links."})]}),s.jsxs(D,{onClick:()=>V(),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Add Override"]})]}),F?s.jsx("div",{className:"space-y-3",children:[1,2].map(U=>s.jsx("div",{className:"h-16 bg-neutral-100 dark:bg-slate-700 rounded-lg animate-pulse"},U))}):I.length===0?s.jsx(X,{children:s.jsxs(te,{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(Gt,{className:"h-12 w-12 text-neutral-300 dark:text-slate-600 mb-4"}),s.jsx("p",{className:"text-neutral-500 dark:text-slate-400 mb-4",children:"No date overrides yet"}),s.jsxs(D,{variant:"outline",onClick:()=>V(),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Add Your First Override"]})]})}):s.jsx("div",{className:"space-y-2",children:I.sort((U,M)=>U.date.localeCompare(M.date)).map(U=>s.jsx(X,{children:s.jsxs(te,{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${U.isAvailable?"bg-green-100 dark:bg-green-900/20":"bg-red-100 dark:bg-red-900/20"}`,children:U.isAvailable?s.jsx(Gt,{className:"h-5 w-5 text-green-600"}):s.jsx(N0,{className:"h-5 w-5 text-red-500"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-medium text-neutral-800 dark:text-slate-200",children:new Date(U.date+"T00:00:00").toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric"})}),U.label&&s.jsx("span",{className:"text-xs bg-neutral-100 dark:bg-slate-700 px-2 py-0.5 rounded text-neutral-600 dar
705k:text-slate-400",children:U.label})]}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400",children:U.isAvailable?`Available: ${U.startTime} - ${U.endTime}`:"Unavailable all day"})]})]}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>V(U),children:s.jsx(vl,{className:"h-3.5 w-3.5"})}),s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>R.mutate(U.id),children:s.jsx(Pr,{className:"h-3.5 w-3.5 text-red-500"})})]})]})},U.id))})]})})]})})})]})]}),s.jsx(Ds,{onCreateEventClick:_e}),s.jsx(Mn,{isOpen:e,onClose:()=>t(!1)}),s.jsx(Ot,{open:r,onOpenChange:n,children:s.jsxs(kt,{className:"max-w-lg",children:[s.jsx(Ct,{children:s.jsx(Tt,{children:a?"Edit Schedule":"New Availability Schedule"})}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Schedule Name"}),s.jsx(ie,{value:f,onChange:U=>h(U.target.value),placeholder:"e.g., Weekday Mornings"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gr,{checked:m,onCheckedChange:g}),s.jsx(ee,{children:"Set as default schedule"})]}),s.jsxs("div",{children:[s.jsx(ee,{className:"mb-2 block",children:"Available Days & Hours"}),s.jsx("div",{className:"space-y-2",children:a$.map((U,M)=>{const G=x.find(K=>K.dayOfWeek===M);return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(gr,{checked:!!G,onCheckedChange:()=>se(M)}),s.jsx("span",{className:"w-24 text-sm",children:U}),G&&s.jsxs(s.Fragment,{children:[s.jsx(ie,{type:"time",value:G.startTime,onChange:K=>oe(M,"startTime",K.target.value),className:"w-28"}),s.jsx("span",{className:"text-sm text-neutral-500",children:"to"}),s.jsx(ie,{type:"time",value:G.endTime,onChange:K=>oe(M,"endTime",K.target.value),className:"w-28"})]})]},M)})})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),s.jsx(D,{onClick:()=>H.mutate({name:f,isDefault:m,rules:x}),disabled:!f||H.isPending,children:H.isPending?"Saving...":"Save"})]})]})}),s.jsx(Ot,{open:o,onOpenChange:l,children:s.jsxs(kt,{className:"max-w-md",children:[s.jsx(Ct,{children:s.jsx(Tt,{children:c?"Edit Date Override":"Add Date Override"})}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Date"}),s.jsx(ie,{type:"date",value:b,onChange:U=>y(U.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Label (optional)"}),s.jsx(ie,{value:C,onChange:U=>E(U.target.value),placeholder:"e.g., Holiday, Half Day"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gr,{checked:j,onCheckedChange:w}),s.jsx(ee,{children:j?"Available with custom hours":"Completely unavailable"})]}),j&&s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Start Time"}),s.jsx(ie,{type:"time",value:N,onChange:U=>S(U.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"End Time"}),s.jsx(ie,{type:"time",value:k,onChange:U=>T(U.target.value)})]})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>l(!1),children:"Cancel"}),s.jsx(D,{onClick:()=>z.mutate({date:b,isAvailable:j,startTime:j?N:null,endTime:j?k:null,label:C||null}),disabled:!b||z.isPending,children:z.isPending?"Saving...":"Save"})]})]})})]})}function F_e(){const{login:e,loading:t,error:r}=gn(),[n,a]=Nn(),[i,o]=p.useState({showMessage:!1,email:"",verified:!1,registered:!1,emailError:!1,verificationResent:!1}),[l,c]=p.useState(null);p.useEffect(()=>{const m=new URLSearchParams(window.location.search),g=m.get("error");g&&(c({not_found:"This login link is invalid or has already been removed. Please contact your administrator for a new link.",revoked:"This login link has been revoked by an administrator. Please contact your administrator for a new link.",expired:"This login link has expired. Please contact your administrator for a new link.",rate_limited:"Too many login attempts. Please wait a few minutes and try again.",invalid_link:"This login link is invalid. Please check the URL and try again.",session_error:"There was a problem creating your session. Please try again.",server_error:"An unexpected error occurred. Please try again later."}[g]||"There was a problem with your login link. Please contact your administrator."),window.history.replaceState({},document.title,window.location.pathname));const x=m.get("verified")==="true",v=m.get("registered")==="true",b=m.get("email_error")==="true",y=m.get("verification_resent")==="true",j=m.get("email")||"";(x||v||b||y)&&(o({showMessage:!0,email:j,verified:x,registered:v,emailError:b,verificationResent:y}),window.history.replaceState({},document.title,window.location.pathname))},[n]);const{register:d,handleSubmit:u,formState:{errors:f}}=Lu({defaultValues:{username:"",password:""}}),h=async m=>{try{await e(m.username,m.password),a("/")}catch{}};return s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx("div",{className:"container mx-auto flex-1 flex items-center justify-center py-8",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx("div",{className:"flex justify-center mb-2",children:s.jsx(LY,{size:48})}),s.jsx(fe,{className:"text-2xl text-center",children:"SmartScheduler"}),s.jsx(ye,{className:"text-center",children:"Enter your credentials to access your account"})]}),s.jsx(te,{children:s.jsxs("form",{onSubmit:u(h),className:"space-y-4",children:[r&&s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx($r,{children:r})]}),l&&s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx($r,{children:l})]}),i.showMessage&&i.verified&&s.jsxs(Rr,{variant:"default",className:"bg-green-50 border-green-300",children:[s.jsx(Zd,{className:"h-4 w-4 text-green-600"}),s.jsx($r,{className:"text-green-700",children:"Your email has been successfully verified! You can now log in."})]}),i.showMessage&&i.registered&&s.jsxs(Rr,{variant:"default",className:"bg-blue-50 border-blue-300",children:[s.jsx(Gc,{
705className:"h-4 w-4 text-blue-600"}),s.jsxs($r,{className:"text-blue-700",children:["Registration successful! Please check your email",i.email&&s.jsxs("strong",{children:[" (",i.email,")"]}),"to verify your account before logging in."]})]}),i.showMessage&&i.emailError&&s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsxs($r,{children:["There was a problem sending the verification email to",i.email&&s.jsxs("strong",{children:[" ",i.email]}),". Please ensure your email address is correct and try again. If the problem persists, please contact support."]})]}),i.showMessage&&i.verificationResent&&s.jsxs(Rr,{variant:"default",className:"bg-blue-50 border-blue-300",children:[s.jsx(Gc,{className:"h-4 w-4 text-blue-600"}),s.jsxs($r,{className:"text-blue-700",children:["A new verification email has been sent to",i.email&&s.jsxs("strong",{children:[" ",i.email]}),". Please check your inbox and spam folder."]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"username",children:"Username or Email"}),s.jsx(ie,{id:"username",type:"text",placeholder:"Enter your username or email",...d("username",{required:"Username or email is required"})}),f.username&&s.jsx("p",{className:"text-sm text-red-500",children:f.username.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(ee,{htmlFor:"password",children:"Password"}),s.jsx("a",{onClick:()=>a("/reset-password"),className:"text-xs text-primary hover:underline cursor-pointer",children:"Forgot password?"})]}),s.jsx(ie,{id:"password",type:"password",placeholder:"Enter your password",...d("password",{required:"Password is required"})}),f.password&&s.jsx("p",{className:"text-sm text-red-500",children:f.password.message})]}),s.jsx(D,{type:"submit",className:"w-full",disabled:t,children:t?"Logging in...":"Login"})]})}),s.jsx(ta,{className:"flex flex-col gap-2",children:s.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:["Don't have an account?"," ",s.jsx("a",{onClick:()=>a("/register"),className:"text-primary hover:underline cursor-pointer",children:"Register"})]})})]})}),s.jsx(hi,{})]})}const B_e=Ae.object({firstName:Ae.string().min(1,"First name is required"),lastName:Ae.string().min(1,"Last name is required"),phoneNumber:Ae.string().min(10,"Phone number must be at least 10 digits"),username:Ae.string().min(3,"Username must be at least 3 characters"),email:Ae.string().email("Please enter a valid email address"),password:Ae.string().min(6,"Password must be at least 6 characters"),confirmPassword:Ae.string(),accountType:Ae.enum(["individual","team","company"]).default("individual"),isDemoAccount:Ae.boolean().optional().default(!1),teamName:Ae.string().optional(),companyName:Ae.string().optional()}).refine(e=>e.password===e.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]}).refine(e=>e.accountType!=="team"||e.teamName&&e.teamName.length>=2,{message:"Team name is required",path:["teamName"]}).refine(e=>e.accountType!=="company"||e.companyName&&e.companyName.length>=2,{message:"Company name is required",path:["companyName"]});function U_e(){const[e,t]=p.useState(null),[,r]=Nn(),{toast:n}=Qt(),[a,i]=p.useState("individual"),{register:o,handleSubmit:l,formState:{errors:c},watch:d,setValue:u}=Lu({resolver:_m(B_e),defaultValues:{firstName:"",lastName:"",phoneNumber:"",username:"",email:"",password:"",confirmPassword:"",accountType:"individual",isDemoAccount:!1}});d("accountType");const f=dt({mutationFn:async g=>{const x=await Ue("POST","/api/register",g);if(!x.ok){const v=await x.json();throw new Error(v.message||"Registration failed")}return x.json()},onSuccess:g=>{r("/login?registered=true&email="+encodeURIComponent(g.email))},onError:g=>{t(g.message),n({title:"Registration failed",description:g.message,variant:"destructive"})}}),h=g=>{u("accountType",g),i(g)},m=g=>{t(null);const{confirmPassword:x,...v}=g;let b="user";g.accountType==="company"?b="company_admin":g.accountType==="team"&&(b="team_manager");const y=g.accountType==="individual"&&g.isDemoAccount,j={...v,displayName:`${g.firstName} ${g.lastName}
705`,timezone:"America/New_York",trialEndDate:new Date(Date.now()+14*24*60*60*1e3).toISOString(),isCompanyAccount:g.accountType==="company",isTeamAccount:g.accountType==="team",accountType:g.accountType,role:b,trialPlan:y?"INDIVIDUAL_DEMO":g.accountType.toUpperCase(),isDemoAccount:y};console.log("Registration data:",j),f.mutate(j)};return s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx("div",{className:"container mx-auto flex-1 flex items-center justify-center py-8",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{className:"text-2xl text-center",children:"Create an Account"}),s.jsx(ye,{className:"text-center",children:"Enter your details to register a new account"})]}),s.jsx(te,{children:s.jsxs("form",{onSubmit:l(m),className:"space-y-4",children:[e&&s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx($r,{children:e})]}),s.jsxs("div",{className:"space-y-2 mb-6",children:[s.jsx(ee,{className:"text-base font-medium mb-2 block",children:"Choose Account Type"}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsxs("div",{className:`border rounded-md p-4 cursor-pointer transition-all ${a==="individual"?"border-primary bg-primary/5 ring-2 ring-primary":"border-border hover:border-primary/50"}`,onClick:()=>h("individual"),children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(yl,{className:"h-5 w-5 text-primary"}),s.jsx("span",{className:"font-medium",children:"Individual"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"14-day free trial for single users"})]}),s.jsxs("div",{className:`border rounded-md p-4 cursor-pointer transition-all ${a==="team"?"border-primary bg-primary/5 ring-2 ring-primary":"border-border hover:border-primary/50"}`,onClick:()=>h("team"),children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(ir,{className:"h-5 w-5 text-primary"}),s.jsx("span",{className:"font-medium",children:"Team"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"14-day free trial for teams"})]}),s.jsxs("div",{className:`border rounded-md p-4 cursor-pointer transition-all ${a==="company"?"border-primary bg-primary/5 ring-2 ring-primary":"border-border hover:border-primary/50"}`,onClick:()=>h("company"),children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Eo,{className:"h-5 w-5 text-primary"}),s.jsx("span",{className:"font-medium",children:"Company"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"14-day free trial for companies"})]})]}),s.jsx("div",{className:"mt-2 mb-4",children:s.jsx("p",{className:"text-sm text-center text-muted-foreground",children:"All plans include a 14-day free trial. No credit card required."})}),a==="individual"&&s.jsxs("div",{className:"mt-4 space-y-2 border-t pt-4",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("input",{type:"checkbox",id:"isDemoAccount",className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary",...o("isDemoAccount")}),s.jsx(ee,{htmlFor:"isDemoAccount",className:"text-sm font-medium",children:"Use $1/month Demo Account (for testing)"})]}),s.jsx("p",{className:"text-xs text-muted-foreground pl-6",children:"This is a special plan for testing in production environment, priced at $1.00 per month."})]}),a==="team"&&s.jsxs("div",{className:"mt-4 space-y-2 border-t pt-4",children:[s.jsx(ee,{htmlFor:"teamName",children:"Team Name"}),s.jsx(ie,{id:"teamName",type:"text",placeholder:"Enter your team name",...o("teamName")}),c.teamName&&s.jsx("p",{className:"text-sm text-red-500",children:c.teamName.message})]}),a==="company"&&s.jsxs("div",{className:"mt-4 space-y-2 border-t pt-4",children:[s.jsx(ee,{htmlFor:"companyName",children:"Company Name"}),s.jsx(ie,{id:"companyName",type:"text",placeholder:"Enter your company name",...o("companyName")}),c.companyName&&s.jsx("p",{className:"text-sm text-red-500",children:c.companyName.message}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"A team will be created automatically for your company."})]}),s.jsx("input",{type:"hidden",...o("accountType")})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"firstName",children:"First Name"}),s.jsx(ie,{id:"firstName",type:"text",placeholder:"First name",...o("firstName")}
705),c.firstName&&s.jsx("p",{className:"text-sm text-red-500",children:c.firstName.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"lastName",children:"Last Name"}),s.jsx(ie,{id:"lastName",type:"text",placeholder:"Last name",...o("lastName")}),c.lastName&&s.jsx("p",{className:"text-sm text-red-500",children:c.lastName.message})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"phoneNumber",children:"Phone Number"}),s.jsx(ie,{id:"phoneNumber",type:"tel",placeholder:"Enter your phone number",...o("phoneNumber")}),c.phoneNumber&&s.jsx("p",{className:"text-sm text-red-500",children:c.phoneNumber.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"username",children:"Username"}),s.jsx(ie,{id:"username",type:"text",placeholder:"Enter your username",...o("username")}),c.username&&s.jsx("p",{className:"text-sm text-red-500",children:c.username.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"email",children:"Email"}),s.jsx(ie,{id:"email",type:"email",placeholder:"Enter your email",...o("email")}),c.email&&s.jsx("p",{className:"text-sm text-red-500",children:c.email.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"password",children:"Password"}),s.jsx(ie,{id:"password",type:"password",placeholder:"Create a password",...o("password")}),c.password&&s.jsx("p",{className:"text-sm text-red-500",children:c.password.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"confirmPassword",children:"Confirm Password"}),s.jsx(ie,{id:"confirmPassword",type:"password",placeholder:"Confirm your password",...o("confirmPassword")}),c.confirmPassword&&s.jsx("p",{className:"text-sm text-red-500",children:c.confirmPassword.message})]}),s.jsx(D,{type:"submit",className:"w-full",disabled:f.isPending,children:f.isPending?"Registering...":"Register"})]})}),s.jsx(ta,{children:s.jsxs("p",{className:"text-sm text-center w-full text-muted-foreground",children:["Already have an account?"," ",s.jsx("a",{onClick:()=>r("/login"),className:"text-primary hover:underline cursor-pointer",children:"Login"})]})})]})}),s.jsx(hi,{})]})}const z_e=Ae.object({email:Ae.string().email("Please enter a valid email address")});function W_e(){const[,e]=Nn(),[t,r]=p.useState(!1),[n,a]=p.useState(null),[i,o]=p.useState(!1),{register:l,handleSubmit:c,formState:{errors:d}}=Lu({resolver:_m(z_e),defaultValues:{email:""}}),u=async f=>{r(!0),a(null);try{await Ue("POST","/api/reset-password/request",f),o(!0)}catch(h){a(h instanceof Error?h.message:"Failed to request password reset")}finally{r(!1)}};return s.jsx("div",{className:"container mx-auto flex items-center justify-center min-h-[calc(100vh-3.5rem)] py-8",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{className:"text-2xl text-center",children:"Reset Password"}),s.jsx(ye,{className:"text-center",children:"Enter your email address to receive a password reset link"})]}),s.jsx(te,{children:i?s.jsxs(Rr,{className:"bg-green-50 border-green-200",children:[s.jsx(Aa,{className:"h-4 w-4 text-green-600"}),s.jsx($r,{className:"text-green-600",children:"If an account exists with that email, we've sent password reset instructions to your inbox. Please check your email."})]}):s.jsxs("form",{onSubmit:c(u),className:"space-y-4",children:[n&&s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx($r,{children:n})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"email",children:"Email Address"}),s.jsx(ie,{id:"email",type:"email",placeholder:"Enter your email address",...l("email")}),d.email&&s.jsx("p",{className:"text-sm text-red-500",children:d.email.message})]}),s.jsx(D,{type:"submit",className:"w-full",disabled:t,children:t?"Sending...":"Send Reset Link"})]})}),s.jsx(ta,{children:s.jsxs("p",{className:"text-sm text-center w-full text-muted-foreground",children:["Remember your password?"," ",s.jsx("a",{onClick:()=>e("/login"),className:"text-primary hover:underline cursor-pointer",children:"Back to Login"})]})})]})})}const V_e=Ae.object({password:Ae.string().min(8,"Password must be at least 8 characters long").regex(/[a-z]/,"Password must contain at least one lowercase letter").regex(/[A-Z]/,"Password must contain at least one uppercase letter").regex(/[0-9]/,"Password must contain at least one number"),confirmPassword:Ae.string()}).refine(e=>e.password===e.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]});function H_e(){const[,e]=Nn(),[t]=Nn(),[r,n]=p.useState(!1),[a,i]=p.useState(null),[o,l]=p.useState(!1),[c,d]=p.useState(null),[u,f]=p.useState(!0),[h,m]=p.useState("");p.useEffect(()=>{let y="";try{if(console.log("Current URL path:",t),console.log("Full URL:",window.location.href),t.includes("?")){console.log("Extracting token using URLSearchParams from location");const j=t.split("?")[1];if(j){const N=new URLSearchParams(j).get("token");N&&(console.log(`Token found via URLSearchParams (Method 1): ${N.substring(0,10)}...`),y=N)}}if(!y&&window.location.search){console.log("Method 1 failed. Trying window.location.search");const w=new URLSearchParams(window.location.search).get("token");w&&(console.log(`Token found via window.location.search (Method 2): ${w.substring(0,10)}...`),y=w)}if(!y){console.log("Methods 1-2 failed. Trying regex extraction as last resort");const w=window.location.href.match(/[?&]token=([^&#]+)/);if(w&&w[1]){let N=w[1];try{if(N.includes("%")){const S=decodeURIComponent(N);console.log("Decoded URL-encoded token"),N=S}}catch(S){console.error("Error decoding token:",S)}console.log(`Token found via regex (Method 3): ${N.substring(0,10)}...`),y=N}}if(y){const j=y.trim();console.log(`Final cleaned token: ${j.substring(0,10)}...`),console.log(`Token length: ${j.length}`),m(j)}else console.log("Failed to extract token from URL"),m(""),d(!1),f(!1),i("No reset token found in URL. Please request a new password reset link.")}catch(j){console.error("Critical error parsing token from URL:",j),m(""),d(!1),f(!1),i("Error processing password reset link. Please request a new one.")}},[t]),p.useEffect(()=>{(async()=>
705{if(!h){d(!1),f(!1),i("No token provided in URL. Please request a new password reset link.");return}try{console.log("Validating token...",h.substring(0,10)+"...");const j=`/api/reset-password/validate?token=${encodeURIComponent(h.trim())}`;console.log("Validation URL:",j);const N=await(await Ue("GET",j)).json();console.log("Token validation response:",N),N.valid===!0?(console.log("Token is valid! User can reset password"),d(!0)):(console.log("Token validation failed with status:",N.status),d(!1),N.message?i(N.message):i("The password reset link is invalid or has expired. Please request a new one."))}catch(j){console.error("Token validation error:",j),d(!1),j instanceof Error?j.message.includes("Failed to fetch")?i("Unable to connect to the server. Please check your internet connection and try again."):i(j.message||"Invalid or expired token"):i("Invalid or expired token"),console.error("Error details:",JSON.stringify(j))}finally{f(!1)}})()},[h]);const{register:g,handleSubmit:x,formState:{errors:v}}=Lu({resolver:_m(V_e),defaultValues:{password:"",confirmPassword:""}}),b=async y=>{if(!h){i("No token provided. Please request a new password reset link.");return}n(!0),i(null);try{console.log("Submitting password reset with token:",h.substring(0,10)+"...");const j=h.trim(),w=await Ue("POST","/api/reset-password/reset",{token:j,password:y.password});console.log("Password reset response status:",w.status);const N=await w.json();console.log("Password reset response:",N),N.success?(console.log("Password reset successful!"),l(!0)):(console.log("Password reset failed with status:",N.status),N.status==="expired"?i("Your password reset link has expired. Please request a new one."):N.status==="consumed"?i("This password reset link has already been used. Please request a new one if needed."):N.status==="not_found"?i("Invalid password reset link. Please request a new one."):i(N.message||"Failed to reset password. Please try again."))}catch(j){console.error("Password reset error:",j),j instanceof Error?j.message.includes("Failed to fetch")?i("Unable to connect to the server. Please check your internet connection and try again."):i(j.message||"Failed to reset password"):i("An unexpected error occurred. Please try again later."),console.error("Error details:",JSON.stringify(j))}finally{n(!1)}};return u?s.jsx("div",{className:"container mx-auto flex items-center justify-center min-h-[calc(100vh-3.5rem)] py-8",children:s.jsx(X,{className:"w-full max-w-md",children:s.jsx(te,{className:"py-8",children:s.jsx("div",{className:"text-center",children:s.jsx("p",{children:"Validating your reset link..."})})})})}):c===!1?s.jsx("div",{className:"container mx-auto flex items-center justify-center min-h-[calc(100vh-3.5rem)] py-8",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsx(ue,{children:s.jsx(fe,{className:"text-2xl text-center",children:"Invalid Reset Link"})}),s.jsx(te,{children:s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx($r,{children:a||"The password reset link is invalid or has expired. Please request a new one."})]})}),s.jsx(ta,{children:s.jsx(D,{onClick:()=>e("/reset-password"),className:"w-full",children:"Request New Reset Link"})})]})}):s.jsx("div",{className:"container mx-auto flex items-center justify-center min-h-[calc(100vh-3.5rem)] py-8",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{className:"text-2xl text-center",children:"Set New Password"}),s.jsx(ye,{className:"text-center",children:"Please enter your new password"})]}),s.jsx(te,{children:o?s.jsxs("div",{className:"space-y-4",children:[s.jsxs(Rr,{className:"bg-green-50 border-green-200",children:[s.jsx(Aa,{className:"h-4 w-4 text-green-600"}),s.jsx($r,{className:"text-green-600",children:"Your password has been successfully reset. You can now log in with your new password."})]}),s.jsx(D,{onClick:()=>e("/login"),className:"w-full",children:"Back to Login"})]}):s.jsxs("form",{onSubmit:x(b),className:"space-y-4",children:[a&&s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx($r,{children:a})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"password",children:"New Password"}),s.jsx(ie,{id:"password",type:"password",placeholder:"Enter your new password",...g("password")}),v.password&&s.jsx("p",{className:"text-sm text-red-500",children:v.password.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"confirmPassword",children:"Confirm Password"}),s.jsx(ie,{id:"confirmPassword",type:"password",placeholder:"Confirm your new password",...g("confirmPassword")}),v.confirmPassword&&s.jsx("p",{className:"text-sm text-red-500",children:v.confirmPassword.message})]}),s.jsx(D,{type:"submit",className:"w-full",disabled:r,children:r?"Resetting...":"Reset Password"})]})})]})})}const q_e=Ae.object({firstName:Ae.string().optional(),lastName:Ae.string().optional(),username:Ae.string().regex(/^[a-zA-Z0-9._-]*$/,"Username may only contain letters, numbers, and . _ -").refine(e=>e===""||e.length>=3,"Username must be at least 3 characters").optional(),password:Ae.string().min(8,"Password must be at least 8 characters long").regex(/[a-z]/,"Password must contain at least one lowercase letter").regex(/[A-Z]/,"Password must contain at least one uppercase letter").regex(/[0-9]/,"Password must contain at least one number"),confirmPassword:Ae.string()}).refine(e=>e.password===e.confirmPassword,{message:"Passwords don't match",path:["confirmPassword"]});function Y_e(){const[,e]=Nn(),[t]=Nn(),[r,n]=p.useState(!1),[a,i]=p.useState(null),[o,l]=p.useState(!1),[c,d]=p.useState(null),[u,f]=p.useState(!0),[h,m]=p.useState(""),[g,x]=p.useState(""),[v,b]=p.useState(!1);p.useEffect(()=>{try{const S=t.includes("?")?t.split("?")[1]:window.location.search,T=(new URLSearchParams(S).get("token")||"").trim();T?m(T):(m(""),d(!1),f(!1),i("No invitation token found in the link. Please contact your administrator for a new invitation."))}catch(S){console.error("Error parsing invitation token from URL:",S),m(""),d(!1),f(!1),i("Error processing the invitation link. Please contact your administrator.")}},[t]),p.useEffect(()=>{(async()=>
705{if(h)try{const T=await(await Ue("GET",`/api/invitations/${encodeURIComponent(h)}`)).json();T.valid===!0?(d(!0),x(T.email||""),b(T.isComped===!0)):(d(!1),i(T.message||"This invitation link is invalid or has expired."))}catch(k){console.error("Invitation validation error:",k),d(!1),i(k instanceof Error?k.message:"Invalid or expired invitation")}finally{f(!1)}})()},[h]);const{register:y,handleSubmit:j,formState:{errors:w}}=Lu({resolver:_m(q_e),defaultValues:{firstName:"",lastName:"",username:"",password:"",confirmPassword:""}}),N=async S=>{if(!h){i("No invitation token provided.");return}n(!0),i(null);try{const T=await(await Ue("POST",`/api/invitations/${encodeURIComponent(h)}/accept`,{password:S.password,username:S.username?S.username.trim():void 0,firstName:S.firstName||void 0,lastName:S.lastName||void 0})).json();T.success?(l(!0),T.sessionEstablished&&setTimeout(()=>{window.location.href="/"},1500)):i(T.message||"Failed to accept invitation. Please try again.")}catch(k){console.error("Accept invitation error:",k),i(k instanceof Error?k.message:"An unexpected error occurred. Please try again later.")}finally{n(!1)}};return u?s.jsx("div",{className:"container mx-auto flex items-center justify-center min-h-[calc(100vh-3.5rem)] py-8",children:s.jsx(X,{className:"w-full max-w-md",children:s.jsx(te,{className:"py-8",children:s.jsx("div",{className:"text-center",children:s.jsx("p",{children:"Validating your invitation..."})})})})}):c===!1?s.jsx("div",{className:"container mx-auto flex items-center justify-center min-h-[calc(100vh-3.5rem)] py-8",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsx(ue,{children:s.jsx(fe,{className:"text-2xl text-center",children:"Invalid Invitation"})}),s.jsx(te,{children:s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx($r,{children:a||"This invitation link is invalid or has expired. Please contact your administrator."})]})}),s.jsx(ta,{children:s.jsx(D,{onClick:()=>e("/login"),className:"w-full",children:"Go to Login"})})]})}):s.jsx("div",{className:"container mx-auto flex items-center justify-center min-h-[calc(100vh-3.5rem)] py-8",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{className:"text-2xl text-center",children:"Accept Your Invitation"}),s.jsx(ye,{className:"text-center",children:g?s.jsxs(s.Fragment,{children:["Create your account for ",s.jsx("strong",{children:g})]}):"Create your account"})]}),s.jsx(te,{children:o?s.jsxs("div",{className:"space-y-4",children:[s.jsxs(Rr,{className:"bg-green-50 border-green-200",children:[s.jsx(Aa,{className:"h-4 w-4 text-green-600"}),s.jsx($r,{className:"text-green-600",children:"Your account has been created successfully. Welcome to SmartScheduler!"})]}),s.jsx(D,{onClick:()=>e("/login"),className:"w-full",children:"Continue to Login"})]}):s.jsxs("form",{onSubmit:j(N),className:"space-y-4",children:[a&&s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx($r,{children:a})]}),v&&s.jsxs(Rr,{className:"bg-green-50 border-green-200",children:[s.jsx(Poe,{className:"h-4 w-4 text-green-600"}),s.jsx($r,{className:"text-green-700",children:"Your account includes complimentary free access."})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"firstName",children:"First Name"}),s.jsx(ie,{id:"firstName",placeholder:"First name",...y("firstName")})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"lastName",children:"Last Name"}),s.jsx(ie,{id:"lastName",placeholder:"Last name",...y("lastName")})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(ee,{htmlFor:"username",children:["Username ",s.jsx("span",{className:"text-muted-foreground text-xs",children:"(optional)"})]}),s.jsx(ie,{id:"username",placeholder:"Leave blank to auto-generate",...y("username")}),w.username&&s.jsx("p",{className:"text-sm text-red-500",children:w.username.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"password",children:"Password"}),s.jsx(ie,{id:"password",type:"password",placeholder:"Choose a password",...y("password")}),w.password&&s.jsx("p",{className:"text-sm text-red-500",children:w.password.message})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"confirmPassword",children:"Confirm Password"}),s.jsx(ie,{id:"confirmPassword",type:"password",placeholder:"Confirm your password",...y("confirmPassword")}),w.confirmPassword&&s.jsx("p",{className:"text-sm text-red-500",children:w.
705confirmPassword.message})]}),s.jsx(D,{type:"submit",className:"w-full",disabled:r,children:r?"Creating account...":"Create Account"})]})})]})})}function G_e(){const[e,t]=Nn(),[r,n]=p.useState(!0),[a,i]=p.useState(!1),[o,l]=p.useState("Verifying your email...");return p.useEffect(()=>{(async()=>{try{const u=new URLSearchParams(window.location.search).get("token");if(!u){n(!1),i(!1),l("No verification token found. Please check your email link.");return}const f=await fetch(`/api/verify-email?token=${u}`);if(f.redirected){window.location.href=f.url;return}const h=await f.json();n(!1),f.ok?(i(!0),l("Your email has been successfully verified. You can now log in.")):(i(!1),l(h.message||"Verification failed. Please try again or request a new verification email."))}catch(d){n(!1),i(!1),l("An error occurred during verification. Please try again later."),console.error("Verification error:",d)}})()},[]),s.jsx("div",{className:"container mx-auto flex items-center justify-center min-h-[calc(100vh-3.5rem)] py-8",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{className:"text-2xl text-center",children:"Email Verification"}),s.jsx(ye,{className:"text-center",children:r?"Verifying your email address...":a?"Verification successful!":"Verification failed"})]}),s.jsx(te,{className:"space-y-4",children:r?s.jsxs("div",{className:"flex flex-col items-center justify-center p-6",children:[s.jsx(Fg,{className:"h-10 w-10 text-primary animate-spin mb-4"}),s.jsx("p",{className:"text-center text-muted-foreground",children:"Please wait while we verify your email address..."})]}):a?s.jsxs(Rr,{className:"bg-green-50 border-green-200",children:[s.jsx(Zd,{className:"h-5 w-5 text-green-600"}),s.jsx($r,{className:"text-green-700",children:o})]}):s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-5 w-5"}),s.jsx($r,{children:o})]})}),s.jsx(ta,{className:"flex justify-center",children:!r&&s.jsx(D,{onClick:()=>t("/login"),className:"w-full",children:"Go to Login"})})]})})}function K_e(){const{user:e,setUser:t}=gn(),[,r]=Nn(),{toast:n}=Qt(),[a,i]=p.useState(""),[o,l]=p.useState(""),[c,d]=p.useState(""),[u,f]=p.useState(!1),[h,m]=p.useState(null),g=async x=>{if(x.preventDefault(),m(null),o!==c){m("New passwords do not match");return}if(o.length<8){m("New password must be at least 8 characters");return}f(!0);try{const v=await fetch("/api/change-password",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({currentPassword:a,newPassword:o,confirmPassword:c})});if(!v.ok){const b=await v.json();throw new Error(b.message||"Failed to change password")}if(e){const b={...e,forcePasswordChange:!1};t(b),localStorage.setItem("user",JSON.stringify(b))}n({title:"Password Changed",description:"Your password has been updated successfully."}),r("/")}catch(v){m(v instanceof Error?v.message:"An error occurred")}finally{f(!1)}};return s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx("div",{className:"flex-1 flex items-center justify-center bg-gradient-to-br from-slate-50 to-slate-100 dark:from-slate-900 dark:to-slate-800 p-4",children:s.jsxs(X,{className:"w-full max-w-md
705shadow-lg",children:[s.jsxs(ue,{className:"text-center space-y-4",children:[s.jsx("div",{className:"mx-auto w-16 h-16 bg-gradient-to-br from-primary to-primary/80 rounded-full flex items-center justify-center",children:s.jsx(LE,{className:"w-8 h-8 text-white"})}),s.jsxs("div",{children:[s.jsx(fe,{className:"text-2xl",children:"Change Your Password"}),s.jsx(ye,{className:"mt-2",children:"For security reasons, you must change your password before continuing."})]})]}),s.jsx(te,{children:s.jsxs("form",{onSubmit:g,className:"space-y-4",children:[h&&s.jsxs(Rr,{variant:"destructive",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx($r,{children:h})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"currentPassword",children:"Current Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(vS,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),s.jsx(ie,{id:"currentPassword",type:"password",placeholder:"Enter your current password",value:a,onChange:x=>i(x.target.value),className:"pl-10",required:!0,disabled:u})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"This is the password you received in your welcome email"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"newPassword",children:"New Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(vS,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),s.jsx(ie,{id:"newPassword",type:"password",placeholder:"Enter your new password",value:o,onChange:x=>l(x.target.value),className:"pl-10",required:!0,minLength:8,disabled:u})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Must be at least 8 characters"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"confirmPassword",children:"Confirm New Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(vS,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),s.jsx(ie,{id:"confirmPassword",type:"password",placeholder:"Confirm your new password",value:c,onChange:x=>d(x.target.value),className:"pl-10",required:!0,minLength:8,disabled:u})]})]}),s.jsx(D,{type:"submit",className:"w-full",disabled:u,children:u?"Changing Password...":"Change Password"})]})})]})}),s.jsx(hi,{})]})}function Q_e(){const{toast:e}=Qt(),[t,r]=p.useState(!1),[n,a]=p.useState(""),{data:i=[],isLoading:o}=ut({queryKey:["/api/custom-booking-domains"]}),l=dt({mutationFn:async f=>(await Ue("POST","/api/custom-booking-domains",f)).json(),onSuccess:f=>{Wt.invalidateQueries({queryKey:["/api/custom-booking-domains"]}),r(!1),a(""),e({title:"Domain added",description:`Configure your DNS to verify ${f.domain}`})},onError:f=>{e({title:"Error",description:f.message,variant:"destructive"})}}),c=dt({mutationFn:async f=>(await Ue("POST",`/api/custom-booking-domains/${f}/verify`)).json(),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/custom-booking-domains"]}),e({title:"Domain verified and activated!"})},onError:f=>{e({title:"Verification failed",description:f.message,variant:"destructive"})}}),d=dt({mutationFn:async f=>{await Ue("DELETE",`/api/custom-booking-domains/${f}`)},onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/custom-booking-domains"]}),e({title:"Domain removed"})}}),u=f=>{navigator.clipboard.writeText(f),e({title:"Copied to clipboard"})};return s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsxs(fe,{className:"flex items-center gap-2",children:[s.jsx(Yc,{className:"h-5 w-5"}),"Custom Booking Domains"]}),s.jsx(ye,{children:"Use your own domain (e.g., book.yourcompany.com) for booking pages instead of the default SmartScheduler URL."})]}),s.jsxs(te,{className:"space-y-4",children:[o?s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):i.length===0&&!t?s.jsx("p",{className:"text-sm text-muted-foreground",children:"No custom booking domains configured."}):null,i.map(f=>s.jsxs("div",{className:"border rounded-lg p-4 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Yc,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"font-medium",children:f.domain}),f.isActive?s.jsxs("span",{className:"flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-green-100 text-green-700",children:[s.jsx(Zd,{className:"h-3 w-3"})," Active"]}):f.isVerified?s.jsxs("span",{className:"flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-blue-100 text-blue-700",children:[s.jsx(dr,{className:"h-3 w-3"})," SSL Pending"]}):s.jsxs("span",{className:"flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-amber-100 text-amber-700",children:[s.jsx(sn,{className:"h-3 w-3"})," Unverified"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[!f.isVerified&&s.jsx(D,{variant:"outline",size:"sm",onClick:()=>c.mutate(f.id),disabled:c.isPending,children:"Verify"}),s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>d.mutate(f.id),children:s.jsx(Pr,{className:"h-4 w-4 text-red-500"})})]})]}),!f.isVerified&&f.verificationToken&&s.jsxs("div",{className:"bg-gray-50 rounded p-3 text-sm space-y-1",children:[s.jsx("p",{className:"font-medium text-gray-700",children:"DNS Setup Required:"}),s.jsxs("p",{className:"text-gray-600",children:["Add a ",s.jsx("code",{className:"bg-gray-200 px-1 rounded",children:"CNAME"})," record:"]}),s.jsxs("div",{className:"flex items-center gap-2 bg-white border rounded p-2 font-mono text-xs",children:[s.jsxs("span",{className:"flex-1",children:[f.domain," â booking.smart-scheduler.ai"]}),s.jsx("button",{onClick:()=>u("booking.smart-scheduler.ai"),className:"text-gray-400 hover:text-gray-600",children:s.jsx(ea,{className:"h-3.5 w-3.5"})})]}),s.jsx("p",{className:"text-xs text-gray-500 mt-1",children:'After adding the DNS record, click "Verify" to activate your custom domain.'})]})]},f.id)),t&&s.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-white",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Custom Domain"}),s.jsx(ie,{value:n,onChange:f=>a(f.target.value),placeholder:"book.yourcompany.com",className:"mt-1"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Enter the subdomain you want to use for booking pages"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(D,{onClick:()=>l.mutate({domain:n}),disabled:l.isPending||!n,children:l.isPending?"Adding...":"Add Domain"}),s.jsx(D,{variant:"outline",onClick:()=>r(!1),children:"Cancel"})]})]}),!t&&s.jsxs(D,{variant:"outline",onClick:()=>r(!0),children:[s.jsx(Sr,{className:"h-4 w-4 mr-1"}),"Add Custom Domain"]})]})]})}const fs=p.forwardRef(({className:e,...t},r)=>s.jsx("div",{className:"relative w-full overflow-auto -mx-4 px-4 sm:mx-0 sm:px-0",children:s.jsx("table",{ref:r,className:Oe("w-full caption-bottom text-sm",e),...t})}));fs.displayName="Table";const hs=p.forwardRef(({className:e,...t},r)=>s.jsx("thead",{ref:r,className:Oe("[&_tr]:border-b",e),...t}));hs.displayName="TableHeader";const ms=p.forwardRef(({className:e,...t},r)=>s.jsx("tbody",{ref:r,className:Oe("[&_tr:last-child]:border-0",e),...t}));ms.displayName="TableBody";const Z_e=p.forwardRef(({className:e,...t},r)=>s.jsx("tfoot",{ref:r,className:Oe("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Z_e.displayName="TableFooter";const Nt=p.forwardRef(({className:e,...t},r)=>s.jsx("tr",{ref:r,className:Oe("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));
vendor: 3,353 bytes, line 705
705Nt.displayName="TableRow";const Ee=p.forwardRef(({className:e,...t},r)=>s.jsx("th",{ref:r,className:Oe("h-10 sm:h-12 px-2 sm:px-4 text-left align-middle font-medium text-muted-foreground text-xs sm:text-sm [&:has([role=checkbox])]:pr-0",e),...t}));Ee.displayName="TableHead";const we=p.forwardRef(({className:e,...t},r)=>s.jsx("td",{ref:r,className:Oe("p-2 sm:p-4 align-middle text-sm [&:has([role=checkbox])]:pr-0",e),...t}));we.displayName="TableCell";const X_e=p.forwardRef(({className:e,...t},r)=>s.jsx("caption",{ref:r,className:Oe("mt-4 text-sm text-muted-foreground",e),...t}));X_e.displayName="TableCaption";var IO="Radio",[J_e,QZ]=Is(IO),[ePe,tPe]=J_e(IO),ZZ=p.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:a=!1,required:i,disabled:o,value:l="on",onCheck:c,form:d,...u}=e,[f,h]=p.useState(null),m=Ft(t,v=>h(v)),g=p.useRef(!1),x=f?d||!!f.closest("form"):!0;return s.jsxs(ePe,{scope:r,checked:a,disabled:o,children:[s.jsx(Ke.button,{type:"button",role:"radio","aria-checked":a,"data-state":eX(a),"data-disabled":o?"":void 0,disabled:o,value:l,...u,ref:m,onClick:$e(e.onClick,v=>{a||c==null||c(),x&&(g.current=v.isPropagationStopped(),g.current||v.stopPropagation())})}),x&&s.jsx(rPe,{control:f,bubbles:!g.current,name:n,value:l,checked:a,required:i,disabled:o,form:d,style:{transform:"translateX(-100%)"}})]})});ZZ.displayName=IO;var XZ="RadioIndicator",JZ=p.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...a}=e,i=tPe(XZ,r);return s.jsx(Jn,{present:n||i.checked,children:s.jsx(Ke.span,{"data-state":eX(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t})})});JZ.displayName=XZ;var rPe=e=>{const{control:t,checked:r,bubbles:n=!0,...a}=e,i=p.useRef(null),o=mN(r),l=iN(t);return p.useEffect(()=>{const c=i.current,d=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(d,"checked").set;if(o!==r&&f){const h=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(h)}},[o,r,n]),s.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function eX(e){return e?"checked":"unchecked"}var nPe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],RO="RadioGroup",[sPe,LZe]=Is(RO,[dd,QZ]),tX=dd(),rX=QZ(),[aPe,iPe]=sPe(RO),nX=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:a,value:i,required:o=!1,disabled:l=!1,orientation:c,dir:d,loop:u=!0,onValueChange:f,...h}=e,m=tX(r),g=cd(d),[x,v]=xs({prop:i,defaultProp:a,onChange:f});return s.jsx(aPe,{scope:r,name:n,required:o,disabled:l,value:x,onValueChange:v,children:s.jsx(cN,{asChild:!0,...m,orientation:c,dir:g,loop:u,children:s.jsx(Ke.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:g,...h,ref:t})})})});nX.displayName=RO;var sX="RadioGroupItem",aX=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...a}=e,i=iPe(sX,r),o=i.disabled||n,l=tX(r),c=rX(r),d=p.useRef(null),u=Ft(t,d),f=i.value===a.value,h=p.useRef(!1);return p.useEffect(()=>{const m=x=>{nPe.includes(x.key)&&(h.current=!0)},g=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",g)}},[]),s.jsx(dN,{asChild:!0,...l,focusable:!o,active:f,children:s.jsx(ZZ,{disabled:o,required:i.required,
705checked:f,...c,...a,name:i.name,ref:u,onCheck:()=>i.onValueChange(a.value),onKeyDown:$e(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:$e(a.onFocus,()=>{var m;h.current&&((m=d.current)==null||m.click())})})})});aX.displayName=sX;var oPe="RadioGroupIndicator",iX=p.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,a=rX(r);return s.jsx(JZ,{...a,...n,ref:t})});iX.displayName=oPe;var oX=nX,lX=aX,lPe=iX;const $O=p.forwardRef(({className:e,...t},r)=>s.jsx(oX,{className:Oe("grid gap-2",e),...t,ref:r}));$O.displayName=oX.displayName;const Nj=p.forwardRef(({className:e,...t},r)=>s.jsx(lX,{ref:r,className:Oe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus: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:s.jsx(lPe,{className:"flex items-center justify-center",children:s.jsx(pW,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Nj.displayName=lX.displayName;function cPe(){const[e,t]=p.useState([]),[r,n]=p.useState(0),[a,i]=p.useState(0),[o,l]=p.useState("");return p.useEffect(()=>{const c=new URLSearchParams({limit:"20",offset:String(a)});o&&c.set("action",o),fetch(`/api/audit-logs?${c}`,{credentials:"include"}).then(d=>d.json()).then(d=>{t(d.logs||[]),n(d.total||0)}).catch(()=>{})},[a,o]),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsxs("select",{className:"text-sm border rounded px-2 py-1",value:o,onChange:c=>{l(c.target.value),i(0)},children:[s.jsx("option",{value:"",children:"All actions"}),s.jsx("option",{value:"login",children:"Login"}),s.jsx("option",{value:"user_create",children:"User Create"}),s.jsx("option",{value:"user_update",children:"User Update"}),s.jsx("option",{value:"settings_change",children:"Settings Change"}),s.jsx("option",{value:"booking_create",children:"Booking Create"}),s.jsx("option",{value:"booking_cancel",children:"Booking Cancel"}),s.jsx("option",{value:"domain_add",children:"Domain Add"})]}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[r," total entries"]})]}),s.jsxs("div",{className:"space-y-1 max-h-[400px] overflow-y-auto",children:[e.length===0&&s.jsx("p",{className:"text-sm text-muted-foreground",children:"No audit log entries found."}),e.map(c=>s.jsx("div",{className:"flex items-start gap-3 p-2 rounded hover:bg-gray-50 dark:hover:bg-slate-700 text-sm",children:s.jsxs("div",{className:"flex-1",children:[s.jsx("span",{className:"font-medium",children:c.action}),c.entityType&&s.jsxs("span",{className:"text-muted-foreground ml-2",children:["on ",c.entityType," #",c.entityId]}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:["User #",c.userId," · ",c.ipAddress||"unknown IP"," · ",new Date(c.createdAt).toLocaleString()]})]})},c.id))]}),r>20&&s.jsxs("div",{className:"flex gap-2 pt-2",children:[s.jsx(D,{size:"sm",variant:"outline",disabled:a===0,onClick:()=>i(Math.max(0,a-20)),children:"Previous"}),s.jsx(D,{size:"sm",variant:"outline",disabled:a+20>=r,onClick:()=>i(a+20),children:"Next"})]})]})}function dPe(){const[e,t]=p.useState([]),[r,n]=p.useState(""),a=()=>{fetch("/api/domain-controls",{credentials:"include"}).then(c=>c.json()).then(c=>{Array.isArray(c)&&t(c)}).catch(()=>{})};p.useEffect(()=>{a()},[]);const i=()=>{r&&fetch("/api/domain-controls",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:r,autoJoin:!1})}).then(()=>{n(""),a()})},o=c=>{fetch(`/api/domain-controls/${c}/verify`,{method:"POST",credentials:"include"}).then(()=>a())},l=c=>{fetch(`/api/domain-controls/${c}`,{method:"DELETE",credentials:"include"}).then(()=>a())};return s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ie,{placeholder:"e.g., acme.com",value:r,onChange:c=>n(c.target.value),className:"flex-1"}),s.jsx(D,{size:"sm",onClick:i,children:"Add"})]}),e.length===0&&s.jsx("p",{className:"text-sm text-muted-foreground",children:"No domains configured."}),e.map(c=>s.jsxs("div",{className:"flex items-center justify-between p-2 border rounded text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:c.domain}),s.jsx("span",{className:`ml-2 text-xs px-1.5 py-0.5 rounded ${c.isVerified?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-700"}`,children:c.isVerified?"Verified":"Pending"}),c.autoJoin&&s.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:"(auto-join)"})]}),s.jsxs("div",{className:"flex gap-1",children:[!c.isVerified&&s.jsx(D,{size:"sm",variant:"outline",onClick:()=>o(c.id),children:"Verify"}),s.jsx(D,{size:"sm",variant:"ghost",className:"text-red-500",onClick:()=>l(c.id),children:"Remove"})]})]},c.id))]})}function uPe(){const[e,t]=p.useState([]),[r,n]=p.useState("bookings"),[a,i]=p.useState(90),o=()=>{fetch("/api/data-retention",{credentials:"include"}).then(u=>u.json()).then(u=>{Array.isArray(u)&&t(u)}).catch(()=>{})};p.useEffect(()=>{o()},[]);const l=()=>{fetch("/api/data-retention",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({entityType:r,retentionDays:a})}).then(()=>o())},c=u=>{fetch(`/api/data-retention/${u}`,{method:"DELETE",credentials:"include"}).then(()=>o())},d=u=>{fetch(`/api/data-retention/${u}/run`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({dryRun:!1})}).then(f=>f.json()).then(()=>o())};return s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex gap-2 items-end",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-xs text-muted-foreground",children:"Entity Type"}),s.jsxs("select",{className:"w-full text-sm border rounded px-2 py-1.5",value:r,onChange:u=>n(u.target.value),children:[s.jsx("option",{value:"bookings",children:"Bookings"}),s.jsx("option",{value:"audit_logs",children:"Audit Logs"}),s.jsx("option",{value:"events",children:"Events"}),s.jsx("option",{value:"workflow_executions",children:"Workflow Executions"}),s.jsx("option",{value:"webhook_logs",children:"Webhook Logs"})]})]}),s.jsxs("div",{className:"w-24",children:[s.jsx("label",{className:"text-xs text-muted-foreground",children:"Days"}),s.jsx(ie,{type:"number",min:1,value:a,onChange:u=>i(parseInt(u.target.value)||90)})]}),s.jsx(D,{size:"sm",onClick:l,children:"Add"})]}),e.length===0&&s.jsx("p",{className:"text-sm text-muted-foreground",children:"No retention policies configured."}),e.map(u=>s.jsxs("div",{className:"flex items-center justify-between p-2 border rounded text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:u.entityType}),s.jsxs("span",{className:"text-muted-foreground ml-2",children:[u.retentionDays," days"]}),u.lastRunAt&&s.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:["Last run: ",new Date(u.lastRunAt).toLocaleDateString()]}),s.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:["Deleted: ",u.deletedCount||0]})]}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx(D,{size:"sm",variant:"outline",onClick:()=>d(u.id),children:"Run"}),s.jsx(D,{size:"sm",variant:"ghost",className:"text-red-500",onClick:()=>c(u.id),children:"Delete"})]})]},u.id))]})}function fPe(){const[e,t]=p.useState(null),[r,n]=p.useState(!1),[a,i]=p.useState(""),o=()=>{fetch("/api/user",{credentials:"include"}).then(d=>d.json()).then(d=>{d.organizationId&&fetch(`/api/scim/config/${d.organizationId}`,{credentials:"include"}).then(u=>{if(u.ok)return u.json();throw new Error("not found")}).then(u=>t(u)).catch(()=>t(null))})};p.useEffect(()=>{o()},[]);const l=()=>{fetch("/api/user",{credentials:"include"}).then(d=>d.json()).then(d=>{d.organizationId&&fetch("/api/scim/config",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:d.organizationId})}).then(u=>u.json()).then(u=>{t(u),i(u.bearerToken),n(!0)})})},c=()=>{e&&fetch(`/api/scim/config/${e.id}`,{method:"DELETE",credentials:"include"}).then(()=>{t(null),i("")})};return s.jsx("div",{className:"space-y-3",children:e?s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"p-2 border rounded text-sm",children:[s.jsx("p",{className:"font-medium",children:"SCIM Endpoint"}),s.jsxs("code",{className:"text-xs text-muted-foreground break-all",children:[window.location.origin,"/api/scim/v2"]})]}),s.jsxs("div",{className:"p-2 border rounded text-sm",children:[s.jsx("p",{className:"font-medium",children:"Bearer Token"}),r&&a?s.jsx("code",{className:"text-xs text-muted-foreground break-all",children:a}):s.jsx("code",{className:"text-xs text-muted-foreground",children:e.bearerToken})]}),e.provisionedCount>0&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Provisioned users: ",e.provisionedCount]}),s.jsx(D,{size:"sm",variant:"destructive",onClick:c,children:"Disable SCIM"})]}):s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"SCIM provisioning is not configured. Enable it to auto-sync users from your identity provider."}),s.jsx(D,{size:"sm",onClick:l,children:"Enable SCIM"})]})})}function hPe(){var ID,RD;const[e,t]=Nn(),r=_9(),{user:n,isAdmin:a,isCompanyAdmin:i}=gn(),{toast:o}=Qt(),[l,c]=p.useState([]),[d,u]=p.useState([]),[f,h]=p.useState([]),g=(A=>A==="organizations"||A==="companies"?"companies":A==="teams"||A==="audit"||A==="enterprise"||A==="login-links"||A==="invitations"||A==="booking-links"?A:"users")(r.tab),[x,v]=p.useState(!0),[b,y]=p.useState(!1),[j,w]=p.useState(!1),[N,S]=p.useState(!1),[k,T]=p.useState(!1),[C,E]=p.useState(!1),[P,_]=p.useState(!1),[I,F]=p.useState(!1),[H,W]=p.useState(!1),[z,R]=p.useState(!1),[q,V]=p.useState(null),[se,oe]=p.useState([]),[_e,U]=p.useState(!1),[M,G]=p.useState(null),[K,je]=p.useState("1h"),[ae,de]=p.useState(""),[Ce,B]=p.useState(""),[me,ne]=p.useState(null),[Be,lt]=p.useState([]),[ct,Y]=
705p.useState(""),[J,le]=p.useState(null),[Le,L]=p.useState([]),[he,Me]=p.useState(!1),[Ne,Re]=p.useState(""),[or,Jr]=p.useState(St.USER),[be,it]=p.useState(null),[vt,In]=p.useState(null),[Un,vs]=p.useState(!1),[ia,oa]=p.useState(""),[en,ys]=p.useState(!1),[Yo,Go]=p.useState(""),[Ql,vd]=p.useState(""),[Zl,Xi]=p.useState(""),[Ko,qm]=p.useState("auto-generate"),[A1,ny]=p.useState(!0),[Ym,GA]=p.useState(St.USER),[Xl,KA]=p.useState(null),[sy,D1]=p.useState(null),[QA,ZA]=p.useState(""),[XA,JA]=p.useState(""),[eD,tD]=p.useState(""),[rD,nD]=p.useState(""),[Gm,sD]=p.useState(null),[aD,iD]=p.useState(null),[oD,lD]=p.useState(null),[cD,dD]=p.useState(null),[uD,fD]=p.useState(""),[hD,mD]=p.useState(""),[pD,gD]=p.useState(""),[xD,vD]=p.useState(""),[yD,bD]=p.useState(""),[jD,wD]=p.useState(St.USER),[Jl,ND]=p.useState(null),[ay,M1]=p.useState(null),[I1,SD]=p.useState(!1),[kD,CD]=p.useState(""),[TD,_D]=p.useState(""),[PD,ED]=p.useState(""),[OD,AD]=p.useState(""),[Km,DD]=p.useState(null),[Vu,lre]=p.useState(""),[iy,cre]=p.useState("all"),[oy,dre]=p.useState("all"),[ly,ure]=p.useState("all"),[cy,fre]=p.useState("all"),[Qm,hre]=p.useState(""),[Zm,mre]=p.useState(""),[dy,pre]=p.useState("all"),R1=l.filter(A=>{var $D,LD;const Fe=Vu===""||A.username.toLowerCase().includes(Vu.toLowerCase())||A.email.toLowerCase().includes(Vu.toLowerCase())||A.displayName&&A.displayName.toLowerCase().includes(Vu.toLowerCase()),bt=iy==="all"||A.role===iy,Ji=oy==="all"||(($D=A.organizationId)==null?void 0:$D.toString())===oy,Lre=ly==="all"||((LD=A.teamId)==null?void 0:LD.toString())===ly,Fre=cy==="all"||(cy==="verified"?A.emailVerified:!A.emailVerified);return Fe&&bt&&Ji&&Lre&&Fre}),$1=d.filter(A=>Qm===""||A.name.toLowerCase().includes(Qm.toLowerCase())||A.description&&A.description.toLowerCase().includes(Qm.toLowerCase())),L1=f.filter(A=>{var Ji;const Fe=Zm===""||A.name.toLowerCase().includes(Zm.toLowerCase())||A.description&&A.description.toLowerCase().includes(Zm.toLowerCase()),bt=dy==="all"||((Ji=A.organizationId)==null?void 0:Ji.toString())===dy;return Fe&&bt});p.useEffect(()=>{var A;if(console.log("AdminDashboard: User role check",{user:n==null?void 0:n.username,role:n==null?void 0:n.role,roleType:typeof(n==null?void 0:n.role),isAdminValue:a,isCompanyAdminValue:i,adminRoleValue:St.ADMIN,roleMatch:(n==null?void 0:n.role)===St.ADMIN,lowerCaseMatch:((A=n==null?void 0:n.role)==null?void 0:A.toLowerCase())===St.ADMIN.toLowerCase()}),n&&!a&&!i){console.log("AdminDashboard: User is loaded but not admin or company admin, redirecting"),o({title:"Access Denied",description:"You don't have administrator privileges.",variant:"destructive"}),t("/login");return}if(!n){console.log("AdminDashboard: No user loaded yet, waiting...");const Fe=setTimeout(()=>{n||(console.log("AdminDashboard: Still no user after waiting, redirecting to login"),o({title:"Authentication Required",description:"Please log in to access the admin dashboard.",variant:"destructive"}),t("/login"))},1500);return()=>clearTimeout(Fe)}},[a,i,t,n,o]);const uy=async(A=ct)=>{const Fe=A.trim()?`?slug=${encodeURIComponent(A.trim().toLowerCase())}`:"",bt=await fetch(`/api/admin/booking-links${Fe}`,{headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"});bt.ok&<(await bt.json())},gre=async()=>{var A;if(J)try{const Fe=await fetch(`/api/admin/booking-links/${J.id}`,{method:"DELETE",credentials:"include"});if(!Fe.ok){const bt=await Fe.json();throw new Error(bt.message||"Failed to release booking link")}o({title:"Slug released",description:`/${J.slug} is free again for ${((A=J.owner)==null?void 0:A.username)??"its owner"}.`}),le(null),uy()}catch(Fe){console.error("Error releasing booking link:",Fe),o({title:"Error",description:Fe instanceof Error?Fe.message:"Failed to release booking link",variant:"destructive"})}},Rs=async()=>{v(!0);try{if(g==="users"){const A=i&&(n!=null&&n.organizationId)?`/api/organizations/${n.organizationId}/users`:"/api/admin/users";console.log(`AdminDashboard: Attempting to fetch users from ${A}`);const Fe=await fetch(A,{headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"});if(console.log("AdminDashboard: Users API response status:",Fe.status),Fe.ok){const bt=await Fe.json();console.log("AdminDashboard: Fetched users successfully:",bt),c(bt),console.log("AdminDashboard: Current environment:","production")}else{console.error("AdminDashboard: Failed to fetch users",Fe.status);try{const bt=await Fe.json();console.error("AdminDashboard: Error details:",bt)}catch{console.error("AdminDashboard: Could not parse error response")}}}if(g==="companies")if(i&&(n!=null&&n.organizationId)){console.log("AdminDashboard: COMPANY_ADMIN - fetching own organization");const A=await fetch(`/api/organizations/${n.organizationId}`,{headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"});if(A.ok){const Fe=await A.json();u([Fe])}}else{console.log("AdminDashboard: Attempting to fetch companies from /api/admin/companies");const A=await fetch("/api/admin/companies",{headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"});if(console.log("AdminDashboard: Companies API response status:",A.status),A.ok){const Fe=await A.json();console.log("AdminDashboard: Fetched companies successfully:",Fe),u(Fe)}else{console.error("AdminDashboard: Failed to fetch companies",A.status);try{const Fe=await A.json();console.error("AdminDashboard: Company error details:",Fe)}catch{console.error("AdminDashboard: Could not parse company error response")}}}if(g==="teams"){const A=i&&(n!=null&&n.organizationId)?`/api/organizations/${n.organizationId}/teams`:"/api/admin/teams";
705console.log(`AdminDashboard: Attempting to fetch teams from ${A}`);const Fe=await fetch(A,{headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"});if(console.log("AdminDashboard: Teams API response status:",Fe.status),Fe.ok){const bt=await Fe.json();console.log("AdminDashboard: Fetched teams successfully:",bt),h(bt)}else{console.error("AdminDashboard: Failed to fetch teams",Fe.status);try{const bt=await Fe.json();console.error("AdminDashboard: Teams error details:",bt)}catch{console.error("AdminDashboard: Could not parse teams error response")}}}if(g==="login-links"&&a){const[A,Fe]=await Promise.all([fetch("/api/admin/auto-login",{headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"}),fetch("/api/admin/users",{headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"})]);if(A.ok){const bt=await A.json();oe(bt)}if(Fe.ok){const bt=await Fe.json();c(bt)}}if(g==="booking-links"&&a&&await uy(),g==="invitations"&&a){const[A,Fe,bt]=await Promise.all([fetch("/api/admin/invitations",{headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"}),fetch("/api/admin/companies",{headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"}),fetch("/api/admin/teams",{headers:{Accept:"application/json","Content-Type":"application/json"},credentials:"include"})]);A.ok&&L(await A.json()),Fe.ok&&u(await Fe.json()),bt.ok&&h(await bt.json())}}catch(A){console.error("Error fetching admin data:",A),o({title:"Error",description:"Failed to fetch data",variant:"destructive"})}finally{v(!1)}},xre=async()=>{if(Ko==="manual"&&!Zl){o({title:"Error",description:"Password is required when using manual password mode",variant:"destructive"});return}try{const A=await fetch("/api/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Yo,email:Ql,password:Ko==="manual"?Zl:void 0,passwordMode:Ko,sendWelcomeEmail:A1,role:Ym,organizationId:Xl,teamId:sy})});if(!A.ok){const bt=await A.json();throw new Error(bt.message||"Failed to create user")}const Fe=await A.json();o({title:"Success",description:Fe.emailSent?"User created successfully. Credentials email sent.":"User created successfully"}),Go(""),vd(""),Xi(""),qm("auto-generate"),ny(!0),GA(St.USER),KA(null),D1(null),y(!1),console.log("Refreshing user data after adding a new user"),t("/admin/users"),await Rs()}catch(A){console.error("Error creating user:",A),o({title:"Error",description:A.message||"Failed to create user",variant:"destructive"})}},vre=A=>{iD(A),fD(A.username),mD(A.email),gD(A.firstName||""),vD(A.lastName||""),bD(A.displayName||""),wD(A.role),ND(A.organizationId||null),M1(A.teamId||null),SD(A.emailVerified===!0),T(!0)},yre=async()=>{if(aD)try{const A=await fetch(`/api/users/${aD.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:uD,email:hD,firstName:pD,lastName:xD,displayName:yD,role:jD,organizationId:Jl,teamId:ay,emailVerified:I1})});if(!A.ok){const Fe=await A.json();throw new Error(Fe.message||"Failed to update user")}o({title:"Success",description:"User updated successfully"}),iD(null),T(!1),Rs()}catch(A){console.error("Error updating user:",A),o({title:"Error",description:A instanceof Error?A.message:"Failed to update user",variant:"destructive"})}},bre=A=>{V(A),F(!0)},jre=async()=>{if(q)try{if(!(await fetch(`/api/users/${q}`,{method:"DELETE"})).ok)throw new Error("Failed to delete user");o({title:"Success",description:"User deleted successfully"}),V(null),F(!1),Rs()}catch(A){console.error("Error deleting user:",A),o({title:"Error",description:"Failed to delete user",variant:"destructive"})}},wre=async(A,Fe)=>{try{const bt=await fetch("/api/admin/resend-credentials",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:A})});if(!bt.ok){const Ji=await bt.json();throw new Error(Ji.message||"Failed to resend credentials")}o({title:"Success",description:`New credentials sent to ${Fe}`}),Rs()}catch(bt){console.error("Error resending credentials:",bt),o({title:"Error",description:bt instanceof Error?bt.message:"Failed to resend credentials",variant:"destructive"})}},Nre=async()=>
705{if(!M){o({title:"Error",description:"Please select a user",variant:"destructive"});return}try{const A=await fetch("/api/admin/auto-login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({userId:M,expiresIn:K==="indefinite"?null:K,label:ae||void 0})});if(!A.ok){const bt=await A.json();throw new Error(bt.message||"Failed to generate link")}const Fe=await A.json();B(Fe.url),o({title:"Success",description:"Auto-login link generated successfully"}),g==="login-links"&&Rs()}catch(A){console.error("Error generating auto-login link:",A),o({title:"Error",description:A instanceof Error?A.message:"Failed to generate link",variant:"destructive"})}},Sre=async A=>{try{const Fe=await fetch(`/api/admin/auto-login/${A}`,{method:"DELETE",credentials:"include"});if(!Fe.ok){const bt=await Fe.json();throw new Error(bt.message||"Failed to revoke token")}o({title:"Success",description:"Auto-login link revoked successfully"}),Rs()}catch(Fe){console.error("Error revoking token:",Fe),o({title:"Error",description:Fe instanceof Error?Fe.message:"Failed to revoke token",variant:"destructive"})}},MD=A=>{G(A||null),je("1h"),de(""),B(""),U(!0)},F1=async(A,Fe)=>{try{await navigator.clipboard.writeText(A),Fe&&(ne(Fe),setTimeout(()=>ne(null),2e3)),o({title:"Copied",description:"Link copied to clipboard"})}catch{o({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}},kre=()=>{Re(""),Jr(St.USER),it(null),In(null),vs(!1),oa(""),Me(!0)},Cre=async()=>{if(!Ne){o({title:"Error",description:"Email is required",variant:"destructive"});return}ys(!0);try{const A=await fetch("/api/admin/invitations",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:Ne.trim(),role:or,organizationId:be,teamId:vt,isComped:Un,note:ia||void 0})});if(!A.ok){const bt=await A.json();throw new Error(bt.message||"Failed to send invitation")}const Fe=await A.json();o({title:"Invitation sent",description:Fe.emailSent?`An invitation email was sent to ${Fe.email}.`:`Invitation created for ${Fe.email}, but the email could not be sent. Share the link manually.`}),Me(!1),Rs()}catch(A){console.error("Error sending invitation:",A),o({title:"Error",description:A instanceof Error?A.message:"Failed to send invitation",variant:"destructive"})}finally{ys(!1)}},Tre=async A=>{try{const Fe=await fetch(`/api/admin/invitations/${A}`,{method:"DELETE",credentials:"include"});if(!Fe.ok){const bt=await Fe.json();throw new Error(bt.message||"Failed to revoke invitation")}o({title:"Success",description:"Invitation revoked successfully"}),Rs()}catch(Fe){console.error("Error revoking invitation:",Fe),o({title:"Error",description:Fe instanceof Error?Fe.message:"Failed to revoke invitation",variant:"destructive"})}},_re=async()=>{try{if(!(await fetch("/api/companies",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:QA,description:XA})})).ok)throw new Error("Failed to create company");o({title:"Success",description:"Company created successfully"}),ZA(""),JA(""),w(!1),Rs()}catch(A){console.error("Error creating company:",A),o({title:"Error",description:"Failed to create company",variant:"destructive"})}},Pre=A=>{lD(A),CD(A.name),_D(A.description||""),E(!0)},Ere=async()=>{if(oD)try{if(!(await fetch(`/api/companies/${oD.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:kD,description:TD})})).ok)throw new Error("Failed to update company");o({title:"Success",description:"Company updated successfully"}),lD(null),E(!1),Rs()}catch(A){console.error("Error updating company:",A),o({title:"Error",description:"Failed to update company",variant:"destructive"})}},Ore=A=>{V(A),W(!0)},Are=async()=>{if(q)try{if(!(await fetch(`/api/companies/${q}`,{method:"DELETE"})).ok)throw new Error("Failed to delete company");o({title:"Success",description:"Company deleted successfully"}),V(null),W(!1),Rs()}catch(A){console.error("Error deleting company:",A),o({title:"Error",description:"Failed to delete company",variant:"destructive"})}},Dre=async()=>
705{if(!Gm){o({title:"Error",description:"Please select an organization for this team",variant:"destructive"});return}try{if(!(await fetch("/api/teams",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:eD,description:rD,organizationId:Gm})})).ok)throw new Error("Failed to create team");o({title:"Success",description:"Team created successfully"}),tD(""),nD(""),sD(null),S(!1),Rs()}catch(A){console.error("Error creating team:",A),o({title:"Error",description:"Failed to create team",variant:"destructive"})}},Mre=A=>{dD(A),ED(A.name),AD(A.description||""),DD(A.organizationId),_(!0)},Ire=async()=>{if(!cD||!Km){o({title:"Error",description:"Please select an organization for this team",variant:"destructive"});return}try{if(!(await fetch(`/api/teams/${cD.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:PD,description:OD,organizationId:Km})})).ok)throw new Error("Failed to update team");o({title:"Success",description:"Team updated successfully"}),dD(null),_(!1),Rs()}catch(A){console.error("Error updating team:",A),o({title:"Error",description:"Failed to update team",variant:"destructive"})}},Rre=A=>{V(A),R(!0)},$re=async()=>{if(q)try{if(!(await fetch(`/api/teams/${q}`,{method:"DELETE"})).ok)throw new Error("Failed to delete team");o({title:"Success",description:"Team deleted successfully"}),V(null),R(!1),Rs()}catch(A){console.error("Error deleting team:",A),o({title:"Error",description:"Failed to delete team",variant:"destructive"})}};return p.useEffect(()=>{Rs()},[g,a,i,n==null?void 0:n.organizationId]),n?!a&&!i?s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Access Denied"}),s.jsx(ye,{children:"You don't have administrator privileges to access this page."})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsxs("p",{className:"text-neutral-600 dar
705k:text-slate-400",children:["Your current role: ",s.jsx("span",{className:"font-semibold",children:n.role||"Unknown"})]}),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:"If you believe this is an error, please contact your system administrator."}),s.jsx("div",{className:"flex justify-end gap-2 mt-4",children:s.jsx(Te,{href:"/",children:s.jsx(D,{variant:"outline",children:"Back to Home"})})})]})]})})]}):s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{}),s.jsxs("main",{className:"flex-1 overflow-auto p-4 md:p-6 pb-20 md:pb-6",children:[s.jsxs("div",{className:"mb-8 flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold mb-2 text-neutral-900 dark:text-white",children:"Admin Dashboard"}),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:"Manage users, organizations, and teams"})]}),s.jsx(Te,{to:"/admin/subscriptions",children:s.jsxs(D,{className:"flex items-center gap-2",children:[s.jsx(xW,{className:"h-4 w-4"}),s.jsx("span",{children:"Subscription Management"})]})})]}),s.jsxs(Br,{value:g,onValueChange:A=>{t({users:"/admin/users",companies:"/admin/organizations",teams:"/admin/teams",audit:"/admin/audit",enterprise:"/admin/enterprise","login-links":"/admin/login-links",invitations:"/admin/invitations","booking-links":"/admin/booking-links"}[A]||"/admin",{replace:!0})},className:"w-full",children:[s.jsxs(Hr,{className:"mb-8",children:[s.jsxs(We,{value:"users",className:"flex items-center gap-2",children:[s.jsx(ir,{className:"h-4 w-4"}),s.jsx("span",{children:"Users"})]}),s.jsxs(We,{value:"companies",className:"flex items-center gap-2",children:[s.jsx(Eo,{className:"h-4 w-4"}),s.jsx("span",{children:"Organizations"})]}),s.jsxs(We,{value:"teams",className:"flex items-center gap-2",children:[s.jsx(ir,{className:"h-4 w-4"}),s.jsx("span",{children:"Teams"})]}),a&&s.jsxs(We,{value:"audit",className:"flex items-center gap-2",children:[s.jsx(LE,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden sm:inline",children:"Audit Log"}),s.jsx("span",{className:"sm:hidden",children:"Audit"})]}),a&&s.jsxs(We,{value:"enterprise",className:"flex items-center gap-2",children:[s.jsx(ym,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden sm:inline",children:"Enterprise"}),s.jsx("span",{className:"sm:hidden",children:"Ent."})]}),a&&s.jsxs(We,{value:"login-links",className:"flex items-center gap-2",children:[s.jsx(Lf,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden sm:inline",children:"Login Links"}),s.jsx("span",{className:"sm:hidden",children:"Links"})]}),a&&s.jsxs(We,{value:"invitations",className:"flex items-center gap-2",children:[s.jsx(Gc,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden sm:inline",children:"Invitations"}),s.jsx("span",{className:"sm:hidden",children:"Invites"})]}),a&&s.jsxs(We,{value:"booking-links",className:"flex items-center gap-2",children:[s.jsx(Yc,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden sm:inline",children:"Booking Links"}),s.jsx("span",{className:"sm:hidden",children:"Slugs"})]})]}),s.jsxs(Ve,{value:"users",className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"All Users"}),s.jsxs(D,{className:"flex items-center gap-2",onClick:()=>y(!0),children:[s.jsx(bh,{className:"h-4 w-4"}),s.jsx("span",{children:"Add User"})]})]}),s.jsx(X,{className:"dark:bg-slate-800 dark:border-slate-700",children:s.jsxs(te,{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(jo,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(ie,{type:"text",placeholder:"Search users by name, email, or username...",value:Vu,onChange:A=>lre(A.target.value),className:"pl-10"})]}),s.jsxs("div",{className:"flex flex-wrap gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Role:"}),s.jsxs(Xe,{value:iy,onValueChange:cre,children:[s.jsx(Qe,{className:"w-[140px]",children:s.jsx(Je,{placeholder:"All Roles"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"all",children:"All Roles"}),s.jsx(Z,{value:St.ADMIN,children:"Admin"}),s.jsx(Z,{value:St.COMPANY_ADMIN,children:"Company Admin"}),s.jsx(Z,{value:St.TEAM_MANAGER,children:"Team Manager"}),s.jsx(Z,{value:St.USER,children:"User"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Organization:"}),s.jsxs(Xe,{value:oy,onValueChange:dre,children:[s.jsx(Qe,{className:"w-[160px]",children:s.jsx(Je,{placeholder:"All Organizations"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"all",children:"All Organizations"}),d.map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Team:"}),s.jsxs(Xe,{value:ly,onValueChange:ure,children:[s.jsx(Qe,{className:"w-[140px]",children:s.jsx(Je,{placeholder:"All Teams"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"all",children:"All Teams"}),f.map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Verified:"}),s.jsxs(Xe,{value:cy,onValueChange:fre,children:[s.jsx(Qe,{className:"w-[130px]",children:s.jsx(Je,{placeholder:"All"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"all",children:"All"}),s.jsx(Z,{value:"verified",children:"Verified"}),s.jsx(Z,{value:"unverified",children:"Not Verified"})]})]})]})]}),(Vu||iy!=="all"||oy!=="all"||ly!=="all"||cy!=="all")&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Found ",R1.length," of ",l.length," users"]})]})}),s.jsx(X,{children:s.jsx(te,{className:"p-0",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"ID"}),s.jsx(Ee,{children:"Username"}),s.jsx(Ee,{children:"Email"}),s.jsx(Ee,{children:"Name"}),s.jsx(Ee,{children:"Role"}),s.jsx(Ee,{children:"Organization"}),s.jsx(Ee,{children:"Team"}),s.jsx(Ee,{children:"Verified"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}
705),s.jsx(ms,{children:x?s.jsx(Nt,{children:s.jsx(we,{colSpan:9,className:"text-center py-4",children:"Loading users..."})}):R1.length===0?s.jsx(Nt,{children:s.jsx(we,{colSpan:9,className:"text-center py-4",children:l.length===0?"No users found.":"No users match your search criteria."})}):R1.map(A=>{var Fe,bt;return s.jsxs(Nt,{children:[s.jsx(we,{children:A.id}),s.jsx(we,{children:A.username}),s.jsx(we,{children:A.email}),s.jsx(we,{children:A.displayName||"-"}),s.jsx(we,{children:A.role}),s.jsx(we,{children:A.organizationId?((Fe=d.find(Ji=>Ji.id===A.organizationId))==null?void 0:Fe.name)||A.organizationId:s.jsx("span",{className:"text-yellow-600 dark:text-yellow-500",children:"None"})}),s.jsx(we,{children:A.teamId?((bt=f.find(Ji=>Ji.id===A.teamId))==null?void 0:bt.name)||A.teamId:s.jsx("span",{className:"text-yellow-600 dark:text-yellow-500",children:"None"})}),s.jsx(we,{children:s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${A.emailVerified===!0?"bg-green-100 text-green-800":A.emailVerified===!1?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:A.emailVerified===!0?"Verified":A.emailVerified===!1?"Unverified":"Pending"})}),s.jsx(we,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(D,{variant:"outline",size:"icon",title:"Generate login link",onClick:()=>MD(A.id),children:s.jsx(Lf,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",title:"Resend credentials",onClick:()=>wre(A.id,A.email),children:s.jsx(Gc,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",title:"Edit user",onClick:()=>vre(A),children:s.jsx(vl,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",className:"text-red-500",title:"Delete user",onClick:()=>bre(A.id),children:s.jsx(Pr,{className:"h-4 w-4"})})]})})]},A.id)})})]})})})]}),s.jsxs(Ve,{value:"companies",className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"All Organizations"}),s.jsxs(D,{className:"flex items-center gap-2",onClick:()=>w(!0),children:[s.jsx(S0,{className:"h-4 w-4"}),s.jsx("span",{children:"Add Organization"})]})]}),s.jsx(X,{className:"dark:bg-slate-800 dark:border-slate-700",children:s.jsxs(te,{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(jo,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(ie,{type:"text",placeholder:"Search organizations by name...",value:Qm,onChange:A=>hre(A.target.value),className:"pl-10"})]}),Qm&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Found ",$1.length," of ",d.length," organizations"]})]})}),s.jsx(X,{children:s.jsx(te,{className:"p-0",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"ID"}),s.jsx(Ee,{children:"Name"}),s.jsx(Ee,{children:"Teams"}),s.jsx(Ee,{children:"Users"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}),s.jsx(ms,{children:x?s.jsx(Nt,{children:s.jsx(we,{colSpan:5,className:"text-center py-4",children:"Loading organizations..."})}):$1.length===0?s.jsx(Nt,{children:s.jsx(we,{colSpan:5,className:"text-center py-4",children:d.length===0?"No organizations found.":"No organizations match your search criteria."})}):$1.map(A=>s.jsxs(Nt,{children:[s.jsx(we,{children:A.id}),s.jsx(we,{children:A.name}),s.jsx(we,{children:"0"}),s.jsx(we,{children:"0"}),s.jsx(we,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(D,{variant:"outline",size:"icon",onClick:()=>Pre(A),children:s.jsx(vl,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",className:"text-red-500",onClick:()=>Ore(A.id),children:s.jsx(Pr,{className:"h-4 w-4"})})]})})]},A.id))})]})})})]}),s.jsxs(Ve,{value:"teams",className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"All Teams"}),s.jsxs(D,{className:"flex items-center gap-2",onClick:()=>S(!0),children:[s.jsx(S0,{className:"h-4 w-4"}),s.jsx("span",{children:"Add Team"})]})]}),s.jsx(X,{className:"dark:bg-slate-800 dark:border-slate-700",children:s.jsxs(te,{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(jo,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(ie,{type:"text",placeholder:"Search teams by name...",value:Zm,onChange:A=>mre(A.target.value),className:"pl-10"})]}),s.jsx("div",{className:"flex flex-wrap gap-3",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ee,{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Organization:"}),s.jsxs(Xe,{value:dy,onValueChange:pre,children:[s.jsx(Qe,{className:"w-[180px]",children:s.jsx(Je,{placeholder:"All Organizations"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"all",children:"All Organizations"}),d.map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))]})]})]})}),(Zm||dy!=="all")&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Found ",L1.length," of ",f.length," teams"]}
705)]})}),s.jsx(X,{children:s.jsx(te,{className:"p-0",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"ID"}),s.jsx(Ee,{children:"Name"}),s.jsx(Ee,{children:"Organization"}),s.jsx(Ee,{children:"Members"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}),s.jsx(ms,{children:x?s.jsx(Nt,{children:s.jsx(we,{colSpan:5,className:"text-center py-4",children:"Loading teams..."})}):L1.length===0?s.jsx(Nt,{children:s.jsx(we,{colSpan:5,className:"text-center py-4",children:f.length===0?"No teams found.":"No teams match your search criteria."})}):L1.map(A=>{var Fe;return s.jsxs(Nt,{children:[s.jsx(we,{children:A.id}),s.jsx(we,{children:A.name}),s.jsx(we,{children:((Fe=d.find(bt=>bt.id===A.organizationId))==null?void 0:Fe.name)||A.organizationId}),s.jsx(we,{children:"0"}),s.jsx(we,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(D,{variant:"outline",size:"icon",onClick:()=>Mre(A),children:s.jsx(vl,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",className:"text-red-500",onClick:()=>Rre(A.id),children:s.jsx(Pr,{className:"h-4 w-4"})})]})})]},A.id)})})]})})})]}),a&&s.jsxs(Ve,{value:"audit",className:"space-y-6",children:[s.jsx("div",{className:"flex justify-between items-center",children:s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"Audit Log"})}),s.jsx(X,{className:"dark:bg-slate-800 dark:border-slate-700",children:s.jsx(te,{className:"p-6",children:s.jsx(cPe,{})})})]}),a&&s.jsxs(Ve,{value:"enterprise",className:"space-y-6",children:[s.jsx("div",{className:"flex justify-between items-center",children:s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"Enterprise Settings"})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(X,{className:"dark:bg-slate-800 dark:border-slate-700",children:[s.jsxs(ue,{children:[s.jsxs(fe,{className:"flex items-center gap-2",children:[s.jsx(Yc,{className:"h-5 w-5"}),"Domain Control"]}),s.jsx(ye,{children:"Restrict sign-ups to approved email domains"})]}),s.jsx(te,{children:s.jsx(dPe,{})})]}),s.jsx(Q_e,{}),s.jsxs(X,{className:"dark:bg-slate-800 dark:border-slate-700",children:[s.jsxs(ue,{children:[s.jsxs(fe,{className:"flex items-center gap-2",children:[s.jsx(dr,{className:"h-5 w-5"}),"Data Retention"]}),s.jsx(ye,{children:"Automatically delete old data per policy"})]}),s.jsx(te,{children:s.jsx(uPe,{})})]}),s.jsxs(X,{className:"dark:bg-slate-800 dark:border-slate-700",children:[s.jsxs(ue,{children:[s.jsxs(fe,{className:"flex items-center gap-2",children:[s.jsx(eT,{className:"h-5 w-5"}),"SCIM Provisioning"]}),s.jsx(ye,{children:"Auto-sync users from identity providers"})]}),s.jsx(te,{children:s.jsx(fPe,{})})]})]})]}),s.jsxs(Ve,{value:"login-links",className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"Auto-Login Links"}),s.jsxs(D,{className:"flex items-center gap-2",onClick:()=>MD(),children:[s.jsx(Lf,{className:"h-4 w-4"}),s.jsx("span",{children:"Generate Link"})]})]}),s.jsxs(X,{className:"dark:bg-slate-800 dark:border-slate-700",children:[s.jsxs(ue,{children:[s.jsx(fe,{className:"text-lg",children:"Active Login Links"}),s.jsx(ye,{children:"Secure links that allow users to log in without credentials. Only system admins can create and manage these links."})]}),s.jsx(te,{className:"p-0",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"ID"}),s.jsx(Ee,{children:"Target User"}),s.jsx(Ee,{children:"Label"}),s.jsx(Ee,{children:"Expires"}),s.jsx(Ee,{children:"Uses"}),s.jsx(Ee,{children:"Last Used"}),s.jsx(Ee,{children:"Created By"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}),s.jsx(ms,{children:se.length===0?s.jsx(Nt,{children:s.jsx(we,{colSpan:8,className:"text-center py-4 text-muted-foreground",children:"No active auto-login links."})}):se.map(A=>s.jsxs(Nt,{className:A.isExpired?"opacity-50":"",children:[s.jsx(we,{children:A.id}),s.jsx(we,{children:s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:A.targetUsername}),s.jsx("div",{className:"text-xs text-muted-foreground",children:A.targetEmail})]})}),s.jsx(we,{children:A.label||s.jsx("span",{className:"text-muted-foreground",children:"-"})}),s.jsx(we,{children:A.expiresAt?s.jsx("div",{children:s.jsx("span",{className:A.isExpired?"text-red-500 font-medium":"",children:A.isExpired?"Expired":new Date(A.expiresAt).toLocaleStr
705ing()})}):s.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300",children:"Indefinite"})}),s.jsx(we,{children:A.useCount||0}),s.jsx(we,{children:A.lastUsedAt?new Date(A.lastUsedAt).toLocaleString():s.jsx("span",{className:"text-muted-foreground",children:"Never"})}),s.jsx(we,{children:A.createdByUsername}),s.jsx(we,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(D,{variant:"outline",size:"icon",title:"Copy link URL",onClick:()=>F1(A.url,A.id),disabled:A.isExpired,children:me===A.id?s.jsx(un,{className:"h-4 w-4 text-green-500"}):s.jsx(ea,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",className:"text-red-500",title:"Revoke link",onClick:()=>Sre(A.id),disabled:A.isExpired,children:s.jsx(Pr,{className:"h-4 w-4"})})]})})]},A.id))})]})})]})]}),s.jsxs(Ve,{value:"booking-links",className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center gap-4 flex-wrap",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"Booking Links"}),s.jsxs("form",{className:"flex items-center gap-2",onSubmit:A=>{A.preventDefault(),uy()},children:[s.jsx(ie,{placeholder:"Search by slug, e.g. pre-qualification",value:ct,onChange:A=>Y(A.target.value),className:"w-72"}),s.jsxs(D,{type:"submit",variant:"outline",className:"flex items-center gap-2",children:[s.jsx(jo,{className:"h-4 w-4"}),s.jsx("span",{children:"Search"})]}),ct&&s.jsx(D,{type:"button",variant:"ghost",onClick:()=>{Y(""),uy("")},children:"Clear"})]})]}),s.jsxs(X,{className:"dark:bg-slate-800 dark:border-slate-700",children:[s.jsxs(ue,{children:[s.jsx(fe,{className:"text-lg",children:ct.trim()?`Links at /${ct.trim().toLowerCase()}`:"All Booking Links"}),s.jsx(ye,{children:"Slugs are unique per account, so several people can each have /pre-qualification. Release a link here when a slug is held by an account that no longer needs it. Past bookings are kept; the link stops resolving."})]}),s.jsx(te,{className:"p-0",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"Slug"}),s.jsx(Ee,{children:"Title"}),s.jsx(Ee,{children:"Owner"}),s.jsx(Ee,{children:"URL"}),s.jsx(Ee,{children:"Bookings"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}),s.jsx(ms,{children:Be.length===0?s.jsx(Nt,{children:s.jsx(we,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:ct.trim()?`No booking link uses /${ct.trim().toLowerCase()} â it is free for any account.`:"No booking links yet."})}):Be.map(A=>s.jsxs(Nt,{children:[s.jsxs(we,{className:"font-mono text-sm",children:["/",A.slug]}),s.jsx(we,{children:s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:A.title}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:[A.duration," min",A.isTeamBooking?` · team${A.teamName?`: ${A.teamName}`:""}`:""]})]})}),s.jsx(we,{children:A.owner?s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:A.owner.displayName||A.owner.username}),s.jsx("div",{className:"text-xs text-muted-foreground",children:A.owner.email})]}):s.jsxs("span",{className:"text-muted-foreground",children:["Account #",A.ownerId," no longer exists"]})}),s.jsx(we,{className:"max-w-[260px]",children:A.url?s.jsx("span",{className:"text-xs text-muted-foreground break-all",children:A.url}):s.jsx("span",{className:"text-muted-foreground",children:"-"})}),s.jsx(we,{children:A.bookingCount}),s.jsx(we,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(D,{variant:"outline",size:"icon",title:"Copy public URL",onClick:()=>F1(A.url,A.id),disabled:!A.url,children:me===A.id?s.jsx(un,{className:"h-4 w-4 text-green-500"}):s.jsx(ea,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",className:"text-red-500",title:"Release this slug (deletes the link)",onClick:()=>le(A),children:s.jsx(Pr,{className:"h-4 w-4"})})]})})]},A.id))})]})})]})]}),s.jsxs(Ve,{value:"invitations",className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"Invitations"}),s.jsxs(D,{className:"flex items-center gap-2",onClick:kre,children:[s.jsx(bh,{className:"h-4 w-4"}),s.jsx("span",{children:"Invite User"})]})]}),s.jsxs(X,{className:"dark:bg-slate-800 dark:border-slate-700",children:[s.jsxs(ue,{children:[s.jsx(fe,{className:"text-lg",children:"Sent Invitations"}),s.jsx(ye,{children:"Invite someone to create an account. They'll receive a secure link to set their own password. Mark an invite as comped to grant the new account complimentary free access."})]}),s.jsx(te,{className:"p-0",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"Email"}),s.jsx(Ee,{children:"Role"}),s.jsx(Ee,{children:"Comped"}),s.jsx(Ee,{children:"Status"}),s.jsx(Ee,{children:"Expires"}),s.jsx(Ee,{children:"Invited By"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}),s.jsx(ms,{children:Le.length===0?s.jsx(Nt,{children:s.jsx(we,{c
705olSpan:7,className:"text-center py-4 text-muted-foreground",children:"No invitations have been sent yet."})}):Le.map(A=>{const Fe=A.isExpired?"expired":A.status,bt=Fe==="accepted"?"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300":Fe==="pending"?"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300":"bg-neutral-200 text-neutral-700 dark:bg-slate-700 dark:text-slate-300";return s.jsxs(Nt,{className:Fe!=="pending"?"opacity-70":"",children:[s.jsxs(we,{children:[s.jsx("div",{className:"font-medium",children:A.email}),A.note&&s.jsx("div",{className:"text-xs text-muted-foreground",children:A.note})]}),s.jsx(we,{className:"capitalize",children:(A.role||"").replace("_"," ")}),s.jsx(we,{children:A.isComped?s.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300",children:"Yes"}):s.jsx("span",{className:"text-muted-foreground",children:"-"})}),s.jsx(we,{children:s.jsx("span",{className:`text-xs px-2 py-0.5 rounded capitalize ${bt}`,children:Fe})}),s.jsx(we,{children:A.expiresAt?new Date(A.expiresAt).toLocaleString():s.jsx("span",{className:"text-muted-foreground",children:"-"})}),s.jsx(we,{children:A.invitedByUsername}),s.jsx(we,{className:"text-right",children:s.jsx(D,{variant:"outline",size:"icon",className:"text-red-500",title:"Revoke invitation",onClick:()=>Tre(A.id),disabled:A.status!=="pending",children:s.jsx(Pr,{className:"h-4 w-4"})})})]},A.id)})})]})})]})]})]}),s.jsx(Ot,{open:_e,onOpenChange:A=>{U(A),A||B("")},children:s.jsxs(kt,{className:"sm:max-w-[500px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Generate Auto-Login Link"}),s.jsx($t,{children:"Create a secure link that allows a user to log in without entering credentials. This link can be shared at your discretion."})]}),Ce?s.jsx("div",{className:"space-y-4 py-4",children:s.jsxs("div",{className:"p-3 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg",children:[s.jsx("p",{className:"text-sm font-medium text-green-800 dark:text-green-200 mb-2",children:"Link generated successfully!"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ie,{readOnly:!0,value:Ce,className:"text-xs font-mono"}),s.jsx(D,{size:"sm",variant:"outline",onClick:()=>F1(Ce),children:s.jsx(ea,{className:"h-4 w-4"})})]}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Share this link securely. ",K==="indefinite"?"This link will remain active until you revoke it.":`This link expires in ${K==="15m"?"15 minutes":K==="1h"?"1 hour":"24 hours"}.`]})]})}):s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Target User"}),s.jsxs(Xe,{value:(M==null?void 0:M.toString())||"",onValueChange:A=>G(parseInt(A)),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select a user..."})}),s.jsx(Ze,{children:l.map(A=>s.jsxs(Z,{value:A.id.toString(),children:[A.username," (",A.email,")"]},A.id))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Expiration"}),s.jsxs(Xe,{value:K,onValueChange:je,children:[s.jsx(Qe,{children:s.jsx(Je,{})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"15m",children:"15 Minutes"}),s.jsx(Z,{value:"1h",children:"1 Hour"}),s.jsx(Z,{value:"24h",children:"24 Hours"}),s.jsx(Z,{value:"indefinite",children:"Indefinite (until revoked)"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Label (optional)"}),s.jsx(ie,{placeholder:"e.g., Support access for user",value:ae,onChange:A=>de(A.target.value)})]})]}),s.jsx(Bt,{children:Ce?s.jsx(D,{onClick:()=>U(!1),children:"Done"}):s.jsxs(s.Fragment,{children:[s.jsx(D,{variant:"outline",onClick:()=>U(!1),children:"Cancel"}),s.jsx(D,{onClick:Nre,disabled:!M,children:"Generate Link"})]})})]})}),s.jsx(Ot,{open:b,onOpenChange:y,children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Add New User"}),s.jsx($t,{children:"Create a new user account. Click save when you're done."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"username",className:"text-right",children:"Username"}),s.jsx(ie,{id:"username",value:Yo,onChange:A=>Go(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"email",className:"text-right",children:"Email"}
705),s.jsx(ie,{id:"email",type:"email",value:Ql,onChange:A=>vd(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-start gap-4",children:[s.jsx(ee,{className:"text-right pt-2",children:"Password"}),s.jsxs("div",{className:"col-span-3 space-y-3",children:[s.jsxs($O,{value:Ko,onValueChange:A=>qm(A),className:"flex flex-col space-y-1",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Nj,{value:"auto-generate",id:"auto-generate"}),s.jsx(ee,{htmlFor:"auto-generate",className:"font-normal cursor-pointer",children:"Auto-generate password"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Nj,{value:"manual",id:"manual"}),s.jsx(ee,{htmlFor:"manual",className:"font-normal cursor-pointer",children:"Set password manually"})]})]}),Ko==="manual"&&s.jsx(ie,{id:"password",type:"password",placeholder:"Enter password",value:Zl,onChange:A=>Xi(A.target.value)})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{className:"text-right",children:"Notify User"}),s.jsxs("div",{className:"col-span-3 flex items-center space-x-2",children:[s.jsx(Gn,{id:"sendWelcomeEmail",checked:A1,onCheckedChange:A=>ny(A)}),s.jsx(ee,{htmlFor:"sendWelcomeEmail",className:"font-normal cursor-pointer",children:"Send welcome email with credentials"})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"role",className:"text-right",children:"Role"}),s.jsxs(Xe,{value:Ym,onValueChange:A=>GA(A),children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:"Select role"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:St.ADMIN,children:"Admin"}),s.jsx(Z,{value:St.COMPANY_ADMIN,children:"Company Admin"}),s.jsx(Z,{value:St.TEAM_MANAGER,children:"Team Manager"}),s.jsx(Z,{value:St.USER,children:"User"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"user-organization",className:"text-right",children:"Organization"}),s.jsxs(Xe,{value:(Xl==null?void 0:Xl.toString())||"none",onValueChange:A=>{const Fe=A==="none"?null:parseInt(A);KA(Fe),Fe!==Xl&&D1(null)},children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:"Select organization (optional)"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"none",children:"No Organization"}),d.map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))]})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"user-team",className:"text-right",children:"Team"}),s.jsxs(Xe,{value:(sy==null?void 0:sy.toString())||"none",onValueChange:A=>D1(A==="none"?null:parseInt(A)),disabled:!Xl,children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:Xl?"Select team (optional)":"Select organization first"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"none",children:"No Team"}),f.filter(A=>A.organizationId===Xl).map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))]})]})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>y(!1),children:"Cancel"}),s.jsx(D,{onClick:xre,children:"Save"})]})]})}),s.jsx(Ot,{open:he,onOpenChange:Me,children:s.jsxs(kt,{className:"sm:max-w-[480px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Invite User"}),s.jsx($t,{children:"Send an invitation email with a secure link. The recipient sets their own password to create the account."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"invite-email",className:"text-right",children:"Email"}),s.jsx(ie,{id:"invite-email",type:"email",placeholder:"[email protected]",value:Ne,onChange:A=>Re(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"invite-role",className:"text-right",children:"Role"}),s.jsxs(Xe,{value:or,onValueChange:A=>Jr(A),children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:"Select role"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:St.ADMIN,children:"Admin"}),s.jsx(Z,{value:St.COMPANY_ADMIN,children:"Company Admin"}),s.jsx(Z,{value:St.TEAM_MANAGER,children:"Team Manager"}),s.jsx(Z,{value:St.USER,children:"User"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"invite-organization",className:"text-right",children:"Organization"}),s.jsxs(Xe,{value:(be==null?void 0:be.toString())||"none",onValueChange:A=>{const Fe=A==="none"?null:parseInt(A);it(Fe),Fe!==be&&In(null)},children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:"Select organization (optional)"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"none",children:"No Organization"}),d.map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))]})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"invite-team",className:"text-right",children:"Team"}),s.jsxs(Xe,{value:(vt==null?void 0:vt.toString())||"none",onValueChange:A=>In(A==="none"?null:parseInt(A)),disabled:!be,children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:be?"Select team (optional)":"Select organization first"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"none",children:"No Team"}),f.filter(A=>A.organizationId===be).map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))]})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{className:"text-right",children:"Comp Account"}),s.jsxs("div",{className:"col-span-3 flex items-center space-x-2",children:[s.jsx(Gn,{id:"invite-comped",checked:Un,onCheckedChange:A=>vs(A)}),s.jsx(ee,{htmlFor:"invite-comped",className:"font-normal cursor-pointer",children:"Grant complimentary free access"})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-start gap-4",children:[s.jsx(ee,{htmlFor:"invite-note",className:"text-right pt-2",children:"Note"}),s.jsx(ie,{id:"invite-note",placeholder:"Reason for the comp (optional)",value:ia,onChange:A=>oa(A.target.value),className:"col-span-3"})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>Me(!1),children:"Cancel"}),s.jsx(D,{onClick:Cre,disabled:en||!Ne,children:en?"Sending...":"Send Invitation"})]})]})}),s.jsx(Ot,{open:j,onOpenChange:w,children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Add New Organization"}),s.jsx($t,{children:"Create a new organization. Click save when you're done."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"orgName",className:"text-right",children:"Name"}),s.jsx(ie,{id:"orgName",value:QA,onChange:A=>ZA(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"orgDescription",className:"text-right",children:"Description"}),s.jsx(ie,{id:"orgDescription",value:XA,onChange:A=>JA(A.target.value),className:"col-span-3"})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>w(!1),children:"Cancel"}),s.jsx(D,{onClick:_re,children:"Save"})]})]})}),s.jsx(Ot,{open:N,onOpenChange:S,children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Add New Team"}),s.jsx($t,{children:"Create a new team. Click save when you're done."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"teamName",className:"text-right",children:"Name"}),s.jsx(ie,{id:"teamName",value:eD,onChange:A=>tD(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"teamDescription",className:"text-right",children:"Description"}),s.jsx(ie,{id:"teamDescription",value:rD,onChange:A=>nD(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"teamOrg",className:"text-right",children:"Organization"}),s.jsxs(Xe,{value:(Gm==null?void 0:Gm.toString())||"",onValueChange:A=>sD(parseInt(A)),children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:"Select organization"})}),s.jsx(Ze,{children:d.map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))})]})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>S(!1),children:"Cancel"}),s.jsx(D,{onClick:Dre,children:"Save"})]})]})}),s.jsx(Ot,{open:k,onOpenChange:T,children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Edit User"}),s.jsx($t,{children:"Edit user details. Click save when you're done."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-username",className:"text-right",children:"Username"}),s.jsx(ie,{id:"edit-username",value:uD,onChange:A=>fD(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-email",className:"text-right",children:"Email"}),s.jsx(ie,{id:"edit-email",type:"email",value:hD,onChange:A=>mD(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-first-name",className:"text-right",children:"First Name"}),s.jsx(ie,{id:"edit-first-name",value:pD,onChange:A=>gD(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-last-name",className:"text-right",children:"Last Name"}),s.jsx(ie,{id:"edit-last-name",value:xD,onChange:A=>vD(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-display-name",className:"text-right",children:"Display Name"}),s.jsx(ie,{id:"edit-display-name",value:yD,onChange:A=>bD(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-verified",className:"text-right",children:"Verified"}),s.jsxs("div",{className:"col-span-3 flex items-center space-x-2",children:[s.jsx(gr,{id:"edit-verified",checked:I1,onCheckedChange:SD}),s.jsx(ee,{htmlFor:"edit-verified",className:"font-normal",children:I1?"Email verified":"Email not verified"})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-role",className:"text-right",children:"Role"}),s.jsxs(Xe,{value:jD,onValueChange:A=>wD(A),children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:"Select role"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:St.ADMIN,children:"Admin"}),s.jsx(Z,{value:St.COMPANY_ADMIN,children:"Company Admin"}),s.jsx(Z,{value:St.TEAM_MANAGER,children:"Team Manager"}),s.jsx(Z,{value:St.USER,children:"User"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-organization",className:"text-right",children:"Organization"}),s.jsxs(Xe,{value:(Jl==null?void 0:Jl.toString())||"none",onValueChange:A=>{const Fe=A==="none"?null:parseInt(A);ND(Fe),Fe!==Jl&&M1(null)},children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:"Select organization"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"none",children:"No Organization"}),d.map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))]})]})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-team",className:"text-right",children:"Team"}),s.jsxs(Xe,{value:(ay==null?void 0:ay.toString())||"none",onValueChange:A=>M1(A==="none"?null:parseInt(A)),disabled:!Jl,children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:Jl?"Select team":"Select organization first"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"none",children:"No Team"}),f.filter(A=>A.organizationId===Jl).map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))]})]})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>T(!1),children:"Cancel"}),s.jsx(D,{onClick:yre,children:"Save Changes"})]})]})}),s.jsx(Ot,{open:C,onOpenChange:E,children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Edit Organization"}),s.jsx($t,{children:"Edit organization details. Click save when you're done."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-orgName",className:"text-right",children:"Name"}),s.jsx(ie,{id:"edit-orgName",value:kD,onChange:A=>CD(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-orgDescription",className:"text-right",children:"Description"}),s.jsx(ie,{id:"edit-orgDescription",value:TD,onChange:A=>_D(A.target.value),className:"col-span-3"})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>E(!1),children:"Cancel"}),s.jsx(D,{onClick:Ere,children:"Save Changes"})]})]})}),s.jsx(Ot,{open:P,onOpenChange:_,children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Edit Team"}),s.jsx($t,{children:"Edit team details. Click save when you're done."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-teamName",className:"text-right",children:"Name"}),s.jsx(ie,{id:"edit-teamName",value:PD,onChange:A=>ED(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-teamDescription",className:"text-right",children:"Description"}),s.jsx(ie,{id:"edit-teamDescription",value:OD,onChange:A=>AD(A.target.value),className:"col-span-3"})]}),s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"edit-teamOrg",className:"text-right",children:"Organization"}),s.jsxs(Xe,{value:(Km==null?void 0:Km.toString())||"",onValueChange:A=>DD(parseInt(A)),children:[s.jsx(Qe,{className:"col-span-3",children:s.jsx(Je,{placeholder:"Select organization"})}),s.jsx(Ze,{children:d.map(A=>s.jsx(Z,{value:A.id.toString(),children:A.name},A.id))})]})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>_(!1),children:"Cancel"}),s.jsx(D,{onClick:Ire,children:"Save Changes"})]})]})})]}),s.jsx(Ot,{open:I,onOpenChange:F,children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Confirm Deletion"}),s.jsx($t,{children:"Are you sure you want to delete this user? This action cannot be undone."})]}),s.jsxs(Bt,{className:"mt-4",children:[s.jsx(D,{variant:"outline",onClick:()=>F(!1),children:"Cancel"}),s.jsx(D,{variant:"destructive",onClick:jre,children:"Delete"})]})]})}),s.jsx(Ot,{open:H,onOpenChange:W,children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Confirm Organization Deletion"}),s.jsx($t,{children:"Are you sure you want to delete this organization? All teams and user associations will be affected. This action cannot be undone."})]}),s.jsxs(Bt,{className:"mt-4",children:[s.jsx(D,{variant:"outline",onClick:()=>W(!1),children:"Cancel"}),s.jsx(D,{variant:"destructive",onClick:Are,children:"Delete"})]})]})}),s.jsx(Ot,{open:z,onOpenChange:R,children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Confirm Team Deleti
705on"}),s.jsx($t,{children:"Are you sure you want to delete this team? All user associations will be affected. This action cannot be undone."})]}),s.jsxs(Bt,{className:"mt-4",children:[s.jsx(D,{variant:"outline",onClick:()=>R(!1),children:"Cancel"}),s.jsx(D,{variant:"destructive",onClick:$re,children:"Delete"})]})]})}),s.jsx(Ot,{open:!!J,onOpenChange:A=>{A||le(null)},children:s.jsxs(kt,{className:"sm:max-w-[480px]",children:[s.jsxs(Ct,{children:[s.jsxs(Tt,{children:["Release /",J==null?void 0:J.slug,"?"]}),s.jsxs($t,{children:['This deletes the booking link "',J==null?void 0:J.title,'" owned by'," ",((ID=J==null?void 0:J.owner)==null?void 0:ID.displayName)||((RD=J==null?void 0:J.owner)==null?void 0:RD.username)||`account #${J==null?void 0:J.ownerId}`,". Its public URL stops working and the slug becomes free for that account to recreate.",(J==null?void 0:J.bookingCount)>0&&s.jsxs(s.Fragment,{children:[" ",s.jsxs("span",{className:"font-medium text-red-600",children:[J.bookingCount," booking",J.bookingCount===1?"":"s"," were made through this link"]}),"; those bookings are kept but can no longer be looked up by link."]})," ","This action cannot be undone."]})]}),s.jsxs(Bt,{className:"mt-4",children:[s.jsx(D,{variant:"outline",onClick:()=>le(null),children:"Cancel"}),s.jsx(D,{variant:"destructive",onClick:gre,children:"Release slug"})]})]})})]})]}):s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Loading User Data"}),s.jsx(ye,{children:"Checking authentication status..."})]}),s.jsx(te,{className:"flex justify-center p-6",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})})]})})]})}const i$=({size:e="md"})=>{const t={sm:"h-4 w-4",md:"h-8 w-8",lg:"h-12 w-12"};return s.jsx("div",{className:`animate-spin text-primary ${t[e]}`,children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})};function mPe(){const{user:e,isAdmin:t,isCompanyAdmin:r,isTeamManager:n}=gn(),[a,i]=p.useState(""),[o,l]=p.useState(null),[c,d]=p.useState(null),[u,f]=p.useState(null),[h,m]=p.useState(null),[g,x]=p.useState("asc");p.useState("users");const[v,b]=p.useState(!1),[y,j]=p.useState(!1),[w,N]=p.useState(null),[S,k]=p.useState(""),[T,C]=p.useState(!1),{toast:E}=Qt(),{data:P,isLoading:_,error:I,refetch:F}=ut({queryKey:["/api/users/all"],enabled:t||r||n}),{data:H,isLoading:W}=ut({queryKey:["/api/organizations"],enabled:t||r}),{data:z,isLoading:R}=ut({queryKey:["/api/teams"],enabled:t||r||n}),q=()=>{b(!0)},V=K=>{h===K?x(g==="asc"?"desc":"asc"):(m(K),x("asc"))},se=K=>h!==K?s.jsx(woe,{className:"h-4 w-4 text-gray-400"}):g==="asc"?s.jsx(vh,{className:"h-4 w-4 text-blue-600"}):s.jsx(Dl,{className:"h-4 w-4 text-blue-600"}),oe=(K,je)=>{N(K),k(je),j(!0)},_e=async()=>{if(w){C(!0);try{const K=await fetch(`/api/users/${w}`,{method:"DELETE"});if(K.ok)E({title:"Success",description:`User ${S} was deleted successfully`}),F();else{const je=await K.json();E({title:"Error",description:je.message||"Failed to delete user",variant:"destructive"})}}catch{E({title:"Error",description:"An unexpected error occurred",variant:"destructive"})}finally{C(!1),j(!1),N(null),k("")}}},M=(()=>{if(!P)return[];let K=P;if(r&&!t?K=K.filter(je=>je.organizationId===(e==null?void 0:e.organizationId)):n&&!t&&!r&&(K=K.filter(je=>je.teamId===(e==null?void 0:e.teamId))),a){const je=a.toLowerCase();K=K.filter(ae=>ae.username.toLowerCase().includes(je)||ae.email.toLowerCase().includes(je)||ae.role.toLowerCase().includes(je))}return o&&(K=K.filter(je=>je.organizationId===o)),c&&(K=K.filter(je=>je.teamId===c)),u&&(K=K.filter(je=>je.role===u)),h&&(K=[...K].sort((je,ae)=>{let de,Ce;if(h==="role"){const B={[St.ADMIN]:4,[St.COMPANY_ADMIN]:3,[St.TEAM_MANAGER]:2,[St.USER]:1};de=B[je.role]||0,Ce=B[ae.role]||0}else de=je[h]||"",Ce=ae[h]||"";return g==="asc"?de<Ce?-1:de>Ce?1:0:de>Ce?-1:de<Ce?1:0})),K})();if(!t&&!r&&!n)return s.jsx(Wae,{to:"/login"});const G=()=>s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"User Overview"}),s.jsx(ye,{children:t?"View and manage all users across the platform":r?"View and manage users in your organization":"View and manage users in your team"})]}),s.jsxs(te,{children:[s.jsxs("div",{className:"flex items-center mb-4",children:[s.jsxs("div",{className:"relative flex-grow",children:[s.jsx(jo,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),s.jsx(ie,{type:"text",placeholder:"Search users...",className:"pl-9",value:a,onChange:K=>i(K.target.value)})]}),t&&H&&s.jsxs("select",{className:"ml-2 p-2 border rounded-md",value:o||"",onChange:K=>l(K.target.value?Number(K.target.value):null),children:[s.jsx("option",{value:"",children:"All Organizations"}),H.map(K=>s.jsx("option",{value:K.id,children:K.name},K.id))]}),(t||r)&&z&&s.jsxs("select",{className:"ml-2 p-2 border rounded-md",value:c||"",onChange:K=>d(K.target.value?Number(K.target.value):null),children:[s.jsx("option",{value:"",children:"All Teams"}),z.map(K=>s.jsx("option",{value:K.id,children:K.name},K.id))]}),s.jsxs("select",{className:"ml-2 p-2 border rounded-md",value:u||"",onChange:K=>f(K.target.value||null),children:[s.jsx("option",{value:"",children:"All Roles"}),s.jsx("option",{value:St.ADMIN,children:"Admin"}),s.jsx("option",{value:St.COMPANY_ADMIN,children:"Company Admin"}),s.jsx("option",{value:St.TEAM_MANAGER,children:"Team Manager"}),s.jsx("option",{value:St.USER,children:"User"})]})]}),_||W||R?s.jsx("div",{className:"flex justify-center items-center h-60",children:s.jsx(i$,{size:"lg"})}):s.jsx(s.Fragment,{children:M.length===0?s.jsx("div",{className:"py-8 text-center",children:s.jsx("p",{className:"text-gray-500",children:"No users found matching your criteria"})}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{className:"cursor-pointer hover:bg-gray-50 select-none",onClick:()=>V("id"),children:s.jsxs("div",{className:"flex items-center gap-2",children:["ID ",se("id")]})}),s.jsx(Ee,{className:"cursor-pointer hover:bg-gray-50 select-none",onClick:()=>V("username"),children:s.jsxs("div",{className:"flex items-center gap-2",children:["Username ",se("username")]})}),s.jsx(Ee,{className:"cursor-pointer hover:bg-gray-50 select-none",onClick:()=>V("email"),children:s.jsxs("div",{className:"flex items-center gap-2",children:["Email ",se("email")]})}),s.jsx(Ee,{className:"cursor-pointer hover:bg-gray-50 select-none",onClick:()=>V("role"),children:s.jsxs("div",{className:"flex items-center gap-2",children:["Role ",se("role")]})}),s.jsx(Ee,{children:"Organization"}),s.jsx(Ee,{children:"Team"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}),s.jsx(ms,{children:M.map(K=>{var je,ae;return s.jsxs(Nt,{children:[s.jsx(we,{children:K.id}),s.jsx(we,{children:K.username}),s.jsx(we,{children:K.email}),s.jsx(we,{children:s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium 706 ${K.role==="admin"?"bg-red-100 text-red-800":K.role==="company_admin"?"bg-blue-100 text-blue-800":K.role==="team_manager"?"bg-yellow-100 text-yellow-800":"bg-green-100 text-green-800"}`,children:K.role})}),s.jsx(we,{children:((je=H==null?void 0:H.find(de=>de.id===K.organizationId))==null?void 0:je.name)||"-"}),s.jsx(we,{children:((ae=z==null?void 0:z.find(de=>de.id===K.teamId))==null?void 0:ae.name)||"-"}),s.jsx(we,{className:"text-right",children:K.id!==1&&s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>oe(K.id,K.username),disabled:K.role===St.ADMIN&&!t||K.role===St.COMPANY_ADMIN&&n&&!t&&!r,className:K.role===St.ADMIN&&!t||K.role===St.COMPANY_ADMIN&&n&&!t&&!r?"opacity-50 cursor-not-allowed":"text-red-500 hover:text-red-700 hover:bg-red-50",children:s.jsx(Pr,{className:"h-4 w-4"})})})]},K.id)})})]})})})]})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[s.jsxs(X,{children:[s.jsxs(ue,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(fe,{className:"text-sm font-medium",children:"Total Users"}),s.jsx(ir,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsx(te,{children:s.jsx("div",{className:"text-2xl font-bold",children:M.length})})]}),t&&s.jsxs(X,{children:[s.jsxs(ue,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(fe,{className:"text-sm font-medium",children:"Organizations"}),s.jsx(Eo,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsx(te,{children:s.jsx("div",{className:"text-2xl font-bold",children:(H==null?void 0:H.length)||0})})]}),(t||r)&&s.jsxs(X,{children:[s.jsxs(ue,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(fe,{className:"text-sm font-medium",children:"Teams"}),s.jsx(ir,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsx(te,{children:s.jsx("div",{className:"text-2xl font-bold",children:(z==null?void 0:z.length)||0})})]})]})]});return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dar
706k:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:q}),s.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-white dark:bg-slate-800",children:[s.jsxs("div",{className:"border-b border-neutral-300 dark:border-slate-700 p-4 bg-white dark:bg-slate-800",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold text-neutral-700 dark:text-slate-200",children:"User Management Dashboard"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400 mt-1",children:t?"Manage all users across the platform":r?"Manage users in your organization":"Manage users in your team"})]}),s.jsxs(D,{onClick:()=>F(),children:[s.jsx(Bg,{className:"mr-2 h-4 w-4"})," Refresh"]})]}),I&&s.jsxs(Rr,{variant:"destructive",className:"mt-4",children:[s.jsx(sn,{className:"h-4 w-4"}),s.jsx(fl,{children:"Error Loading Users"}),s.jsx($r,{children:"Failed to load user data. Please try refreshing the page."})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4 md:p-6 pb-20 md:pb-6",children:G()})]})]}),s.jsx(Ds,{onCreateEventClick:q}),s.jsx(Mn,{isOpen:v,onClose:()=>b(!1)}),s.jsx(wj,{open:y,onOpenChange:j,children:s.jsxs(hx,{children:[s.jsxs(mx,{children:[s.jsx(gx,{children:"Confirm User Deletion"}),s.jsxs(xx,{children:["Are you sure you want to delete user ",s.jsx("strong",{children:S}),"? This action cannot be undone."]})]}),s.jsxs(px,{children:[s.jsx(yx,{disabled:T,children:"Cancel"}),s.jsx(vx,{onClick:_e,disabled:T,className:"bg-red-500 hover:bg-red-600 text-white",children:T?s.jsxs(s.Fragment,{children:[s.jsx(i$,{size:"sm"}),s.jsx("span",{className:"ml-2",children:"Deleting..."})]}):"Delete User"})]})]})})]})}var ac={};const pPe=async()=>{console.log("Fetching users from /api/users");const e=await Ue("GET","/api/users");console.log("Users API response status:",e.status);const t=await e.json();return console.log("Users API response data:",t),t},gPe=async()=>await Ue("GET","/api/admin/subscriptions").then(e=>e.json()),xPe=async()=>await Ue("GET","/api/admin/teams").then(e=>e.json()),vPe=async()=>await Ue("GET","/api/admin/organizations").then(e=>e.json());function yPe(){const{isAdmin:e}=gn(),t=ld(),[r,n]=p.useState(!1),[a,i]=p.useState(!1),[o,l]=p.useState(null),[c,d]=p.useState(null),[u,f]=p.useState(null),[h,m]=p.useState("user"),[g,x]=p.useState(ws.INDIVIDUAL),[v,b]=p.useState(1),{data:y=[],isLoading:j}=ut({queryKey:["/api/users"],queryFn:pPe}),{data:w=[],isLoading:N}=ut({queryKey:["/api/admin/subscriptions"],queryFn:gPe}),{data:S=[],isLoading:k}=ut({queryKey:["/api/admin/teams"],queryFn:xPe}),{data:T=[],isLoading:C}=ut({queryKey:["/api/admin/organizations"],queryFn:vPe}),E=dt({mutationFn:async B=>{console.log("Granting free access to user ID:",B);try{const me=await Ue("POST",`/api/admin/free-access/${B}`);return console.log("Grant free access response:",me),me}catch(me){throw console.error("Error in grant free access mutation:",me),console.error("Detailed error from direct grant method:",me),me}},onSuccess:()=>{Hn({title:"Free access granted",description:"User now has free access to the platform."}),t.invalidateQueries({queryKey:["/api/users"]}),t.invalidateQueries({queryKey:["/api/admin/subscriptions"]}),n(!1)},onError:B=>{const me=(B==null?void 0:B.message)||"An error occurred while processing your request.";console.error("Grant free access detailed error:",B),Hn({title:"Error granting free access",description:me,variant:"destructive"})}}),P=dt({mutationFn:async B=>{try{const me=await Ue("POST",`/api/admin/revoke-free-access/${B}`);return console.log("Revoke free access response:",me),me}catch(me){throw console.error("Error in revoke free access mutation:",me),me}},onSuccess:()=>{Hn({title:"Free access revoked",description:"User no longer has free access to the platform."}),t.invalidateQueries({queryKey:["/api/users"]}),t.invalidateQueries({queryKey:["/api/admin/subscriptions"]})},onError:B=>{const me=(B==null?void 0:B.message)||"An error occurred while processing your request.";Hn({title:"Error revoking free access",description:me,variant:"destructive"}),console.error("Revoke free access error:",B)}}),_=dt({mutationFn:async B=>{let me,ne,Be={};if(B.type==="user"?(me=y.find(Y=>Y.id===B.entityId),ne=me==null?void 0:me.stripeCustomerId,Be.userId=B.entityId):B.type==="team"?(me=S.find(Y=>Y.id===B.entityId),ne=me==null?void 0:me.stripeCustomerId,Be.teamId=B.entityId):B.type==="organization"&&(me=T.find(Y=>Y.id===B.entityId),ne=me==null?void 0:me.stripeCustomerId,Be.organizationId=B.entityId),!ne){const Y={name:(me==null?void 0:me.name)||(me==null?void 0:me.displayName)||(me==null?void 0:me.username)||"Customer",email:(me==null?void 0:me.email)||"[email protected]",...Be};ne=(await Ue("POST","/api/stripe/customers",Y).then(le=>le.json())).customerId}const lt=window.location.href.split("?")[0],ct={stripeCustomerId:ne,priceId:U(B.plan),quantity:B.quantity,...Be,successUrl:`${lt}?checkout_success=true&plan=${B.plan}&entity_type=${B.type}
706&entity_id=${B.entityId}`,cancelUrl:`${lt}?checkout_canceled=true`};try{const Y=await Ue("POST","/api/stripe/checkout",ct);if(!Y.ok){const le=await Y.json();throw new Error(le.message||"Failed to create checkout session")}const J=await Y.json();if(J.url)return window.location.href=J.url,J;throw new Error("Failed to create checkout session - no URL returned")}catch(Y){throw console.error("Checkout session error details:",Y),Y}},onSuccess:()=>{Hn({title:"Redirecting to Stripe",description:"You will be redirected to Stripe to complete payment."})},onError:B=>{console.error("Create subscription detailed error:",B);let me="An error occurred while setting up the subscription.";B instanceof Error?me=B.message:typeof B=="object"&&B!==null&&(me=JSON.stringify(B)),Hn({title:"Error creating subscription",description:me,variant:"destructive"})}});p.useEffect(()=>{const B=new URLSearchParams(window.location.search),me=B.get("checkout_success"),ne=B.get("checkout_canceled");if(me==="true"){const Be=new URL(window.location.href);Be.search="",window.history.replaceState({},document.title,Be.toString()),Hn({title:"Subscription created",description:"Your subscription has been set up successfully!"}),t.invalidateQueries({queryKey:["/api/admin/subscriptions"]})}else if(ne==="true"){const Be=new URL(window.location.href);Be.search="",window.history.replaceState({},document.title,Be.toString()),Hn({title:"Checkout canceled",description:"You canceled the subscription checkout process."})}},[]);const I=dt({mutationFn:async B=>await Ue("POST",`/api/stripe/subscriptions/${B}/cancel`),onSuccess:()=>{Hn({title:"Subscription canceled",description:"The subscription has been canceled."}),t.invalidateQueries({queryKey:["/api/admin/subscriptions"]})},onError:B=>{Hn({title:"Error canceling subscription",description:"An error occurred while canceling the subscription.",variant:"destructive"}),console.error("Cancel subscription error:",B)}}),F=dt({mutationFn:async B=>await Ue("POST",`/api/stripe/subscriptions/${B}/reactivate`),onSuccess:()=>{Hn({title:"Subscription reactivated",description:"The subscription has been reactivated."}),t.invalidateQueries({queryKey:["/api/admin/subscriptions"]})},onError:B=>{Hn({title:"Error reactivating subscription",description:"An error occurred while reactivating the subscription.",variant:"destructive"}),console.error("Reactivate subscription error:",B)}}),H=B=>{if(B.userId){const me=y.find(ne=>ne.id===B.userId);return me?me.displayName||me.username:"Unknown User"}else if(B.teamId){const me=S.find(ne=>ne.id===B.teamId);return me?me.name:"Unknown Team"}else if(B.organizationId){const me=T.find(ne=>ne.id===B.organizationId);return me?me.name:"Unknown Organization"}return"Unknown Entity"},W=B=>B.userId?"User":B.teamId?"Team":B.organizationId?"Organization":"Unknown",z=B=>B?new Date(B).toLocaleDateString():"N/A",R=B=>{switch(B){case rl.ACTIVE:return s.jsx(pe,{className:"bg-green-500",children:"Active"});case rl.CANCELED:return s.jsx(pe,{className:"bg-yellow-500",children:"Canceled"});case rl.PAST_DUE:return s.jsx(pe,{className:"bg-red-500",children:"Past Due"});case rl.UNPAID:return s.jsx(pe,{className:"bg-red-700",children:"Unpaid"});case rl.EXPIRED:return s.jsx(pe,{className:"bg-gray-500",children:"Expired"});case rl.TRIALING:return s.jsx(pe,{className:"bg-blue-500",children:"Trial"});default:return s.jsx(pe,{className:"bg-gray-300",children:B})}},q=B=>{switch(B){case ws.INDIVIDUAL:return s.jsx(pe,{className:"bg-indigo-500",children:"Individual"});case ws.TEAM:return s.jsx(pe,{className:"bg-purple-500",children:"Team"});case ws.ORGANIZATION:return s.jsx(pe,{className:"bg-blue-500",children:"Organization"});default:return s.jsx(pe,{className:"bg-gray-300",children:B})}},{data:V,isLoading:se,error:oe,refetch:_e}=ut({queryKey:["/api/stripe/validate-config"],queryFn:async()=>{console.log("Fetching Stripe configuration...");try{const B=await fetch("/api/stripe/validate-config",{method:"GET",credentials:"include"});if(console.log("Stripe config API response status:",B.status),!B.ok){let me="Unknown error";try{me=await B.text()}catch(ne){console.error("Failed to read error text:",ne)}throw console.error("Error fetching Stripe config:",me),new Error(`Failed to fetch Stripe configuration: ${B.status} ${me}`)}try{const me=await B.json();return console.log("Stripe config API response data:",me),me}catch(me){const ne=me;throw console.error("Error parsing Stripe config JSON:",ne),new Error(`Failed to parse Stripe configuration JSON: ${ne.message}`)}}catch(B){throw console.error("Exception in Stripe config fetch:",B),B}},retry:2,retryDelay:1e3}),U=B=>{if(V!=null&&V.prices)switch(B){case ws.INDIVIDUAL:return V.prices.INDIVIDUAL;case ws.TEAM:return V.prices.TEAM;case ws.ORGANIZATION:return V.prices.ORGANIZATION;default:return V.prices.INDIVIDUAL}switch(B){case ws.INDIVIDUAL:return ac.STRIPE_PRICE_INDIVIDUAL||ac.STRIPEPRICE_INDIVIDUAL||"price_individual";case ws.TEAM:return ac.STRIPE_PRICE_TEAM||ac.STRIPEPRICE_TEAM||"price_team";case ws.ORGANIZATION:return ac.STRIPE_PRICE_ORGANIZATION||ac.STRIPEPRICE_ORGANIZATION||"price_organization";default:return ac.STRIPE_PRICE_INDIVIDUAL||ac.STRIPEPRICE_INDIVIDUAL||"price_individual"}},M=()=>{l(null),d(null),f(null),m("user"),x(ws.INDIVIDUAL),b(1)},G=B=>{l(parseInt(B,10))},K=B=>{d(parseInt(B,10))},je=B=>{f(parseInt(B,10))},ae=B=>{m(B),l(null),d(null),f(null)},de=()=>{switch(h){case"user":return s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"User"}),s.jsxs(Xe,{onValueChange:G,value:o==null?void 0:o.toString(),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select a user"})}),s.jsx(Ze,{children:y.map(B=>s.jsxs(Z,{value:B.id.toString(),children:[B.displayName||B.username," (",B.email,")"]},B.id))})]})]});case"team":return s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Team"}),s.jsxs(Xe,{onValueChange:K,value:c==null?void 0:c.toString(),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select a team"})}),s.jsx(Ze,{children:S.map(B=>s.jsx(Z,{value:B.id.toString(),children:B.name},B.id))})]})]});case"organization":return s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Organization"}),s.jsxs(Xe,{onValueChange:je,value:u==null?void 0:u.toString(),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select an organization"})}),s.jsx(Ze,{children:T.map(B=>s.jsx(Z,{value:B.id.toString(),children:B.name},B.id))})]})]});default:return null}},Ce=()=>{let B;if(h==="user"?B=o:h==="team"?B=c:h==="organization"&&(B=u),!B){Hn({title:"Error",description:"Please select an entity",variant:"destructive"});return}_.mutate({type:h,entityId:B,plan:g,quantity:v})};return e?s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dar
706k:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{}),s.jsxs("main",{className:"flex-1 overflow-auto p-6",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx("h1",{className:"text-3xl font-bold mb-2 text-neutral-900 dark:text-white",children:"Subscription Management"}),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:"Manage user subscriptions, grant free access, and create new subscriptions."}),se?s.jsx("div",{className:"mt-2 text-sm text-neutral-500",children:"Checking Stripe configuration..."}):oe?s.jsxs("div",{className:"mt-2 text-sm text-red-600 flex items-center",children:[s.jsx(xl,{className:"h-4 w-4 mr-1"}),"Error loading Stripe configuration: ",oe instanceof Error?oe.message:"Unknown error"]}):V!=null&&V.enabled?s.jsxs("div",{className:"mt-2 text-sm text-green-600 flex items-center",children:[s.jsx(Zd,{className:"h-4 w-4 mr-1"}),"Stripe integration active - ",V.products||0," product(s) available",V.publishableKey&&s.jsxs("span",{className:"ml-2",children:["(Publishable Key: ",V.publishableKey.substring(0,8),"...)"]})]}):s.jsxs("div",{className:"mt-2 text-sm text-red-600 flex items-center",children:[s.jsx(xl,{className:"h-4 w-4 mr-1"}),(V==null?void 0:V.message)||"Stripe integration is not configured",s.jsx(D,{variant:"outline",size:"sm",className:"ml-2",onClick:()=>{console.log("Manually refetching Stripe configuration..."),_e()},children:"Retry"})]}),!1]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-6 mb-8",children:[s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-xl",children:"Individual Users"}),s.jsx(ye,{children:"$9.99 per user / month"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(koe,{className:"h-8 w-8 text-indigo-500 mr-2"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-bold",children:"$9.99"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"14-day trial included"})]})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-xl",children:"Teams"}),s.jsx(ye,{children:"$30 base + $8 per user / month"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(ir,{className:"h-8 w-8 text-purple-500 mr-2"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-bold",children:"$30 + $8/user"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Shared calendar and controls"})]})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-xl",children:"Organizations"}),s.jsx(ye,{children:"$99 base + $8 per user / month"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(yoe,{className:"h-8 w-8 text-blue-500 mr-2"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-bold",children:"$99 + $8/user"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Enterprise features included"})]})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-xl",children:"Free Access"}),s.jsx(ye,{children:"For special users and admins"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(Zd,{className:"h-8 w-8 text-green-500 mr-2"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-2xl font-bold",children:"$0.00"}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Admin granted access"})]})]})})]})]}),s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h2",{className:"text-2xl font-semibold",children:"Active Subscriptions"}),s.jsxs("div",{className:"flex space-x-4",children:[s.jsxs(Ot,{open:r,onOpenChange:n,children:[s.jsx(_c,{asChild:!0,children:s.jsxs(D,{variant:"outline",children:[s.jsx(Zd,{className:"mr-2 h-4 w-4"}),"Grant Free Access"]})}),s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Grant Free Access"}),s.jsx($t,{children:"Select a user to grant free access to the platform."})]}),s.jsx("div",{className:"space-y-4 py-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"User"}),s.jsxs(Xe,{onValueChange:B=>l(parseInt(B,10)),children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select a user"})}
706),s.jsx(Ze,{children:y.filter(B=>!B.hasFreeAccess).map(B=>s.jsxs(Z,{value:B.id.toString(),children:[B.displayName||B.username," (",B.email,")"]},B.id))})]})]})}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),s.jsx(D,{onClick:()=>{o&&E.mutate(o)},disabled:!o||E.isPending,children:E.isPending?"Processing...":"Grant Access"})]})]})]}),s.jsxs(Ot,{open:a,onOpenChange:i,children:[s.jsx(_c,{asChild:!0,children:s.jsxs(D,{children:[s.jsx(bh,{className:"mr-2 h-4 w-4"}),"Create Subscription"]})}),s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Create New Subscription"}),s.jsx($t,{children:"Set up a new subscription with secure payment processing. You'll be redirected to Stripe to enter payment details."})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Subscription Type"}),s.jsxs(Xe,{onValueChange:ae,defaultValue:"user",children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select type"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"user",children:"Individual User"}),s.jsx(Z,{value:"team",children:"Team"}),s.jsx(Z,{value:"organization",children:"Organization"})]})]})]}),de(),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Subscription Plan"}),s.jsxs(Xe,{onValueChange:B=>x(B),defaultValue:ws.INDIVIDUAL,children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select plan"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:ws.INDIVIDUAL,children:"Individual ($9.99/user)"}),s.jsx(Z,{value:ws.TEAM,children:"Team ($30 + $8/user)"}),s.jsx(Z,{value:ws.ORGANIZATION,children:"Organization ($99 + $8/user)"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Quantity (Users)"}),s.jsx(ie,{type:"number",min:"1",value:v,onChange:B=>b(parseInt(B.target.value)||1)})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>{i(!1),M()},children:"Cancel"}),s.jsx(D,{onClick:Ce,disabled:_.isPending||h==="user"&&!o||h==="team"&&!c||h==="organization"&&!u,children:_.isPending?"Processing...":"Continue to Payment"})]})]})]})]})]}),s.jsx(X,{className:"mb-8",children:s.jsx(te,{className:"pt-6",children:N?s.jsx("div",{className:"text-center py-8",children:"Loading subscriptions..."}):w.length===0?s.jsx("div",{className:"text-center py-8 text-neutral-500",children:"No subscriptions found. Create a subscription to get started."}):s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"Name"}),s.jsx(Ee,{children:"Type"}),s.jsx(Ee,{children:"Plan"}),s.jsx(Ee,{children:"Status"}),s.jsx(Ee,{children:"Current Period"}),s.jsx(Ee,{children:"Actions"})]})}),s.jsx(ms,{children:w.map(B=>s.jsxs(Nt,{children:[s.jsx(we,{className:"font-medium",children:H(B)}),s.jsx(we,{children:W(B)}),s.jsx(we,{children:q(B.plan)}),s.jsx(we,{children:R(B.status)}),s.jsx(we,{children:B.currentPeriodStart&&s.jsxs("span",{children:[z(B.currentPeriodStart)," - ",z(B.currentPeriodEnd)]})}),s.jsxs(we,{children:[B.status===rl.ACTIVE&&s.jsx(D,{variant:"outline",size:"sm",onClick:()=>I.mutate(B.id),disabled:I.isPending,children:I.isPending?"Processing...":"Cancel"}),B.status===rl.CANCELED&&s.jsx(D,{size:"sm",onClick:()=>F.mutate(B.id),disabled:F.isPending,children:F.isPending?"Processing...":"Reactivate"})]})]},B.id))})]})})}),s.jsx("div",{className:"mb-6",children:s.jsx("h2",{className:"text-2xl font-semibold",children:"Users with Free Access"})}),s.jsx(X,{children:s.jsx(te,{className:"pt-6",children:j?s.jsx("div",{className:"text-center py-8",children:"Loading users..."}):s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"User"}),s.jsx(Ee,{children:"Email"}),s.jsx(Ee,{children:"Role"}),s.jsx(Ee,{children:"Status"}),s.jsx(Ee,{children:"Actions"})]})}),s.jsxs(ms,{children:[y.filter(B=>B.hasFreeAccess).map(B=>s.jsxs(Nt,{children:[s.jsx(we,{className:"font-medium",children:B.displayName||B.username}),s.jsx(we,{children:B.email}),s.jsx(we,{children:B.role}),s.jsx(we,{children:s.jsx(pe,{className:"bg-green-500",children:"Free Access"})}),s.jsx(we,{children:s.jsx(D,{variant:"outline",size:"sm",onClick:()=>P.mutate(B.id),disabled:P.isPending,children:P.isPending?"Processing...":"Revoke Access"})})]}
706,B.id)),y.filter(B=>B.hasFreeAccess).length===0&&s.jsx(Nt,{children:s.jsx(we,{colSpan:5,className:"text-center py-4 text-neutral-500",children:"No users with free access. Grant free access to users as needed."})})]})]})})})]})]})]}):s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6",children:s.jsx(X,{children:s.jsxs(ue,{children:[s.jsx(fe,{children:"Access Denied"}),s.jsx(ye,{children:"You need administrator privileges to access this page."})]})})})]})]})}const bPe=()=>{var me;console.log("StripeProductsManager component loading..."),p.useEffect(()=>(console.log("StripeProductsManager component mounted"),()=>console.log("StripeProductsManager component unmounted")),[]);const[e,t]=p.useState(!1),[r,n]=p.useState("products"),[a,i]=p.useState(""),[o,l]=p.useState(""),[c,d]=p.useState(""),[u,f]=p.useState(""),[h,m]=p.useState("usd"),[g,x]=p.useState("month"),[v,b]=p.useState(""),[y,j]=p.useState(!1),[w,N]=p.useState(!1),[S,k]=p.useState(""),[T,C]=p.useState(""),{toast:E}=Qt(),{data:P,isLoading:_,error:I,refetch:F}=ut({queryKey:["/api/stripe/validate-config"],queryFn:async()=>{try{const ne=await fetch("/api/stripe/validate-config",{method:"GET",credentials:"include"});if(!ne.ok){let Be="Unknown error";try{Be=await ne.text()}catch(lt){console.error("Failed to read error text:",lt)}throw new Error(`Failed to fetch Stripe configuration: ${ne.status} ${Be}`)}try{return await ne.json()}catch(Be){const lt=Be;throw new Error(`Failed to parse Stripe configuration JSON: ${lt.message}`)}}catch(ne){throw console.error("Exception in Stripe config fetch:",ne),ne}}}),{data:H,isLoading:W,refetch:z}
706=ut({queryKey:["/api/stripe-manager/products"],queryFn:async()=>{const ne=await Ue("GET","/api/stripe-manager/products");if(!ne.ok){const Be=await ne.text();throw new Error(`Failed to fetch products: ${ne.status} ${Be}`)}return ne.json()},enabled:(P==null?void 0:P.enabled)===!0}),{data:R,isLoading:q,refetch:V}=ut({queryKey:["/api/stripe-manager/prices"],queryFn:async()=>{const ne=await Ue("GET","/api/stripe-manager/prices");if(!ne.ok){const Be=await ne.text();throw new Error(`Failed to fetch prices: ${ne.status} ${Be}`)}return ne.json()},enabled:(P==null?void 0:P.enabled)===!0}),{data:se,isLoading:oe,refetch:_e}=ut({queryKey:["/api/stripe-manager/plan-mappings"],queryFn:async()=>{const ne=await Ue("GET","/api/stripe-manager/plan-mappings");if(!ne.ok){const Be=await ne.text();throw new Error(`Failed to fetch plan mappings: ${ne.status} ${Be}`)}return ne.json()},enabled:(P==null?void 0:P.enabled)===!0}),U=dt({mutationFn:async ne=>{const Be=await Ue("POST","/api/stripe-manager/products",ne);if(!Be.ok){const lt=await Be.text();throw new Error(`Failed to create product: ${Be.status} ${lt}`)}return Be.json()},onSuccess:()=>{E({title:"Product created",description:"The product has been created successfully."}),z(),j(!1),i(""),l("")},onError:ne=>{E({title:"Error",description:ne.message,variant:"destructive"})}}),M=dt({mutationFn:async ne=>
706{const Be=await Ue("POST","/api/stripe-manager/prices",ne);if(!Be.ok){const lt=await Be.text();throw new Error(`Failed to create price: ${Be.status} ${lt}`)}return Be.json()},onSuccess:()=>{E({title:"Price created",description:"The price has been created successfully."}),V(),t(!1),d(""),f(""),b("")},onError:ne=>{E({title:"Error",description:ne.message,variant:"destructive"})}}),G=dt({mutationFn:async ne=>{const Be=await Ue("POST","/api/stripe-manager/plan-mappings",ne);if(!Be.ok){const lt=await Be.text();throw new Error(`Failed to update plan mapping: ${Be.status} ${lt}`)}return Be.json()},onSuccess:()=>{E({title:"Plan mapping updated",description:"The plan mapping has been updated successfully."}),_e(),F(),N(!1),k(""),C("")},onError:ne=>{E({title:"Error",description:ne.message,variant:"destructive"})}}),K=()=>{if(!a){E({title:"Error",description:"Product name is required",variant:"destructive"});return}U.mutate({name:a,description:o})},je=()=>{if(!v||!u){E({title:"Error",description:"Product and amount are required",variant:"destructive"});return}const ne=parseInt(u)*100;M.mutate({productId:v,unitAmount:ne,currency:h,recurring:g?{interval:g}:void 0})},ae=()=>{if(!S||!T){E({title:"Error",description:"Plan and price are required",variant:"destructive"});return}G.mutate({planId:S,priceId:T})},de=ne=>R?R.find(Be=>Be.id===ne):null,Ce=(ne,Be="usd")=>new Intl.NumberFormat("en-US",{style:"currency",currency:Be.toUpperCase()}).format(ne/100),B=()=>{F(),z(),V(),_e()};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{}),s.jsxs("main",{className:"flex-1 overflow-auto p-6",children:[s.jsxs("div",{className:"mb-6 flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold mb-2 text-neutral-900 dark:text-white",children:"Stripe Products & Prices Manager"}
706),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:"Manage Stripe products, prices, and plan mappings"})]}),s.jsxs(D,{onClick:B,variant:"outline",className:"flex items-center gap-2",children:[s.jsx(Bg,{className:"h-4 w-4"}),"Refresh Data"]})]}),_?s.jsx("div",{className:"mt-2 text-sm text-neutral-500",children:"Checking Stripe configuration..."}):I?s.jsxs("div",{className:"mt-2 text-sm text-red-600 flex items-center",children:[s.jsx(sn,{className:"h-4 w-4 mr-1"}),"Error loading Stripe configuration: ",I instanceof Error?I.message:"Unknown error"]}):P!=null&&P.enabled?s.jsxs("div",{className:"mt-2 text-sm text-green-600 flex items-center mb-6",children:[s.jsx(Zd,{className:"h-4 w-4 mr-1"}),"Stripe integration active - ",P.products||0," product(s) and ",((me=P.prices)==null?void 0:me.length)||0," price(s) available"]}):s.jsxs("div",{className:"mt-2 text-sm text-red-600 flex items-center mb-6",children:[s.jsx(sn,{className:"h-4 w-4 mr-1"}),(P==null?void 0:P.message)||"Stripe integration is not configured",s.jsx(D,{variant:"outline",size:"sm",className:"ml-2",onClick:()=>F(),children:"Retry"})]}),s.jsxs(Br,{defaultValue:"plan-mappings",value:r,onValueChange:n,children:[s.jsxs(Hr,{className:"grid grid-cols-3 w-[400px] mb-6",children:[s.jsx(We,{value:"plan-mappings",children:"Plan Mappings"}),s.jsx(We,{value:"products",children:"Products"}),s.jsx(We,{value:"prices",children:"Prices"})]}),s.jsx(Ve,{value:"plan-mappings",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Subscription Plan Mappings"}),s.jsx(ye,{children:"Map subscription plans to Stripe prices"})]}),s.jsx(te,{children:oe?s.jsx("div",{children:"Loading plan mappings..."}):s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"Plan"}),s.jsx(Ee,{children:"Price ID"}),s.jsx(Ee,{children:"Product"}),s.jsx(Ee,{children:"Amount"}),s.jsx(Ee,{children:"Actions"})]})}),s.jsx(ms,{children:(P==null?void 0:P.prices)&&Object.entries(P.prices).map(([ne,Be])=>{const lt=de(Be);return s.jsxs(Nt,{children:[s.jsx(we,{className:"font-medium",children:ne}),s.jsx(we,{children:Be}),s.jsx(we,{children:lt?lt.productName:"Unknown"}),s.jsx(we,{children:lt?Ce(lt.amount,lt.currency):"Unknown"}),s.jsx(we,{children:s.jsx(D,{variant:"outline",size:"sm",onClick:()=>{k(ne),C(Be),N(!0)},children:"Change"})})]},ne)})})]})}),s.jsx(ta,{className:"flex justify-between",children:s.jsx("div",{children:s.jsx(D,{onClick:()=>N(!0),children:"Update Plan Mapping"})})})]})}),s.jsx(Ve,{value:"products",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Stripe Products"}
706),s.jsx(ye,{children:"Manage your Stripe products"})]}),s.jsx(te,{children:W?s.jsx("div",{children:"Loading products..."}):s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"ID"}),s.jsx(Ee,{children:"Name"}),s.jsx(Ee,{children:"Status"}),s.jsx(Ee,{children:"Description"})]})}),s.jsx(ms,{children:H&&H.map(ne=>s.jsxs(Nt,{children:[s.jsx(we,{className:"font-mono text-xs",children:ne.id}),s.jsx(we,{className:"font-medium",children:ne.name}),s.jsx(we,{children:ne.active?s.jsx(pe,{variant:"outline",className:"bg-green-100 text-green-800 hover:bg-green-100",children:"Active"}):s.jsx(pe,{variant:"outline",className:"bg-red-100 text-red-800 hover:bg-red-100",children:"Inactive"})}),s.jsx(we,{className:"max-w-md truncate",children:ne.description||"No description"})]},ne.id))})]})}),s.jsx(ta,{className:"flex justify-between",children:s.jsx("div",{children:s.jsx(D,{onClick:()=>j(!0),children:"Create New Product"})})})]})}),s.jsx(Ve,{value:"prices",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Stripe Prices"}
706),s.jsx(ye,{children:"Manage your Stripe prices"})]}),s.jsx(te,{children:q?s.jsx("div",{children:"Loading prices..."}):s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"ID"}),s.jsx(Ee,{children:"Product"}),s.jsx(Ee,{children:"Amount"}),s.jsx(Ee,{children:"Interval"}),s.jsx(Ee,{children:"Status"})]})}),s.jsx(ms,{children:R&&R.map(ne=>s.jsxs(Nt,{children:[s.jsx(we,{className:"font-mono text-xs",children:ne.id}),s.jsx(we,{children:ne.productName}),s.jsx(we,{children:Ce(ne.amount,ne.currency)}),s.jsx(we,{children:ne.interval||"One-time"}),s.jsx(we,{children:ne.active!==!1?s.jsx(pe,{variant:"outline",className:"bg-green-100 text-green-800 hover:bg-green-100",children:"Active"}):s.jsx(pe,{variant:"outline",className:"bg-red-100 text-red-800 hover:bg-red-100",children:"Inactive"})})]},ne.id))})]})}),s.jsx(ta,{className:"flex justify-between",children:s.jsx("div",{children:s.jsx(D,{onClick:()=>t(!0),children:"Create New Price"})})})]})})]}),s.jsx(Ot,{open:y,onOpenChange:j,children:s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Create New Product"}),s.jsx($t,{children:"Create a new product in your Stripe account."})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"product-name",children:"Product Name"}),s.jsx(ie,{id:"product-name",placeholder:"Enter product name",value:a,onChange:ne=>i(ne.target.value)})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"product-description",children:"Description (Optional)"}),s.jsx(ie,{id:"product-description",placeholder:"Enter product description",value:o,onChange:ne=>l(ne.target.value)})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>j(!1),children:"Cancel"}),s.jsx(D,{onClick:K,disabled:U.isPending,children:U.isPending?"Creating...":"Create Product"})]})]})}),s.jsx(Ot,{open:e,onOpenChange:t,children:s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Create New Price"}),s.jsx($t,{children:"Create a new price for a product in your Stripe account."})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Product"}),s.jsxs(Xe,{onValueChange:b,value:v,children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select a product"})}),s.jsx(Ze,{children:H&&H.filter(ne=>ne.active!==!1).map(ne=>s.jsx(Z,{value:ne.id,children:ne.name},ne.id))})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"price-amount",children:"Amount"}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("span",{className:"mr-2",children:"$"}),s.jsx(ie,{id:"price-amount",placeholder:"9.99",type:"number",min:"0.01",step:"0.01",value:u,onChange:ne=>f(ne.target.value)})]}),s.jsx("p",{className:"text-xs text-neutral-500",children:"Enter the amount in dollars (e.g. 9.99)"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Currency"}),s.jsxs(Xe,{onValueChange:m,value:h,children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select currency"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"usd",children:"USD - US Dollar"}),s.jsx(Z,{value:"eur",children:"EUR - Euro"}),s.jsx(Z,{value:"gbp",children:"GBP - British Pound"}),s.jsx(Z,{value:"cad",children:"CAD - Canadian Dollar"}),s.jsx(Z,{value:"aud",children:"AUD - Australian Dollar"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Billing Interval"}),s.jsxs(Xe,{onValueChange:x,value:g,children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select interval"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"month",children:"Monthly"}),s.jsx(Z,{value:"year",children:"Yearly"}),s.jsx(Z,{value:"week",children:"Weekly"}),s.jsx(Z,{value:"day",children:"Daily"})]})]})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsx(D,{onClick:je,disabled:M.isPending,children:M.isPending?"Creating...":"Create Price"})]})]})}),s.jsx(Ot,{open:w,onOpenChange:N,children:s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Update Plan Mapping"}),s.jsx($t,{children:"Map a subscription plan to a Stripe price."})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Plan"}),s.jsxs(Xe,{onValueChange:k,value:S,children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select a plan"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"individual",children:"Individual"}),s.jsx(Z,{value:"team",children:"Team"}),s.jsx(Z,{value:"team_member",children:"Team Member"}),s.jsx(Z,{value:"organization",children:"Organization"}),s.jsx(Z,{value:"organization_member",children:"Organization Member"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Price"}),s.jsxs(Xe,{onValueChange:C,value:T,children:[s.jsx(Qe,{children:s.jsx(Je,{placeholder:"Select a price"})}),s.jsx(Ze,{children:R&&R.map(ne=>s.jsxs(Z,{value:ne.id,children:[ne.productName," - ",Ce(ne.amount,ne.currency)]},ne.id))})]})]}),T&&R&&s.jsxs("div",{className:"mt-4 p-4 border rounded-md bg-neutral-50 dark:bg-slate-800",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Selected Price Details"}),R.filter(ne=>ne.id===T).map(ne=>s.jsxs("div",{className:"space-y-1 text-sm",children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Product:"})," ",ne.productName]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Amount:"})," ",Ce(ne.amount,ne.currency)]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Billing:"})," ",ne.interval?`Every ${ne.interval}`:"One-time"]})]},ne.id))]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>N(!1),children:"Cancel"}),s.jsx(D,{onClick:ae,disabled:G.isPending||!S||!T,children:G.isPending?"Upd
706ating...":"Update Mapping"})]})]})})]})]})]})};function jPe({isOpen:e,onClose:t,organizationId:r,onSuccess:n}){const{toast:a}=Qt(),[i,o]=p.useState([]),[l,c]=p.useState(""),[d,u]=p.useState(!1),[f,h]=p.useState(!0);p.useEffect(()=>{e&&m()},[e,r]);const m=async()=>{h(!0);try{const x=await fetch("/api/users");if(!x.ok)throw new Error("Failed to fetch users");const v=await x.json(),b=await fetch(`/api/organizations/${r}/users`);if(!b.ok)throw new Error("Failed to fetch organization members");const j=(await b.json()).map(N=>N.id),w=v.filter(N=>!j.includes(N.id));o(w)}catch(x){console.error("Error fetching available users:",x),a({title:"Error",description:"Failed to fetch available users",variant:"destructive"})}finally{h(!1)}},g=async()=>{if(!l){a({title:"Error",description:"Please select a user to add",variant:"destructive"});return}u(!0);try{if(!(await fetch(`/api/organizations/${r}/users`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:parseInt(l)})})).ok)throw new Error("Failed to add member to organization");a({title:"Success",description:"Member added to organization successfully"}),n(),t()}catch(x){console.error("Error adding member to organization:",x),a({title:"Error",description:"Failed to add member to organization",variant:"destructive"})}finally{u(!1)}};return s.jsx(Ot,{open:e,onOpenChange:x=>!x&&t(),children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Add Organization Member"}),s.jsx($t,{children:"Add a user to your organization. They will have access to organization resources."})]}),s.jsx("div",{className:"grid gap-4 py-4",children:s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"user",className:"text-right",children:"User"}),s.jsx("div",{className:"col-span-3",children:s.jsxs(Xe,{disabled:f||d,value:l,onValueChange:c,children:[s.jsx(Qe,{id:"user",children:s.jsx(Je,{placeholder:f?"Loading users...":"Select a user"})}),s.jsx(Ze,{children:i.length===0?s.jsx(Z,{value:"none",disabled:!0,children:"No available users"}):i.map(x=>s.jsxs(Z,{value:x.id.toString(),children:[x.displayName||x.username," (",x.email,")"]},x.id))})]})})]})}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:t,disabled:d,children:"Cancel"}),s.jsx(D,{onClick:g,disabled:!l||d||f,children:d?"Adding...":"Add to Organization"})]})]})})}function fk(){const[e,t]=Nn(),{user:r,organization:n,isCompanyAdmin:a}=gn(),{toast:i}=Qt(),[o,l]=p.useState([]),[c,d]=p.useState([]),[u,f]=p.useState(!0),[h,m]=p.useState(!1);p.useEffect(()=>{a||t("/")},[a,t]);const g=async()=>{f(!0);try{const y=await fetch(`/api/organizations/${n==null?void 0:n.id}/teams`);if(y.ok){const w=await y.json();l(w)}const j=await fetch(`/api/organizations/${n==null?void 0:n.id}/users`);if(j.ok){const w=await j.json();d(w)}}catch(y){console.error("Error fetching organization data:",y),i({title:"Error",description:"Failed to fetch organization data",variant:"destructive"})}finally{f(!1)}},x=()=>{m(!0)},v=async y=>{if(confirm("Are you sure you want to remove this member from the organization?"))try{if(!(await fetch(`/api/organizations/${n==null?void 0:n.id}/users/${y}`,{method:"DELETE"})).ok)throw new Error("Failed to remove organization member");i({title:"Success",description:"Member removed from organization successfully"}),g()}catch(j){console.error("Error removing organization member:",j),i({title:"Error",description:"Failed to remove organization member",variant:"destructive"})}},b=()=>{i({title:"Success",description:"New member added to the organization"}),g()};return p.useEffect(()=>{n!=null&&n.id&&g()},[n]),!a||!n?s.jsx("div",{children:"Redirecting..."}):s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{}),s.jsxs("main",{className:"flex-1 overflow-auto p-4 md:p-6 pb-20 md:pb-6",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("h1",{className:"text-3xl font-bold mb-2 text-neutral-900 dark:text-white",children:[n.name," Dashboard"]}
706),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:"Manage teams and members within your organization"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8",children:[s.jsxs(X,{children:[s.jsx(ue,{className:"pb-3",children:s.jsx(fe,{children:"Organization Summary"})}),s.jsx(te,{children:s.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("dt",{className:"text-sm font-medium text-neutral-500 dark:text-slate-400",children:"Teams"}),s.jsx("dd",{className:"text-2xl font-bold",children:o.length})]}),s.jsxs("div",{children:[s.jsx("dt",{className:"text-sm font-medium text-neutral-500 dark:text-slate-400",children:"Members"}),s.jsx("dd",{className:"text-2xl font-bold",children:c.length})]})]})})]}),s.jsxs(X,{children:[s.jsx(ue,{className:"pb-3",children:s.jsx(fe,{children:"Organization Details"})}),s.jsx(te,{children:s.jsxs("dl",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("dt",{className:"text-sm font-medium text-neutral-500 dark:text-slate-400",children:"Name"}),s.jsx("dd",{className:"text-sm",children:n.name})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("dt",{className:"text-sm font-medium text-neutral-500 dark:text-slate-400",children:"ID"}),s.jsx("dd",{className:"text-sm",children:n.id})]})]})})]})]}),s.jsxs("div",{className:"mb-8 space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"Teams"}),s.jsxs(D,{className:"flex items-center gap-2",children:[s.jsx(S0,{className:"h-4 w-4"}),s.jsx("span",{children:"Add Team"})]})]}),s.jsx(X,{children:s.jsx(te,{className:"p-0",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"ID"}),s.jsx(Ee,{children:"Name"}),s.jsx(Ee,{children:"Members"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}),s.jsx(ms,{children:u?s.jsx(Nt,{children:s.jsx(we,{colSpan:4,className:"text-center py-4",children:"Loading teams..."})}):o.length===0?s.jsx(Nt,{children:s.jsx(we,{colSpan:4,className:"text-center py-4",children:"No teams found. Create your first team!"})}):o.map(y=>s.jsxs(Nt,{children:[s.jsx(we,{children:y.id}),s.jsx(we,{children:y.name}),s.jsx(we,{children:"0"}),s.jsx(we,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(D,{variant:"outline",size:"icon",children:s.jsx(vl,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",className:"text-red-500",children:s.jsx(Pr,{className:"h-4 w-4"})})]})})]},y.id))})]})})})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"Members"}),s.jsxs(D,{className:"flex items-center gap-2",onClick:x,children:[s.jsx(bh,{className:"h-4 w-4"}),s.jsx("span",{children:"Add Member"})]})]}),s.jsx(X,{children:s.jsx(te,{className:"p-0",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"ID"}),s.jsx(Ee,{children:"Username"}),s.jsx(Ee,{children:"Email"}),s.jsx(Ee,{children:"Name"}),s.jsx(Ee,{children:"Role"}),s.jsx(Ee,{children:"Team"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}),s.jsx(ms,{children:u?s.jsx(Nt,{children:s.jsx(we,{colSpan:7,className:"text-center py-4",children:"Loading members..."})}):c.length===0?s.jsx(Nt,{children:s.jsx(we,{colSpan:7,className:"text-center py-4",children:"No members found. Add members to your organization!"})}):c.map(y=>s.jsxs(Nt,{children:[s.jsx(we,{children:y.id}),s.jsx(we,{children:y.username}),s.jsx(we,{children:y.email}),s.jsx(we,{children:y.displayName||"-"}),s.jsx(we,{children:y.role}),s.jsx(we,{children:y.teamId||"-"}),s.jsx(we,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(D,{variant:"outline",size:"icon",children:s.jsx(vl,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",className:"text-red-500",onClick:()=>v(y.id),children:s.jsx(Pr,{className:"h-4 w-4"})})]})})]},y.id))})]})})})]})]})]}),s.jsx(jPe,{isOpen:h,onClose:()=>m(!1),organizationId:n.id,onSuccess:b})]})}function wPe({isOpen:e,onClose:t,teamId:r,organizationId:n,onSuccess:a}){const{toast:i}
706=Qt(),[o,l]=p.useState([]),[c,d]=p.useState(""),[u,f]=p.useState(!1),[h,m]=p.useState(!0);p.useEffect(()=>{e&&g()},[e,r,n]);const g=async()=>{m(!0);try{const v=await fetch(`/api/organizations/${n}/users`);if(!v.ok)throw new Error("Failed to fetch organization members");const b=await v.json(),y=await fetch(`/api/teams/${r}/users`);if(!y.ok)throw new Error("Failed to fetch team members");const w=(await y.json()).map(S=>S.id),N=b.filter(S=>!w.includes(S.id));l(N)}catch(v){console.error("Error fetching available users:",v),i({title:"Error",description:"Failed to fetch available users",variant:"destructive"})}finally{m(!1)}},x=async()=>{if(!c){i({title:"Error",description:"Please select a user to add",variant:"destructive"});return}f(!0);try{if(!(await fetch(`/api/teams/${r}/users`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:parseInt(c)})})).ok)throw new Error("Failed to add member to team");i({title:"Success",description:"Member added to team successfully"}),a(),t()}catch(v){console.error("Error adding member to team:",v),i({title:"Error",description:"Failed to add member to team",variant:"destructive"})}finally{f(!1)}};return s.jsx(Ot,{open:e,onOpenChange:v=>!v&&t(),children:s.jsxs(kt,{className:"sm:max-w-[425px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Add Team Member"}),s.jsx($t,{children:"Add a user from your organization to this team. They will have access to team resources and calendars."})]}),s.jsx("div",{className:"grid gap-4 py-4",children:s.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[s.jsx(ee,{htmlFor:"user",className:"text-right",children:"User"}),s.jsx("div",{className:"col-span-3",children:s.jsxs(Xe,{disabled:h||u,value:c,onValueChange:d,children:[s.jsx(Qe,{id:"user",children:s.jsx(Je,{placeholder:h?"Loading users...":"Select a user"})}),s.jsx(Ze,{children:o.length===0?s.jsx(Z,{value:"none",disabled:!0,children:"No available users"}):o.map(v=>s.jsxs(Z,{value:v.id.toString(),children:[v.displayName||v.username," (",v.email,")"]},v.id))})]})})]})}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:t,disabled:u,children:"Cancel"}),s.jsx(D,{onClick:x,disabled:!c||u||h,children:u?"Adding...":"Add to Team"})]})]})})}function hk(){const[e,t]=Nn(),{user:r,team:n,organization:a,isTeamManager:i}=gn(),{toast:o}=Qt(),[l,c]=p.useState([]),[d,u]=p.useState([]),[f,h]=p.useState(!0),[m,g]=p.useState(!1);p.useEffect(()=>{console.log("Current location:",e)},[e]);const x=e.includes("/members");p.useEffect(()=>{i||t("/")},[i,t]);const v=async()=>{h(!0);try{const w=await fetch(`/api/teams/${n==null?void 0:n.id}/users`);if(w.ok){const S=await w.json();c(S)}const N=await fetch(`/api/teams/${n==null?void 0:n.id}/events`);if(N.ok){const S=await N.json();u(S)}}catch(w){console.error("Error fetching team data:",w),o({title:"Error",description:"Failed to fetch team data",variant:"destructive"})}finally{h(!1)}},b=()=>{g(!0)},y=async w=>{if(confirm("Are you sure you want to remove this member from the team?"))try{if(!(await fetch(`/api/teams/${n==null?void 0:n.id}/users/${w}`,{method:"DELETE"})).ok)throw new Error("Failed to remove team member");o({title:"Success",description:"Member removed from team successfully"}),v()}catch(N){console.error("Error removing team member:",N),o({title:"Error",description:"Failed to remove team member",variant:"destructive"})}},j=()=>{o({title:"Success",description:"New member added to the team"}),v()};return p.useEffect(()=>{n!=null&&n.id&&v()},[n]),!i||!n?s.jsx("div",{children:"Redirecting..."}):s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{}),s.jsxs("main",{className:"flex-1 overflow-auto p-4 md:p-6 pb-20 md:pb-6","data-tutorial":"team-management",children:[s.jsx("div",{className:"mb-8",children:x?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"animate-pulse",children:s.jsx("h1",{className:"text-3xl font-bold mb-2 text-white dark:text-black bg-purple-500 p-4 border-4 border-pink-400 rounded-lg shadow-lg",children:"TEAM MEMBERS MANAGEMENT"})}),s.jsx("p",{className:"text-purple-800 dark:text-purple-300 font-semibold mt-4",children:"Manage users in your team"})]}):s.jsxs(s.Fragment,{children:[s.jsx("h1",{className:"text-3xl font-bold mb-2 text-neutral-900 dark:text-white bg-yellow-200 p-2",children:"Team Dashboard"}
706),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:"Manage your team's members and schedule"})]})}),!x&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:[s.jsxs(X,{children:[s.jsx(ue,{className:"pb-3",children:s.jsx(fe,{children:"Team Info"})}),s.jsx(te,{children:s.jsxs("dl",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("dt",{className:"text-sm font-medium text-neutral-500 dark:text-slate-400",children:"Name"}),s.jsx("dd",{className:"text-sm",children:n.name})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("dt",{className:"text-sm font-medium text-neutral-500 dark:text-slate-400",children:"Organization"}),s.jsx("dd",{className:"text-sm",children:(a==null?void 0:a.name)||"-"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("dt",{className:"text-sm font-medium text-neutral-500 dark:text-slate-400",children:"ID"}),s.jsx("dd",{className:"text-sm",children:n.id})]})]})})]}),s.jsxs(X,{children:[s.jsx(ue,{className:"pb-3",children:s.jsx(fe,{children:"Members"})}),s.jsx(te,{children:s.jsxs("div",{className:"flex flex-col justify-between h-full",children:[s.jsx("div",{className:"text-3xl font-bold",children:l.length}),s.jsxs(D,{variant:"outline",className:"mt-4 w-full flex items-center justify-center gap-2",onClick:b,children:[s.jsx(bh,{className:"h-4 w-4"}),s.jsx("span",{children:"Manage Members"})]})]})})]}),s.jsxs(X,{children:[s.jsx(ue,{className:"pb-3",children:s.jsx(fe,{children:"Upcoming Events"})}),s.jsx(te,{children:s.jsxs("div",{className:"flex flex-col justify-between h-full",children:[s.jsx("div",{className:"text-3xl font-bold",children:d.length}),s.jsxs(D,{variant:"outline",className:"mt-4 w-full flex items-center justify-center gap-2",children:[s.jsx(Ei,{className:"h-4 w-4"}),s.jsx("span",{children:"Schedule Event"})]})]})})]})]}),s.jsxs("div",{className:"mb-8 space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"Team Members"}),s.jsxs(D,{className:"flex items-center gap-2",onClick:b,"data-tutorial":"invite-members",children:[s.jsx(bh,{className:"h-4 w-4"}),s.jsx("span",{children:"Add Member"})]})]}),s.jsx(X,{children:s.jsx(te,{className:"p-0",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"ID"}),s.jsx(Ee,{children:"Username"}),s.jsx(Ee,{children:"Email"}),s.jsx(Ee,{children:"Name"}),s.jsx(Ee,{children:"Role"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}),s.jsx(ms,{children:f?s.jsx(Nt,{children:s.jsx(we,{colSpan:6,className:"text-center py-4",children:"Loading team members..."})}):l.length===0?s.jsx(Nt,{children:s.jsx(we,{colSpan:6,className:"text-center py-4",children:"No members found. Add members to your team!"})}):l.map(w=>s.jsxs(Nt,{children:[s.jsx(we,{children:w.id}),s.jsx(we,{children:w.username}),s.jsx(we,{children:w.email}),s.jsx(we,{children:w.displayName||"-"}),s.jsx(we,{children:w.role}),s.jsx(we,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(D,{variant:"outline",size:"icon",children:s.jsx(vl,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",className:"text-red-500",onClick:()=>y(w.id),children:s.jsx(Pr,{className:"h-4 w-4"})})]})})]},w.id))})]})})})]}),!x&&s.jsxs("div",{className:"space-y-4","data-tutorial":"team-calendar",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-white",children:"Team Schedule"}),s.jsxs(D,{className:"flex items-center gap-2",children:[s.jsx(S0,{className:"h-4 w-4"}),s.jsx("span",{children:"Create Event"})]})]}),s.jsx(X,{children:s.jsx(te,{className:"p-0",children:s.jsxs(fs,{children:[s.jsx(hs,{children:s.jsxs(Nt,{children:[s.jsx(Ee,{children:"ID"}),s.jsx(Ee,{children:"Title"}),s.jsx(Ee,{children:"Start Time"}),s.jsx(Ee,{children:"End Time"}),s.jsx(Ee,{children:"Attendees"}),s.jsx(Ee,{className:"text-right",children:"Actions"})]})}
706),s.jsx(ms,{children:f?s.jsx(Nt,{children:s.jsx(we,{colSpan:6,className:"text-center py-4",children:"Loading team events..."})}):d.length===0?s.jsx(Nt,{children:s.jsx(we,{colSpan:6,className:"text-center py-4",children:"No events found. Schedule your first team event!"})}):d.map(w=>s.jsxs(Nt,{children:[s.jsx(we,{children:w.id}),s.jsx(we,{children:w.title}),s.jsx(we,{children:new Date(w.startTime).toLocaleString()}),s.jsx(we,{children:new Date(w.endTime).toLocaleString()}),s.jsx(we,{children:"-"}),s.jsx(we,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(D,{variant:"outline",size:"icon",children:s.jsx(vl,{className:"h-4 w-4"})}),s.jsx(D,{variant:"outline",size:"icon",className:"text-red-500",children:s.jsx(Pr,{className:"h-4 w-4"})})]})})]},w.id))})]})})})]})]})]}),n&&a&&s.jsx(wPe,{isOpen:m,onClose:()=>g(!1),teamId:n.id,organizationId:a.id,onSuccess:j})]})}function NPe(){return ut({queryKey:["/api/integrations"],staleTime:1e3*60*5})}async function cX(e,t){const r=t?`/api/integrations/${e}/auth?name=${encodeURIComponent(t)}`:`/api/integrations/${e}/auth`,n=await fetch(r,{credentials:"include"}),a=await n.json().catch(()=>({}));if(!n.ok)throw new Error((a==null?void 0:a.error)||(a==null?void 0:a.message)||`Could not start the ${e} connection (HTTP ${n.status}).`);if(!(a!=null&&a.authUrl))throw new Error(`The server did not return an authorization URL for ${e}. Check that the ${e==="google"?"GOOGLE":"OUTLOOK"}_CLIENT_ID and ${e==="google"?"GOOGLE":"OUTLOOK"}_CLIENT_SECRET environment variables are set.`);return a}function SPe(e){return ut({queryKey:["/api/integrations/google/auth",e],queryFn:async({queryKey:t})=>{const[r,n]=t;return cX("google",n)},enabled:!1,retry:!1})}function kPe(e){return ut({queryKey:["/api/integrations/outlook/auth",e],queryFn:async({queryKey:t})=>{const[r,n]=t;return cX("outlook",n)},enabled:!1,retry:!1})}function CPe(){const{toast:e}=Qt(),t=ld();return dt({mutationFn:async r=>(await Ue("POST","/api/integrations/ical/connect",{calendarUrl:r.calendarUrl,name:r.name||"iCalendar"})).json(),onSuccess:()=>{e({title:"Success!",description:"Successfully connected to iCalendar"}),t.invalidateQueries({queryKey:["/api/integrations"]})},onError:r=>{e({title:"Error connecting to iCalendar",description:r.message,variant:"destructive"})}})}function TPe(){const{toast:e}=Qt(),t=ld();return dt({mutationFn:async r=>(await Ue("POST","/api/integrations/icloud/connect",{appleId:r.appleId,appSpecificPassword:r.appSpecificPassword,name:r.name||"iCloud Calendar"})).json(),onSuccess:()=>{e({title:"Success!",description:"Successfully connected to iCloud Calendar. Your events will begin syncing shortly."}),t.invalidateQueries({queryKey:["/api/integrations"]})},onError:r=>{e({title:"iCloud Connection Failed",description:r.message||"Failed to connect to iCloud Calendar. Please check your Apple ID and app-specific password, and ensure Two-Factor Authentication is enabled.",variant:"destructive"})}})}function _Pe(e){if(!e)return{valid:!1,message:"App-specific password is required."};const t=e.replace(/[-\s]/g,"");return t.length!==16?{valid:!1,message:"App-specific password should be 16 characters (format: xxxx-xxxx-xxxx-xxxx)."}:/^[a-z]+$/.test(t)?{valid:!0}:{valid:!1,message:"App-specific password should contain only lowercase letters. Make sure you are not using your regular Apple ID password."}}function PPe({calendarType:e,open:t,onOpenChange:r}){const{toast:n}=Qt(),[a,i]=p.useState(""),[o,l]=p.useState(""),[c,d]=p.useState(""),[u,f]=p.useState(""),[h,m]=p.useState(!1),[g,x]=p.useState(null),v=SPe(a||void 0),b=kPe(a||void 0),y=CPe(),j=TPe(),w=async()=>{var k;x(null);try{if(e==="google"||e==="outlook"){const T=e==="google"?await v.refetch():await b.refetch();if((k=T.data)!=null&&k.authUrl){window.location.href=T.data.authUrl;return}const C=e==="google"?"Google Calendar":"Outlook Calendar";throw new Error(T.error instanceof Error?T.error.message:`Could not start the ${C} connection. Please try again or contact support.`)}else if(e==="ical"){if(!o){n({title:"URL Required",description:"Please enter an iCalendar URL",variant:"destructive"});return}await y.mutateAsync({calendarUrl:o,name:a||"iCalendar"}),r(!1)}else if(e==="icloud"){if(!c||!u){n({title:"Credentials Required",description:"Please enter your Apple ID and app-specific password",variant:"destructive"});return}const T=_Pe(u);if(!T.valid){x(T.message||"Invalid password format."),n({title:"Invalid Password Format",description:T.message,variant:"destructive"});return}await j.mutateAsync({appleId:c,appSpecificPassword:u,name:a||"iCloud Calendar"}),x(null),r(!1)}}catch(T){const C=T instanceof Error?T.message:"Failed to connect to calendar";e==="icloud"&&(C.includes("401")||C.toLowerCase().includes("unauthorized")||C.toLowerCase().includes("invalid credentials")?x("Authentication failed. Please verify: (1) Your Apple ID email is correct, (2) You are using an app-specific password (not your regular password), and (3) Two-Factor Authentication is enabled on your Ap
706ple ID."):C.includes("403")||C.toLowerCase().includes("forbidden")?x("Access denied. If you have Advanced Data Protection enabled on your Apple ID, CalDAV access may be restricted. Try disabling it temporarily or contact Apple Support."):C.toLowerCase().includes("homeurl")||C.toLowerCase().includes("home url")||C.toLowerCase().includes("cannot find")?x("Could not connect to iCloud CalDAV service. This may be a temporary Apple server issue. Please try again in a few minutes."):C.toLowerCase().includes("no calendars found")?x("No calendars were found in your iCloud account. Please make sure you have at least one calendar in your iCloud account at icloud.com/calendar."):C.toLowerCase().includes("timeout")||C.toLowerCase().includes("network")||C.toLowerCase().includes("econnrefused")?x("Could not reach the iCloud server. Please check your internet connection and try again."):x(C)),n({title:"Connection Error",description:C,variant:"destructive"})}},N=()=>{switch(e){case"google":return"Connect Google Calendar";case"outlook":return"Connect Outlook Calendar";case"ical":return"Connect iCalendar";case"icloud":return"Connect iCloud Calendar";default:return"Connect Calendar"}},S=()=>{switch(e){case"google":return"Connect your Google Calendar to sync events with SmartScheduler.";case"outlook":return"Connect your Outlook Calendar to sync events with SmartScheduler.";case"ical":return"Enter an iCalendar URL to import events. Note: iCalendar connections are read-only.";case"icloud":return"Connect your iCloud Calendar using your Apple ID and an app-specific password. Two-Factor Authentication must be enabled on your Apple ID.";default:return"Connect your calendar to sync events with SmartScheduler."}};return s.jsx(Ot,{open:t,onOpenChange:k=>{k||(x(null),m(!1)),r(k)},children:s.jsxs(kt,{className:"sm:max-w-[480px] max-h-[85vh] overflow-y-auto",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:N()}),s.jsx($t,{children:S()})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"calendarName",children:"Calendar Name (Optional)"}),s.jsx(ie,{id:"calendarName",placeholder:"Work, Personal, etc.",value:a,onChange:k=>i(k.target.value)}),s.jsx("p",{className:"text-sm text-neutral-500",children:"A name to help you identify this calendar"})]}),e==="ical"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"iCalUrl",children:"iCalendar URL"}),s.jsx(ie,{id:"iCalUrl",placeholder:"https://...",value:o,onChange:k=>l(k.target.value)}),s.jsx("p",{className:"text-sm text-neutral-500",children:"Enter the URL of your iCalendar feed"})]}),e==="icloud"&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-md bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(IE,{className:"h-4 w-4 text-blue-600 dark:text-blue-400 mt-0.5 shrink-0"}),s.jsxs("div",{className:"text-sm text-blue-800 dark:text-blue-300",children:[s.jsx("p",{className:"font-medium mb-1",children:"Before you begin:"}),s.jsxs("ul",{className:"list-disc list-inside space-y-0.5 text-xs",children:[s.jsx("li",{children:"Two-Factor Authentication (2FA) must be enabled on your Apple ID"}),s.jsx("li",{children:"You need an app-specific password (not your regular password)"}),s.jsx("li",{children:"Advanced Data Protection must be disabled for CalDAV access"})]})]})]})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"appleId",children:"Apple ID Email"}),s.jsx(ie,{id:"appleId",type:"email",placeholder:"[email protected]",value:c,onChange:k=>{d(k.target.value),x(null)}}),s.jsx("p",{className:"text-sm text-neutral-500",children:"The email address associated with your Apple ID"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"appSpecificPassword",children:"App-Specific Password"}),s.jsx(ie,{id:"appSpecificPassword",type:"password",placeholder:"xxxx-xxxx-xxxx-xxxx",value:u,onChange:k=>{f(k.target.value),x(null)}}),s.jsx("p",{className:"text-xs text-neutral-500",children:"Format: 16 lowercase letters separated by dashes (e.g., abcd-efgh-ijkl-mnop)"})]}),s.jsxs("div",{className:"border rounded-md dark:border-slate-700",children:[s.jsxs("button",{type:"button",className:"flex items-center justify-between w-full px-3 py-2 text-sm font-medium text-left text-neutral-700 dark:text-neutral-300 hover:bg-neutral-50 dark:hover:bg-slate-800 rounded-md",onClick:()=>m(!h),children:[s.jsx("span",{children:"How to generate an app-specific password"}),h?s.jsx(vh,{className:"h-4 w-4"}):s.jsx(Dl,{className:"h-4 w-4"})]}),h&&s.jsxs("div",{className:"px-3 pb-3 text-xs text-neutral-600 dar
706k:text-neutral-400 space-y-2",children:[s.jsxs("ol",{className:"list-decimal list-inside space-y-1.5",children:[s.jsxs("li",{children:["Go to ",s.jsx("a",{href:"https://appleid.apple.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"appleid.apple.com"})," and sign in"]}),s.jsxs("li",{children:["Enable ",s.jsx("strong",{children:"Two-Factor Authentication"})," if not already enabled (under Sign-In and Security)"]}),s.jsxs("li",{children:["Navigate to ",s.jsx("strong",{children:"Sign-In and Security"})," â ",s.jsx("strong",{children:"App-Specific Passwords"})]}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Generate an app-specific password"})]}),s.jsxs("li",{children:['Enter a label (e.g., "SmartScheduler") and click ',s.jsx("strong",{children:"Create"})]}),s.jsx("li",{children:"Copy the generated password and paste it above"})]}),s.jsx("p",{className:"text-neutral-500 dark:text-neutral-500 mt-2 italic",children:"Note: Do not use your regular Apple ID password. App-specific passwords are separate and are required for third-party app access."})]})]}),g&&s.jsx("div",{className:"rounded-md bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800 p-3",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(sn,{className:"h-4 w-4 text-red-600 dark:text-red-400 mt-0.5 shrink-0"}),s.jsx("p",{className:"text-sm text-red-800 dark:text-red-300",children:g})]})})]})]}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(D,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),s.jsx(D,{onClick:w,disabled:e==="ical"&&!o||e==="icloud"&&(!c||!u)||v.isFetching||b.isFetching||y.isPending||j.isPending,children:v.isFetching||b.isFetching||y.isPending||j.isPending?"Connecting...":"Connect"})]})]})})}
706function EPe(){gn();const{toast:e}=Qt(),{data:t,isLoading:r}=NPe(),[n,a]=p.useState("calendars"),[i,o]=p.useState(null),[l,c]=p.useState(!1),[d,u]=p.useState(!1),[f,h]=p.useState(!1),[m,g]=p.useState(!1),[x,v]=p.useState(!1),[b,y]=p.useState(""),[j,w]=p.useState(""),[N,S]=p.useState(!0),[k,T]=p.useState(!0),[C,E]=p.useState(!0),[P,_]=p.useState(!1),[I,F]=p.useState(!1),[H,W]=p.useState(null),[z,R]=p.useState(!1),[q,V]=p.useState(""),[se,oe]=p.useState(""),[_e,U]=p.useState(""),[M,G]=p.useState(""),[K,je]=p.useState(""),[ae,de]=p.useState(""),[Ce,B]=p.useState(!1),[me,ne]=p.useState(!1),Be=async()=>{try{ne(!0);const L=await fetch("/api/integrations/zoom/auth");if(!L.ok){const Me=await L.json();throw new Error(Me.message||"Failed to start Zoom connection")}const{authUrl:he}=await L.json();window.location.href=he}catch(L){console.error("Error connecting to Zoom:",L),e({title:"Error",description:L instanceof Error?L.message:"Failed to connect to Zoom",variant:"destructive"}),ne(!1)}};p.useEffect(()=>{const L=new URLSearchParams(window.location.search),he=L.get("success"),Me=L.get("error"),Ne=L.get("reason"),Re={zoom:{label:"Zoom",tab:"video"},google:{label:"Google Calendar",tab:"calendars"},outlook:{label:"Outlook Calendar",tab:"calendars"}},or=he!=null&&he.endsWith("_connected")?he.replace("_connected",""):void 0,Jr=Me!=null&&Me.endsWith("_auth_failed")?Me.replace("_auth_failed",""):void 0,be=or||Jr;if(!be||!Re[be])return;const{label:it,tab:vt}=Re[be];a(vt),e(or?{title:`${it} Connected`,description:`Your ${it} account has been connected successfully.`}:{title:`${it} Connection Failed`,description:Ne?decodeURIComponent(Ne):`Failed to connect to ${it}. Please try again.`,variant:"destructive"}),Wt.invalidateQueries({queryKey:["/api/integrations"]}),window.history.replaceState({},"","/integrations")},[]),p.useEffect(()=>{async function L(){try{const he=await fetch("/api/slack",{credentials:"include"});if(he.ok){const Me=await he.json();Me&&(F(!0),W(Me.id),w(Me.channelName||""),S(Me.notifyOnBooking??!0),T(Me.notifyOnCancellation??!0),E(Me.notifyOnReschedule??!0),_(Me.notifyOnNoShow??!1))}}catch{}}L()},[]);const lt=async()=>{if(!b.startsWith("https://hooks.slack.com/")){e({title:"Invalid URL",description:"Please enter a valid Slack webhook URL",variant:"destructive"});return}R(!0);try{const L=await fetch("/api/slack",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({webhookUrl:b,channelName:j,notifyOnBooking:N,notifyOnCancellation:k,notifyOnReschedule:C,notifyOnNoShow:P})});if(!L.ok)throw new Error("Failed to save Slack integration");const he=await L.json();F(!0),W(he.id),e({title:"Slack Connected",description:"Slack notifications are now enabled."}),u(!1)}catch(L){e({title:"Error",description:L.message,variant:"destructive"})}finally{R(!1)}},ct=async()=>{if(H)try{await fetch(`/api/slack/${H}`,{method:"DELETE",credentials:"include"}),F(!1),W(null),y(""),e({title:"Disconnected",description:"Slack integration has been removed."})}catch{e({title:"Error",description:"Failed to disconnect Slack",variant:"destructive"})}},Y=async()=>{try{(await fetch("/api/slack/test",{method:"POST",credentials:"include"})).ok?e({title:"Test Sent",description:"Check your Slack channel for the test notification."}):e({title:"Test Failed",description:"Could not send test notification.",variant:"destructive"})}catch{e({title:"Error",description:"Failed to send test notification",variant:"destructive"})}},J=()=>{e({title:"Integration Demo",description:"This would connect to Salesforce in a real implementation"}),h(!1)},le=()=>{e({title:"Integration Demo",description:"This would connect to Stripe in a real implementation"}),g(!1)},Le=async()=>{try{B(!0);const he=await fetch("/api/integrations/zapier/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:K||"My Zapier Integration"})});if(he.ok){const Me=await he.json();de(Me.apiKey),e({title:"Success",description:"Successfully connected to Zapier"})}else e({title:"Error",description:"Failed to connect to Zapier",variant:"destructive"})}catch(L){console.error("Error connecting to Zapier:",L),e({title:"Error",description:"Failed to connect to Zapier: "+L.message,variant:"destructive"})}finally{B(!1)}};return s.jsxs("div",{className:"flex min-h-screen bg-neutral-50 dark:bg-slate-950",children:[s.jsx(Or,{className:"hidden md:block"}),s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsx(tr,{}),s.jsx("div",{className:"md:hidden",children:s.jsx(Ds,{onCreateEventClick:()=>{}})}),s.jsxs("main",{className:"flex-1 container mx-auto px-4 py-8 pb-20 md:pb-8",children:[s.jsx("div",{className:"flex items-center justify-between mb-6",children:s.jsx("h1",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:"Integrations"})}),s.jsx("div",{className:"mb-8",children:s.jsxs(Br,{defaultValue:"calendars",onValueChange:a,value:n,children:[s.jsxs(Hr,{className:"grid grid-cols-4 mb-6",children:[s.jsx(We,{value:"calendars",children:"Calendar"}),s.jsx(We,{value:"video",children:"Video Conferencing"}),s.jsx(We,{value:"messaging",children:"Messaging"}),s.jsx(We,{value:"crm",children:"CRM & Payments"})]}),s.jsx(Ve,{value:"calendars",className:"space-y-4","data-tutorial":"calendar-integration",children:s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-red-100 flex items-center justify-center",children:s.jsx("span",{className:"text-red-600 font-bold",children:"G"})}),"Google Calendar"]}),s.jsx(ye,{children:"Sync your events with Google Calendar"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:Array.isArray(t)&&t.some(L=>L.type==="google"&&L.isConnected)?s.jsxs("div",{className:"flex items-center",children:[s.jsx(un,{className:"mr-2 h-5 w-5 text-green-500"}),s.jsx("span",{children:"Connected"})]}):s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{onClick:()=>o("google"),variant:Array.isArray(t)&&t.some(L=>L.type==="google"&&L.isConnected)?"outline":"default",children:Array.isArray(t)&&t.some(L=>L.type==="google"&&L.isConnected)?"Manage":"Connect"})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center",children:s.jsx("span",{className:"text-blue-600 font-bold",children:"O"})}),"Outlook Calendar"]}),s.jsx(ye,{children:"Sync your events with Outlook Calendar"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:Array.isArray(t)&&t.some(L=>L.type==="outlook"&&L.isConnected)?s.jsxs("div",{className:"flex items-center",children:[s.jsx(un,{className:"mr-2 h-5 w-5 text-green-500"}),s.jsx("span",{children:"Connected"})]}):s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{onClick:()=>o("outlook"),variant:Array.isArray(t)&&t.some(L=>L.type==="outlook"&&L.isConnected)?"outline":"default",children:Array.isArray(t)&&t.some(L=>L.type==="outlook"&&L.isConnected)?"Manage":"Connect"})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center",children:s.jsx("span",{className:"text-blue-600 font-bold",children:"iC"})}),"iCloud Calendar"]}),s.jsx(ye,{children:"Sync your events with iCloud Calendar"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:Array.isArray(t)&&t.some(L=>L.type==="icloud"&&L.isConnected)?s.jsxs("div",{className:"flex items-center",children:[s.jsx(un,{className:"mr-2 h-5 w-5 text-green-500"}),s.jsx("span",{children:"Connected"})]}):s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{onClick:()=>o("icloud"),variant:Array.isArray(t)&&t.some(L=>L.type==="icloud"&&L.isConnected)?"outline":"default",children:Array.isArray(t)&&t.some(L=>L.type==="icloud"&&L.isConnected)?"Manage":"Connect"})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-purple-100 flex items-center justify-center",children:s.jsx("span",{className:"text-purple-600 font-bold",children:"iC"})}),"iCalendar"]}),s.jsx(ye,{children:"Import events from any iCal feed"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:Array.isArray(t)&&t.some(L=>L.type==="ical"&&L.isConnected)?s.jsxs("div",{className:"flex items-center",children:[s.jsx(un,{className:"mr-2 h-5 w-5 text-green-500"}),s.jsx("span",{children:"Connected"})]}):s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{onClick:()=>o("ical"),variant:Array.isArray(t)&&t.some(L=>L.type==="ical"&&L.isConnected)?"outline":"default",children:Array.isArray(t)&&t.some(L=>L.type==="ical"&&L.isConnected)?"Manage":"Connect"})]})})]})]})}),s.jsx(Ve,{value:"video",className:"space-y-4",children:s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center",children:s.jsx(ma,{className:"h-4 w-4 text-blue-600"})}),"Zoom"]}),s.jsx(ye,{children:"Automatically create Zoom meetings for bookings"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:Array.isArray(t)&&t.some(L=>L.type==="zoom"&&L.isConnected)?s.jsxs("div",{className:"flex items-center",children:[s.jsx(un,{className:"mr-2 h-5 w-5 text-green-500"}),s.jsx("span",{children:"Connected"})]}):s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{onClick:()=>{Array.isArray(t)&&t.find(he=>he.type==="zoom"&&he.isConnected)?e({title:"Manage Zoom",description:"This would allow you to manage your Zoom integration"}):c(!0)},variant:Array.isArray(t)&&t.some(L=>L.type==="zoom"&&L.isConnected)?"outline":"default",children:Array.isArray(t)&&t.some(L=>L.type==="zoom"&&L.isConnected)?"Manage":"Connect"})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-green-100 flex items-center justify-center",children:s.jsx(ma,{className:"h-4 w-4 text-green-600"})}),"Google Meet"]}),s.jsx(ye,{children:"Automatically create Google Meet links for bookings"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{disabled:!0,children:"Coming Soon"})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-purple-100 flex items-center justify-center",children:s.jsx(ma,{className:"h-4 w-4 text-purple-600"})}),"Microsoft Teams"]}),s.jsx(ye,{children:"Automatically create Teams meetings for bookings"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{disabled:!0,children:"Coming Soon"})]})})]})]})}),s.jsx(Ve,{value:"messaging",className:"space-y-4",children:s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-emerald-100 flex items-center justify-center",children:s.jsx(yS,{className:"h-4 w-4 text-emerald-600"})}),"Slack"]}),s.jsx(ye,{children:"Get notifications for new bookings in Slack"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:s.jsx("div",{className:"flex items-center",children:I?s.jsxs(s.Fragment,{children:[s.jsx(un,{className:"mr-2 h-5 w-5 text-green-500"}),s.jsx("span",{children:"Connected"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})})}),s.jsxs("div",{className:"flex gap-2",children:[I&&s.jsxs(s.Fragment,{children:[s.jsx(D,{variant:"outline",size:"sm",onClick:Y,children:"Test"}),s.jsx(D,{variant:"destructive",size:"sm",onClick:ct,children:"Disconnect"})]}),s.jsx(D,{onClick:()=>u(!0),children:I?"Settings":"Connect"})]})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center",children:s.jsx(yS,{className:"h-4 w-4 text-blue-600"})}),"MS Teams Notifications"]}),s.jsx(ye,{children:"Get notifications for new bookings in Teams"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{disabled:!0,children:"Coming Soon"})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-indigo-100 flex items-center justify-center",children:s.jsx(yS,{className:"h-4 w-4 text-indigo-600"})}),"Discord"]}),s.jsx(ye,{children:"Get notifications for new bookings in Discord"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{disabled:!0,children:"Coming Soon"})]})})]})]})}),s.jsx(Ve,{value:"crm",className:"space-y-4",children:s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center",children:s.jsx(k0,{className:"h-4 w-4 text-blue-600"})}),"Salesforce"]}),s.jsx(ye,{children:"Sync contacts and create leads from bookings"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{onClick:()=>h(!0),children:"Connect"})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-orange-100 flex items-center justify-center",children:s.jsx(k0,{className:"h-4 w-4 text-orange-600"})}),"HubSpot"]}
706),s.jsx(ye,{children:"Sync contacts and bookings with HubSpot CRM"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{disabled:!0,children:"Coming Soon"})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-orange-100 flex items-center justify-center",children:s.jsx(wh,{className:"h-4 w-4 text-orange-600"})}),"Zapier"]}),s.jsx(ye,{children:"Connect your calendar with 5,000+ apps"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:Array.isArray(t)&&t.some(L=>L.type==="zapier"&&L.isConnected)?s.jsxs("div",{className:"flex items-center",children:[s.jsx(un,{className:"mr-2 h-5 w-5 text-green-500"}),s.jsx("span",{children:"Connected"})]}):s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{onClick:()=>v(!0),variant:Array.isArray(t)&&t.some(L=>L.type==="zapier"&&L.isConnected)?"outline":"default",children:Array.isArray(t)&&t.some(L=>L.type==="zapier"&&L.isConnected)?"Manage":"Connect"})]})})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center",children:[s.jsx("div",{className:"mr-2 h-8 w-8 rounded-full bg-purple-100 flex items-center justify-center",children:s.jsx(xW,{className:"h-4 w-4 text-purple-600"})}),"Stripe"]}),s.jsx(ye,{children:"Accept payments for paid appointments"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx(Vn,{className:"mr-2 h-5 w-5 text-red-500"}),s.jsx("span",{children:"Not connected"})]})}),s.jsx(D,{onClick:()=>g(!0),children:"Connect"})]})})]})]})})]})}),s.jsxs("div",{className:"mt-8 mb-6",children:[s.jsx("h2",{className:"text-xl font-semibold mb-4 text-neutral-900 dark:text-white",children:"Integration Settings"}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Default Behavior"}),s.jsx(ye,{children:"Configure how integrations work by default"})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Auto-create video meetings"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400",children:"Automatically create a video meeting link for each new booking"})]}),s.jsx(gr,{})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Send notifications"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400",children:"Send notifications to connected messaging platforms"})]}),s.jsx(gr,{defaultChecked:!0})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5",children:[s.jsx(ee,{children:"Two-way sync"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400",children:"Changes made in external calendars will sync back"})]}),s.jsx(gr,{defaultChecked:!0})]})]})]})]})]})]}),i&&s.jsx(PPe,{calendarType:i,open:!!i,onOpenChange:L=>{L||o(null)}}),s.jsx(Ot,{open:l,onOpenChange:L=>{me||c(L)},children:s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Connect Zoom"}),s.jsx($t,{children:"Sign in with your Zoom account to enable automatic meeting creation for your bookings."})]}),s.jsx("div",{className:"grid gap-4 py-4",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:"You'll be redirected to Zoom to sign in and authorize SmartScheduler to create meetings on your behalf."})}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>c(!1),disabled:me,children:"Cancel"}),s.jsx(D,{onClick:Be,disabled:me,children:me?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border-2 border-slate-200 border-t-slate-800"}),"Connecting..."]}):s.jsxs(s.Fragment,{children:[s.jsx(ma,{className:"mr-2 h-4 w-4"}),"Sign in with Zoom"]})})]})]})}),s.jsx(Ot,{open:d,onOpenChange:u,children:s.jsxs(kt,{className:"max-w-md",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:I?"Slack Settings":"Connect Slack"}),s.jsx($t,{children:"Configure your Slack webhook to receive booking notifications."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(ee,{htmlFor:"slack-webhook",children:"Webhook URL *"}),s.jsx(ie,{id:"slack-webhook",placeholder:"https://hooks.slack.com/services/...",value:b,onChange:L=>y(L.target.value)}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Create an Incoming Webhook in your Slack workspace settings"})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(ee,{htmlFor:"slack-channel",children:"Channel Name (optional)"}),s.jsx(ie,{id:"slack-channel",placeholder:"#bookings",value:j,onChange:L=>w(L.target.value)})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(ee,{children:"Notification Preferences"}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"New bookings"}),s.jsx(gr,{checked:N,onCheckedChange:S})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"Cancellations"}),s.jsx(gr,{checked:k,onCheckedChange:T})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"Reschedules"}),s.jsx(gr,{checked:C,onCheckedChange:E})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"No-shows"}),s.jsx(gr,{checked:P,onCheckedChange:_})]})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>u(!1),children:"Cancel"}
706),s.jsx(D,{onClick:lt,disabled:z||!b,children:z?"Saving...":I?"Save Settings":"Connect"})]})]})}),s.jsx(Ot,{open:f,onOpenChange:h,children:s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Connect Salesforce"}),s.jsx($t,{children:"Enter your Salesforce API credentials to sync contacts."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(ee,{htmlFor:"salesforce-client-id",children:"Client ID"}),s.jsx(ie,{id:"salesforce-client-id",placeholder:"Enter your Salesforce Client ID",value:q,onChange:L=>V(L.target.value)})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(ee,{htmlFor:"salesforce-client-secret",children:"Client Secret"}),s.jsx(ie,{id:"salesforce-client-secret",type:"password",placeholder:"Enter your Salesforce Client Secret",value:se,onChange:L=>oe(L.target.value)})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>h(!1),children:"Cancel"}),s.jsx(D,{onClick:J,children:"Connect"})]})]})}),s.jsx(Ot,{open:x,onOpenChange:v,children:s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Connect Zapier"}),s.jsx($t,{children:"Connect your calendar with thousands of apps through Zapier."})]}),ae?s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"rounded-lg bg-slate-50 dark:bg-slate-900 p-4 border border-slate-200 dark:border-slate-800",children:[s.jsx("h3",{className:"font-medium mb-2 text-slate-900 dark:text-slate-100",children:"Your Zapier API Key"}),s.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mb-3",children:"Use this API key to authenticate with Zapier. Keep this key secret!"}),s.jsxs("div",{className:"flex items-center justify-between bg-white dark:bg-slate-800 rounded border border-slate-200 dark:border-slate-700 px-3 py-2",children:[s.jsx("code",{className:"text-sm font-mono text-slate-900 dark:text-slate-100",children:ae}),s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard.writeText(ae),e({title:"Copied!",description:"API key copied to clipboard"})},children:"Copy"})]})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(ee,{htmlFor:"zapier-webhook",children:"Webhook URL (Optional)"}),s.jsx(ie,{id:"zapier-webhook",placeholder:"https://hooks.zapier.com/hooks/catch/...",onChange:L=>{}}),s.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Add a webhook URL to receive events from Zapier"})]})]}):s.jsx("div",{className:"grid gap-4 py-4",children:s.jsxs("div",{className:"grid gap-2",children:[s.jsx(ee,{htmlFor:"zapier-name",children:"Integration Name"}),s.jsx(ie,{id:"zapier-name",placeholder:"My Zapier Integration",value:K,onChange:L=>je(L.target.value)}),s.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Give this integration a name to identify it in your account"})]})}),s.jsx(Bt,{children:ae?s.jsxs(s.Fragment,{children:[s.jsx(D,{variant:"outline",onClick:()=>{de(""),v(!1)},children:"Close"}),s.jsx(D,{variant:"default",onClick:()=>{de(""),v(!1),e({title:"Success",description:"Zapier webhook URL updated"})},children:"Save Settings"})]}):s.jsxs(s.Fragment,{children:[s.jsx(D,{variant:"outline",onClick:()=>v(!1),children:"Cancel"}),s.jsx(D,{onClick:Le,disabled:Ce,children:Ce?"Connecting...":"Connect to Zapier"})]})})]})}),s.jsx(Ot,{open:m,onOpenChange:g,children:s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Connect Stripe"}),s.jsx($t,{children:"Enter your Stripe API keys to enable payments."})]}),s.jsxs("div",{className:"grid gap-4 py-4",children:[s.jsxs("div",{className:"grid gap-2",children:[s.jsx(ee,{htmlFor:"stripe-publishable-key",children:"Publishable Key"}),s.jsx(ie,{id:"stripe-publishable-key",placeholder:"pk_test_...",value:_e,onChange:L=>U(L.target.value)})]}),s.jsxs("div",{className:"grid gap-2",children:[s.jsx(ee,{htmlFor:"stripe-secret-key",children:"Secret Key"}),s.jsx(ie,{id:"stripe-secret-key",type:"password",placeholder:"sk_test_...",value:M,onChange:L=>G(L.target.value)})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>g(!1),children:"Cancel"}),s.jsx(D,{onClick:le,children:"Connect"})]})]})})]})}const mk=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722"],OPe=[{id:"avataaars",name:"Cartoon",description:"Playful cartoonish avatar"},{id:"bottts",name:"Robot",description:"Unique robot characters"},{id:"initials",name:"Initials",description:"Text-based avatar with initials"},{id:"identicon",name:"Identicon",description:"Geometric pattern identicons"},{id:"micah",name:"Abstract",description:"Colorful abstract designs"},{id:"personas",name:"Personas",description:"Friendly character avatars"},{id:"adventurer",name:"Adventurer",description:"Pixel art adventurer characters"},{id:"lorelei",name:"Lorelei",description:"Simple yet stylish avatars"}];function APe(){const{user:e,setUser:t,refreshUser:r}=gn(),{toast:n}=Qt(),a=p.useRef(null),[i,o]=p.useState(null),[l,c]=p.useState(null),[d,u]=p.useState(!1),[f,h]=p.useState(!1),[m,g]=p.useState((e==null?void 0:e.avatarColor)||mk[Math.floor(Math.random()*mk.length)]);p.useEffect(()=>{e!=null&&e.profilePicture&&o(e.profilePicture)},[e]),p.useEffect(()=>{i&&e&&i!==e.profilePicture&&(async()=>{try{if(!(await Ue("PATCH",`/api/users/${e.id}`,{profilePicture:i})).ok)throw new Error("Failed to update profile picture");t&&t({...e,profilePicture:i}),await r()}catch(k){console.error("Failed to save profile picture:",k),n({title:"Failed to save",description:"Could not save profile picture. Please try again.",variant:"destructive"})}})()},[i,e,r]);const x=dt({mutationFn:async S=>{if(!(e!=null&&e.id))throw new Error("User ID not found");const k=await Ue("PATCH",`/api/users/${e.id}`,S);if(!k.ok){const T=await k.json();throw new Error(T.message||"Failed to update profile")}return k.json()},onSuccess:async S=>{Wt.invalidateQueries({queryKey:["/api/users"]}),t&&e&&t({...e,profilePicture:S.profilePicture||e.profilePicture,avatarColor:S.avatarColor||e.avatarColor}),await r(),n({title:"Profile updated",description:"Your profile picture has been updated successfully."})},onError:()=>{n({title:"Update failed",description:"Failed to update your profile. Please try again.",variant:"destructive"})}}),v=S=>{var k;try{const T=(k=S.target.files)==null?void 0:k[0];if(!T){n({title:"No file selected",description:"Please select an image file to upload.",variant:"destructive"});return}if(!T.type.startsWith("image/")){n({title:"Invalid file",description:"Please select an image file.",variant:"destructive"});return}if(T.size>5*1024*1024){n({title:"File too large",description:"Please select an image smaller than 5MB.",variant:"destructive"});return}const C=new FileReader;C.onload=()=>{o(C.result)},C.readAsDataURL(T)}catch(T){console.error("Error handling file change:",T),n({title:"Error uploading file",description:"An unexpected error occurred. Please try again.",variant:"destructive"})}},b=()=>{i&&x.mutate({profilePicture:i})},y=S=>{g(S),x.mutate({avatarColor:S,profilePicture:null}),o(null)},j=async S=>{if(!e){console.error("No user found when generating avatar");return}console.log("Starting avatar generation for style:",S),u(!0),c(S);try{await new Promise(E=>setTimeout(E,1e3));const k=encodeURIComponent(`${e.username}-${S}`);console.log("Generated seed:",k);let T=`https://api.dicebear.com/7.x/${S}/png?seed=${k}`;S==="avataaars"?T+="&backgroundColor=b6e3f4,c0aede,d1d4f9":S==="bottts"?T+="&colors=amber,blue,blueGrey,brown":S==="micah"&&(T+="&backgroundColor=0a5b83,1c799f,69d2e7"),console.log("Generated avatar URL:",T),console.log("Preloading image to verify URL...");const C=new Image;await new Promise((E,P)=>{C.onload=()=>{console.log("Avatar image loaded successfully!"),E(!0)},C.onerror=_=>{console.error("Failed to load avatar image:",_),P(new Error("Failed to load avatar image"))},C.src=T}),console.log("Setting preview and updating profile with avatar URL"),o(T),x.mutate({profilePicture:T,avatarColor:null}),n({title:"Avatar generated",description:"Your new avatar has been created successfully!"})}catch(k){console.error("Avatar generation error:",k),n({title:"Generation failed",description:"Failed to generate avatar. Please try again.",variant:"destructive"})}finally{u(!1),h(!1)}},w=()=>{var S;(S=a.current)==null||S.click()},N=()=>s.jsxs(Ot,{open:f,onOpenChange:h,children:[s.jsx(_c,{asChild:!0,children:s.jsx(D,{variant:"outline",children:"AI Avatar"})}),s.jsxs(kt,{className:"sm:max-w-[525px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Generate AI Avatar"}),s.jsx($t,{children:"Choose a style for your AI-generated avatar."})]}),s.jsx("div",{className:"grid grid-cols-2 gap-4 py-4",children:OPe.map(S=>
706s.jsxs(X,{className:`cursor-pointer hover:border-primary transition-colors ${l===S.id?"border-primary bg-primary/10":""}`,onClick:()=>c(S.id),children:[s.jsx(ue,{className:"p-3",children:s.jsx(fe,{className:"text-sm",children:S.name})}),s.jsx(te,{className:"p-3 pt-0",children:s.jsx(ye,{className:"text-xs",children:S.description})})]},S.id))}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>h(!1),children:"Cancel"}),s.jsx(D,{onClick:()=>l&&j(l),disabled:!l||d,children:d?"Generating...":"Generate Avatar"})]})]})]});return s.jsxs("div",{className:"space-y-4",children:[s.jsx("input",{type:"file",accept:"image/*",onChange:v,ref:a,className:"hidden"}),s.jsx("div",{className:"flex justify-center",children:s.jsx(yu,{className:"w-32 h-32 border-2 border-primary",children:i?s.jsx(ix,{src:i,alt:"Profile"}):s.jsx(bu,{style:{backgroundColor:m},className:"text-3xl font-medium text-white",children:e?T0(e.displayName||e.username):"?"})})}),s.jsxs(Br,{defaultValue:"upload",className:"w-full",children:[s.jsxs(Hr,{className:"grid w-full grid-cols-2",children:[s.jsx(We,{value:"upload",children:"Upload Photo"}),s.jsx(We,{value:"avatar",children:"Choose Avatar"})]}),s.jsxs(Ve,{value:"upload",className:"space-y-4 pt-4",children:[s.jsxs("div",{className:"flex space-x-2",children:[s.jsx(D,{onClick:w,variant:"outline",className:"flex-1",children:i?"Change Photo":"Select Photo"}),N()]}),i&&s.jsx(D,{onClick:b,disabled:x.isPending,className:"w-full",children:x.isPending?"Saving...":"Save Photo"})]}),s.jsx(Ve,{value:"avatar",className:"space-y-4 pt-4",children:s.jsx("div",{className:"grid grid-cols-4 gap-2",children:mk.map(S=>s.jsx("div",{className:`w-12 h-12 rounded-full cursor-pointer border-2 ${m===S?"border-primary":"border-transparent"}`,style:{backgroundColor:S},onClick:()=>y(S)},S))})})]})]})}function DPe(){const{user:e,setUser:t}=gn(),{toast:r}=Qt(),[n,a]=p.useState((e==null?void 0:e.bio)||""),[i,o]=p.useState((e==null?void 0:e.displayName)||""),[l,c]=p.useState((e==null?void 0:e.email)||""),[d,u]=p.useState(!1),f=()=>{u(!0)},h=dt({mutationFn:async g=>(await Ue("PATCH",`/api/users/${e==null?void 0:e.id}`,g)).json(),onSuccess:g=>{Wt.invalidateQueries({queryKey:["/api/users"]}),t&&e&&t({...e,displayName:g.displayName||e.displayName,email:g.email||e.email,bio:g.bio||e.bio}),r({title:"Profile updated",description:"Your profile information has been updated successfully."})},onError:()=>{r({title:"Update failed",description:"Failed to update your profile. Please try again.",variant:"destructive"})}}),m=g=>{g.preventDefault(),h.mutate({displayName:i,email:l,bio:n})};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:f}),s.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-white dark:bg-slate-800","data-tutorial":"profile-section",children:[s.jsxs("div",{className:"border-b border-neutral-300 dark:border-slate-700 p-4 bg-white dark:bg-slate-800",children:[s.jsx("h1",{className:"text-xl font-semibold text-neutral-700 dark:text-slate-200",children:"Your Profile"}),s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400 mt-1",children:"Manage your personal information and how it appears to others."})]}),s.jsx("div",{className:"flex-1 overflow-auto p-6",children:s.jsxs(Br,{defaultValue:"photo",className:"w-full",children:[s.jsxs(Hr,{className:"grid w-full grid-cols-2 mb-6",children:[s.jsx(We,{value:"photo",children:"Profile Photo"}),s.jsx(We,{value:"info",children:"Personal Info"})]}),s.jsx(Ve,{value:"photo",className:"space-y-4",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Profile Picture"}),s.jsx(ye,{children:"Choose how you appear to others. You can upload a photo, generate an AI avatar, or use a colored background with your initials."})]}),s.jsx(te,{children:s.jsx(APe,{})})]})}),s.jsx(Ve,{value:"info",className:"space-y-4",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Personal Information"}),s.jsx(ye,{children:"Update your personal details. This information will be used across the platform."})]}),s.jsx(te,{children:s.jsxs("form",{onSubmit:m,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"displayName",children:"Display Name"}),s.jsx(ie,{id:"displayName",value:i,onChange:g=>o(g.target.value),placeholder:"Your name"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"email",children:"Email Address"}
706),s.jsx(ie,{id:"email",type:"email",value:l,onChange:g=>c(g.target.value),placeholder:"[email protected]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"bio",children:"Bio"}),s.jsx(Es,{id:"bio",value:n,onChange:g=>a(g.target.value),placeholder:"A short bio about yourself",rows:4}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This will be displayed on your profile page."})]})]}),s.jsx(D,{type:"submit",className:"mt-4",disabled:h.isPending,children:h.isPending?"Saving...":"Save Changes"})]})})]})})]})})]})]}),s.jsx(Ds,{onCreateEventClick:f}),s.jsx(Mn,{isOpen:d,onClose:()=>u(!1)}),s.jsx(hi,{})]})}var Hl="Accordion",MPe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[LO,IPe,RPe]=dv(Hl),[$N,FZe]=Is(Hl,[RPe,FY]),FO=FY(),dX=O.forwardRef((e,t)=>{const{type:r,...n}=e,a=n,i=n;return s.jsx(LO.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(BPe,{...i,ref:t}):s.jsx(FPe,{...a,ref:t})})});dX.displayName=Hl;var[uX,$Pe]=$N(Hl),[fX,LPe]=$N(Hl,{collapsible:!1}),FPe=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},collapsible:i=!1,...o}=e,[l,c]=xs({prop:r,defaultProp:n,onChange:a});return s.jsx(uX,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:c,onItemClose:O.useCallback(()=>i&&c(""),[i,c]),children:s.jsx(fX,{scope:e.__scopeAccordion,collapsible:i,children:s.jsx(hX,{...o,ref:t})})})}),BPe=O.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:a=()=>{},...i}=e,[o=[],l]=xs({prop:r,defaultProp:n,onChange:a}),c=O.useCallback(u=>l((f=[])=>[...f,u]),[l]),d=O.useCallback(u=>l((f=[])=>f.filter(h=>h!==u)),[l]);return s.jsx(uX,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:d,children:s.jsx(fX,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(hX,{...i,ref:t})})})}),[UPe,LN]=$N(Hl),hX=O.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:a,orientation:i="vertical",...o}=e,l=O.useRef(null),c=Ft(l,t),d=IPe(r),f=cd(a)==="ltr",h=$e(e.onKeyDown,m=>{var T;if(!MPe.includes(m.key))return;const g=m.target,x=d().filter(C=>{var E;return!((E=C.ref.current)!=null&&E.disabled)}),v=x.findIndex(C=>C.ref.current===g),b=x.length;if(v===-1)return;m.preventDefault();let y=v;const j=0,w=b-1,N=()=>{y=v+1,y>w&&(y=j)},S=()=>{y=v-1,y<j&&(y=w)};switch(m.key){case"Home":y=j;break;case"End":y=w;break;case"ArrowRight":i==="horizontal"&&(f?N():S());break;case"ArrowDown":i==="vertical"&&N();break;case"ArrowLeft":i==="horizontal"&&(f?S():N());break;case"ArrowUp":i==="vertical"&&S();break}const k=y%b;(T=x[k].ref.current)==null||T.focus()});return s.jsx(UPe,{scope:r,disabled:n,direction:a,orientation:i,children:s.jsx(LO.Slot,{scope:r,children:s.jsx(Ke.div,{...o,"data-orientation":i,ref:c,onKeyDown:n?void 0:h})})})}),Sj="AccordionItem",[zPe,BO]=$N(Sj),mX=O.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...a}=e,i=LN(Sj,r),o=$Pe(Sj,r),l=FO(r),c=La(),d=n&&o.value.includes(n)||!1,u=i.disabled||e.disabled;return s.jsx(zPe,{scope:r,open:d,disabled:u,triggerId:c,children:s.jsx(zY,{"data-orientation":i.orientation,"data-state":bX(d),...l,...a,ref:t,disabled:u,open:d,onOpenChange:f=>{f?o.onItemOpen(n):o.onItemClose(n)}})})});mX.displayName=Sj;var pX="AccordionHeader",gX=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=LN(Hl,r),i=BO(pX,r);return s.jsx(Ke.h3,{"data-orientation":a.orientation,"data-state":bX(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:t})});gX.displayName=pX;var QT="AccordionTrigger",xX=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=LN(Hl,r),i=BO(QT,r),o=LPe(QT,r),l=FO(r);return s.jsx(LO.ItemSlot,{scope:r,children:s.jsx(Xxe,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...l,...n,ref:t})})});xX.displayName=QT;var vX="AccordionContent",yX=O.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,a=LN(Hl,r),i=BO(vX,r),o=FO(r);return s.jsx(Jxe,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...o,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});yX.displayName=vX;function bX(e){return e?"open":"closed"}var WPe=dX,VPe=mX,HPe=gX,jX=xX,wX=yX;const NX=WPe,vo=p.forwardRef(({className:e,...t},r)=>s.jsx(VPe,{ref:r,className:Oe("border-b",e),...t}));vo.displayName="AccordionItem";const yo=p.forwardRef(({className:e,children:t,...r},n)=>s.jsx(HPe,{className:"flex",children:s.jsxs(jX,{ref:n,className:Oe("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...r,children:[t,s.jsx(Dl,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));yo.displayName=jX.displayName;const bo=p.forwardRef(({className:e,children:t,...r},n)=>s.jsx(wX,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:s.jsx("div",{className:Oe("pb-4 pt-0",e),children:t})}));bo.displayName=wX.displayName;function qPe(){const{user:e}=gn(),[t,r]=p.useState("tutorials"),[n,a]=p.useState(""),[i,o]=p.useState(""),[l,c]=p.useState(!1),[d,u]=p.useState(!1),[f,h]=p.useState(!1),[m]=Nn();p.useEffect(()=>{if(console.log("Location changed:",m),m.includes("?")){const b=new URLSearchParams(m.split("?")[1]).get("tab");console.log("Tab parameter:",b),b&&["faqs","documentation","tutorials","contact"].includes(b)?(console.log("Setting active tab to:",b),r(b)):(console.log("No valid tab parameter found, defaulting to tutorials"),r("tutorials"))}else console.log("No query parameters found, defaulting to tutorials"),r("tutorials")},[m]);const g=()=>{h(!0)},x=async()=>{c(!0);try{const v=`User ID: ${(e==null?void 0:e.id)||"Unknown"} 707User Email: ${(e==null?void 0:e.email)||"Unknown"} 708 709Message: 710${i}`;(await fetch("/api/support",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:v,email:"[email protected]"})})).ok?(u(!0),o(""),setTimeout(()=>{u(!1)},3e3)):(console.error("Failed to send support message"),alert("Failed to send your message. Please try again later."))}catch(v){console.error("Error sending support message:",v),alert("An error occurred while sending your message. Please try again later.")}finally{c(!1)}};return e?s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dar
710k:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:g}),s.jsx("main",{className:"flex-1 overflow-y-auto bg-white dark:bg-slate-800",children:s.jsxs("div",{className:"container max-w-6xl mx-auto p-6",children:[s.jsx("h1",{className:"text-3xl font-bold mb-6",children:"Help & Support"}),s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"relative",children:[s.jsx(jo,{className:"absolute left-3 top-3 h-5 w-5 text-muted-foreground"}),s.jsx(ie,{placeholder:"Search for help topics...",className:"pl-10",value:n,onChange:v=>a(v.target.value)})]})}),s.jsxs(Br,{value:t,onValueChange:r,className:"mb-8",children:[s.jsxs(Hr,{className:"grid grid-cols-4 mb-6",children:[s.jsx(We,{value:"tutorials",children:"Tutorials"}),s.jsx(We,{value:"faqs",children:"FAQs"}),s.jsx(We,{value:"documentation",children:"Documentation"}),s.jsx(We,{value:"contact",children:"Contact Support"})]}),s.jsx(Ve,{value:"faqs",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Frequently Asked Questions"}),s.jsx(ye,{children:"Find answers to common questions about using the scheduling platform."})]}),s.jsx(te,{children:s.jsxs(NX,{type:"single",collapsible:!0,className:"w-full",children:[s.jsxs(vo,{value:"item-1",children:[s.jsx(yo,{children:"How do I connect my calendar?"}),s.jsxs(bo,{children:[s.jsx("p",{className:"mb-2",children:"You can connect your calendar by going to the Integrations page in the sidebar. We support:"}),s.jsxs("ul",{className:"list-disc pl-6 mb-4 space-y-1",children:[s.jsx("li",{children:"Google Calendar"}),s.jsx("li",{children:"Microsoft Outlook"}),s.jsx("li",{children:"iCal feeds"})]}),s.jsx("p",{children:"Click on the appropriate connection button and follow the authentication steps to grant access."})]})]}),s.jsxs(vo,{value:"item-2",children:[s.jsx(yo,{children:"How do I create a booking link?"}),s.jsxs(bo,{children:[s.jsx("p",{children:"To create a booking link:"}),s.jsxs("ol",{className:"list-decimal pl-6 mb-4 space-y-2",children:[s.jsx("li",{children:'Navigate to the "Booking Links" page from the sidebar'}),s.jsx("li",{children:'Click the "Create New Booking Link" button'}),s.jsx("li",{children:"Set your availability, meeting duration, and other preferences"}),s.jsx("li",{children:'Click "Create" to generate your link'}),s.jsx("li",{children:"Share the link with others who want to book time with you"})]})]})]}),s.jsxs(vo,{value:"item-3",children:[s.jsx(yo,{children:"How do teams work?"}),s.jsxs(bo,{children:[s.jsx("p",{className:"mb-2",children:"Teams allow you to coordinate scheduling across multiple members. Team managers can:"}),s.jsxs("ul",{className:"list-disc pl-6 mb-4 space-y-1",children:[s.jsx("li",{children:"View team member availability"}),s.jsx("li",{children:"Create team events"}),s.jsx("li",{children:"Manage team settings"}),s.jsx("li",{children:"Add or remove team members (requires company admin permissions)"})]}),s.jsx("p",{children:"Team members will see team events on their calendar and receive notifications about upcoming team events."})]})]}),s.jsxs(vo,{value:"item-4",children:[s.jsx(yo,{children:"How do I manage notifications?"}),s.jsxs(bo,{children:[s.jsx("p",{className:"mb-2",children:"Notification settings can be managed in your account settings:"}),s.jsxs("ol",{className:"list-decimal pl-6 mb-4 space-y-1",children:[s.jsx("li",{children:'Go to the "Settings" page from the sidebar'}),s.jsx("li",{children:'Select the "Notifications" tab'}),s.jsx("li",{children:"Enable or disable email notifications"}),s.jsx("li",{children:"Configure reminder timing preferences"}),s.jsx("li",{children:"Save your changes"})]})]})]}),s.jsxs(vo,{value:"item-5",children:[s.jsx(yo,{children:"What are the account permission levels?"}),s.jsxs(bo,{children:[s.jsx("p",{className:"mb-2",children:"Our system has several user roles with different permissions:"}),s.jsxs("ul",{className:"list-disc pl-6 mb-4 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Company Admin:"})," Can manage their organization, teams, and members"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Team Manager:"})," Can manage their team's schedule and members"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"User:"})," Can manage their personal schedule and booking links"]})]})]})]})]})})]})}),s.jsx(Ve,{value:"documentation",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Documentation"}),s.jsx(ye,{children:"Comprehensive guides and reference materials."})]}),s.jsx(te,{children:s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsx(X,{className:"p-4 border",children:s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx("div",{className:"p-2 rounded-md bg-primary/10 text-primary",children:s.jsx(Si,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Getting Started Guide"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Learn the basics of setting up your account and calendar."}),s.jsx(Te,{href:"/help/documentation/GettingStartedGuide",children:s.jsxs(D,{variant:"outline",size:"sm",className:"mt-2 flex items-center",children:[s.jsx("span",{children:"Read Guide"}),s.jsx(Zr,{className:"ml-2 h-4 w-4"})]})})]})]})}),s.jsx(X,{className:"p-4 border",children:s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx("div",{className:"p-2 rounded-md bg-primary/10 text-primary",children:s.jsx(yf,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"API Documentation"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Developer resources for integrating with our platform."}),s.jsx(Te,{href:"/help/documentation/ApiDocumentation",children:s.jsxs(D,{variant:"outline",size:"sm",className:"mt-2 flex items-center",children:[s.jsx("span",{children:"View API Docs"}),s.jsx(Zr,{className:"ml-2 h-4 w-4"})]})})]})]})}),s.jsx(X,{className:"p-4 border",children:s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx("div",{className:"p-2 rounded-md bg-primary/10 text-primary",children:s.jsx(Kw,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Admin Guide"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Learn how to manage organizations, teams, and users."}),s.jsx(Te,{href:"/help/documentation/AdminGuide",children:s.jsxs(D,{variant:"outline",size:"sm",className:"mt-2 flex items-center",children:[s.jsx("span",{children:"Read Guide"}),s.jsx(Zr,{className:"ml-2 h-4 w-4"})]})})]})]})}),s.jsx(X,{className:"p-4 border",children:s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx("div",{className:"p-2 rounded-md bg-primary/10 text-primary",children:s.jsx(Xd,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Knowledge Base"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"For instant answers to your questions, try our AI Chat Bot in the bottom right corner of the screen!"}),s.jsxs(D,{variant:"outline",size:"sm",className:"mt-2 flex items-center",onClick:()=>window.open("#chat-bot","_self"),children:[s.jsx("span",{children:"Chat With Assistant"}),s.jsx(Xd,{className:"ml-2 h-4 w-4"})]})]})]})})]})})]})}),s.jsx(Ve,{value:"tutorials",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Tutorials"}),s.jsx(ye,{children:"Step-by-step guides to help you get the most out of the platform."})]}),s.jsx(te,{children:s.jsxs("div",{className:"grid gap-4",children:[s.jsx("div",{className:"border rounded-lg overflow-hidden",children:s.jsxs("div",{className:"flex flex-col md:flex-row",children:[s.jsx("div",{className:"bg-slate-200 dark:bg-slate-800 w-full md:w-64 h-40 md:h-auto flex items-center justify-center",children:s.jsx(Si,{className:"h-16 w-16 text-slate-400"})}),s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("h3",{className:"font-semibold text-lg",children:"Getting Started with Your Calendar"}),s.jsx(pe,{children:"Beginner"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2 mb-4",children:"Learn how to set up your calendar, manage events, and integrate with external
710calendars."}),s.jsx(Te,{href:"/help/tutorials/calendar-getting-started",children:s.jsxs(D,{variant:"outline",size:"sm",className:"flex items-center",children:[s.jsx("span",{children:"Start Tutorial"}),s.jsx(Zr,{className:"ml-2 h-4 w-4"})]})})]})]})}),s.jsx("div",{className:"border rounded-lg overflow-hidden",children:s.jsxs("div",{className:"flex flex-col md:flex-row",children:[s.jsx("div",{className:"bg-slate-200 dark:bg-slate-800 w-full md:w-64 h-40 md:h-auto flex items-center justify-center",children:s.jsx(Si,{className:"h-16 w-16 text-slate-400"})}),s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("h3",{className:"font-semibold text-lg",children:"Creating Effective Booking Links"}),s.jsx(pe,{children:"Intermediate"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2 mb-4",children:"Learn best practices for setting up booking links that optimize your availability."}),s.jsx(Te,{href:"/help/tutorials/booking-links",children:s.jsxs(D,{variant:"outline",size:"sm",className:"flex items-center",children:[s.jsx("span",{children:"Start Tutorial"}),s.jsx(Zr,{className:"ml-2 h-4 w-4"})]})})]})]})}),s.jsx("div",{className:"border rounded-lg overflow-hidden",children:s.jsxs("div",{className:"flex flex-col md:flex-row",children:[s.jsx("div",{className:"bg-slate-200 dark:bg-slate-800 w-full md:w-64 h-40 md:h-auto flex items-center justify-center",children:s.jsx(Si,{className:"h-16 w-16 text-slate-400"})}),s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx("h3",{className:"font-semibold text-lg",children:"Team Scheduling Strategies"}),s.jsx(pe,{children:"Advanced"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2 mb-4",children:"Learn how to coordinate team availability and set up efficient scheduling workflows."}),s.jsx(Te,{href:"/help/tutorials/team-scheduling",children:s.jsxs(D,{variant:"outline",size:"sm",className:"flex items-center",children:[s.jsx("span",{children:"Start Tutorial"}),s.jsx(Zr,{className:"ml-2 h-4 w-4"})]})})]})]})})]})})]})}),s.jsx(Ve,{value:"contact",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Contact Support"}),s.jsx(ye,{children:"Need help with something specific? Our support team is here to help."})]}),s.jsx(te,{children:s.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium mb-4",children:"Send us a message"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{htmlFor:"supportMessage",className:"block text-sm font-medium mb-1",children:"Describe your issue"}),s.jsx(Es,{id:"supportMessage",placeholder:"Please provide details about your question or issue...",rows:5,value:i,onChange:v=>o(v.target.value)})]}),s.jsx(D,{disabled:!i.trim()||l,onClick:x,className:"w-full",children:l?"Sending...":d?"Message Sent!":"Send Message"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Our support team typically responds within 24 hours."})]})]}),s.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 p-6 rounded-lg",children:[s.jsx("h3",{className:"text-lg font-medium mb-4",children:"Contact Information"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx(Gc,{className:"h-5 w-5 text-muted-foreground mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Email Support"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"[email protected]"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"For general inquiries and non-urgent issues."})]})]}),s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx(Xd,{className:"h-5 w-5 text-muted-foreground mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Live AI Marketing & Scheduling Coach"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Available 24/7 Daily"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"See chat bubble on the lower right hand side of this screen."})]})]}),s.jsx("div",{className:"pt-4 mt-4 border-t",children:s.jsx("p",{className:"text-sm",children:"For urgent matters or account-related issues, please include your account ID in your message."})})]})]})]})})]})})]})]})})]}),f&&s.jsx(Mn,{isOpen:f,onClose:()=>h(!1)})]}):s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(tr,{}),s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Login Required"}),s.jsx(ye,{children:"Please log in to access the Help & Support center."})]}),s.jsx(te,{children:s.jsx(Te,{href:"/login",children:s.jsx(D,{className:"w-full",children:"Log In"})})})]})})]})}function YPe({contact:e,onClick:t}){const r=e.name.split(" ").map(n=>n[0]).join("").toUpperCase().slice(0,2);return s.jsx(X,{className:"cursor-pointer hover:shadow-md transition-shadow",onClick:t,children:s.jsx(te,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(yu,{className:"h-12 w-12",children:s.jsx(bu,{className:"bg-primary/10 text-primary font-semibold",children:r})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h3",{className:"font-semibold text-lg truncate",children:e.name}),s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[s.jsx(Gc,{
710className:"h-3 w-3 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:e.email})]})]}),s.jsxs(pe,{variant:"secondary",className:"flex-shrink-0",children:[s.jsx(ir,{className:"h-3 w-3 mr-1"}),e.totalBookings," ",e.totalBookings===1?"booking":"bookings"]})]}),s.jsxs("div",{className:"mt-2 flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(Gt,{className:"h-3 w-3"}),s.jsxs("span",{children:["Last booked: ",pt(e.lastBookingDate,"MMM d, yyyy")]})]})]})]})})})}function GPe(e){return ut({queryKey:["/api/contacts",e,"bookings"],queryFn:async()=>e?(await(await Ue("GET",`/api/contacts/${encodeURIComponent(e)}/bookings`)).json()).map(n=>({...n,startTime:new Date(n.startTime),endTime:new Date(n.endTime),createdAt:n.createdAt?new Date(n.createdAt):new Date})):[],enabled:!!e})}function KPe({contact:e,open:t,onOpenChange:r}){const{data:n,isLoading:a}=GPe((e==null?void 0:e.email)||null);if(!e)return null;const i=e.name.split(" ").map(l=>l[0]).join("").toUpperCase().slice(0,2),o=l=>{switch(l){case"confirmed":return"bg-green-100 text-green-800";
710case"pending":return"bg-yellow-100 text-yellow-800";case"cancelled":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};return s.jsx(Ot,{open:t,onOpenChange:r,children:s.jsxs(kt,{className:"max-w-2xl max-h-[80vh]",children:[s.jsxs(Ct,{children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(yu,{className:"h-16 w-16",children:s.jsx(bu,{className:"bg-primary/10 text-primary font-semibold text-xl",children:i})}),s.jsxs("div",{children:[s.jsx(Tt,{className:"text-2xl",children:e.name}),s.jsxs($t,{className:"flex items-center gap-1 mt-1",children:[s.jsx(Gc,{className:"h-4 w-4"}),e.email]})]})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-4 pt-4 border-t",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-2xl font-bold text-primary",children:e.totalBookings}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Total Bookings"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-sm font-medium",children:pt(e.firstBookingDate,"MMM d, yyyy")}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"First Booking"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-sm font-medium",children:pt(e.lastBookingDate,"MMM d, yyyy")}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Last Booking"})]})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsx("h3",{className:"font-semibold text-lg mb-3",children:"Booking History"}),a?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(Fg,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):n&&n.length>0?s.jsx(fg,{className:"h-[300px] pr-4",children:s.jsx("div",{className:"space-y-3",children:n.map(l=>s.jsx("div",{className:"border rounded-lg p-4 hover:bg-accent/50 transition-colors",children:s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Gt,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"font-medium",children:pt(l.startTime,"EEEE, MMMM d, yyyy")})]}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-1",children:[s.jsx(dr,{className:"h-3 w-3"}),s.jsxs("span",{children:[pt(l.startTime,"h:mm a")," - ",pt(l.endTime,"h:mm a")]})]}),l.notes&&s.jsxs("div",{className:"flex items-start gap-2 text-sm text-muted-foreground mt-2",children:[s.jsx(yf,{className:"h-3 w-3 mt-0.5 flex-shrink-0"}),s.jsx("span",{className:"line-clamp-2",children:l.notes})]})]}),s.jsx(pe,{className:o(l.status??""),children:l.status})]})},l.id))})}):s.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No bookings found"})]})]})})}function QPe({contacts:e}){const[t,r]=p.useState(null),[n,a]=p.useState(""),i=e.filter(o=>o.name.toLowerCase().includes(n.toLowerCase())||o.email.toLowerCase().includes(n.toLowerCase()));return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(jo,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),s.jsx(ie,{type:"text",placeholder:"Search contacts by name or email...",value:n,onChange:o=>a(o.target.value),className:"pl-10"})]}),n&&s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Found ",i.length," ",i.length===1?"contact":"contacts"]}),i.length>0?s.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:i.map(o=>s.jsx(YPe,{contact:o,onClick:()=>r(o)},o.email))}):s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:n?s.jsxs("p",{children:['No contacts found matching "',n,'"']}):s.jsx("p",{children:"No contacts yet. Contacts will appear here once people book appointments with you."})})]}),s.jsx(KPe,{contact:t,open:!!t,onOpenChange:o=>{o||r(null)}})]})}function ZPe(){return ut({queryKey:["/api/contacts"],queryFn:async()=>(await(await Ue("GET","/api/contacts")).json()).map(r=>({...r,lastBookingDate:new Date(r.lastBookingDate),firstBookingDate:new Date(r.firstBookingDate)}))})}function XPe(){return ut({queryKey:["/api/contacts/stats"],queryFn:async()=>(await Ue("GET","/api/contacts/stats")).json()})}function JPe(){const[e,t]=p.useState(!1),{data:r,isLoading:n}=ZPe(),{data:a,isLoading:i}=XPe(),o=()=>{t(!0)};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-50 dark:bg-slate-900",children:[s.jsx(tr,{onCreateEvent:o}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:o}),s.jsx("main",{className:"flex-1 overflow-y-auto bg-white dark:bg-slate-800",children:s.jsxs("div",{className:"max-w-7xl mx-auto p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold text-neutral-900 dark:text-slate-100",children:"Contacts"}
710),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400 mt-1",children:"Manage your contacts and view booking history"})]}),i?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(Fg,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):a?s.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[s.jsxs(X,{children:[s.jsxs(ue,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(fe,{className:"text-sm font-medium",children:"Total Contacts"}),s.jsx(ir,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(te,{children:[s.jsx("div",{className:"text-2xl font-bold",children:a.totalContacts}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Unique people who booked with you"})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(fe,{className:"text-sm font-medium",children:"Total Bookings"}),s.jsx(Lg,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(te,{children:[s.jsx("div",{className:"text-2xl font-bold",children:a.totalBookings}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"All-time appointments"})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(fe,{className:"text-sm font-medium",children:"Recent Bookings"}),s.jsx(tT,{className:"h-4 w-4 text-muted-foreground"})]}),s.jsxs(te,{children:[s.jsx("div",{className:"text-2xl font-bold",children:a.recentBookings}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Last 30 days"})]})]})]}):null,n?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(Fg,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):r?s.jsx(QPe,{contacts:r}):null]})})]}),s.jsx(Ds,{onCreateEventClick:o}),s.jsx(Mn,{isOpen:e,onClose:()=>t(!1)}),s.jsx(hi,{})]})}const Ky=[{value:"booking_created",label:"Booking Created",icon:Gt,description:"Triggers when a new booking is made"},{value:"booking_canceled",label:"Booking Cancelled",icon:xl,description:"Triggers when a booking is cancelled"},{value:"booking_updated",label:"Booking Updated",icon:dr,description:"Triggers when a booking is modified"},{value:"event_reminder",label:"Event Reminder",icon:SW,description:"Triggers before a scheduled event"},{value:"follow_up",label:"Follow-up",icon:Gw,description:"Triggers after an event completes"},{value:"team_schedule_change",label:"Team Schedule Change",icon:Gt,description:"Triggers when team availability changes"},{value:"manual",label:"Manual Trigger",icon:wW,description:"Trigger manually via API"}],Qy=[{value:"send_email",label:"Send Email",icon:Gc,description:"Send an email notification"},{value:"send_sms",label:"Send SMS",icon:Xd,description:"Send an SMS via Twilio"},{value:"trigger_webhook",label:"Webhook",icon:rT,description:"Call an external webhook URL"},{value:"trigger_zapier",label:"Zapier",icon:wh,description:"Trigger a Zapier automation"},{value:"delay",label:"Delay",icon:dr,description:"Wait before next action"},{value:"condition",label:"Condition",icon:yh,description:"Add conditional branching"},{value:"create_event",label:"Create Event",icon:Gt,description:"Create a calendar event"}];function eEe(){var _e;const[e,t]=p.useState(!1),[r,n]=p.useState(!1),[a,i]=p.useState(!1),[o,l]=p.useState(null),[c,d]=p.useState("workflows"),[u,f]=p.useState({name:"",description:"",triggerType:"booking_created",triggerConfig:{}}),[h,m]=p.useState([]),[g,x]=p.useState(`{ 711 "bookingId": 1, 712 "guestEmail": "[email protected]", 713 "guestName": "John Doe" 714}`),{toast:v}=Qt(),{data:b=[],isLoading:y}=ut({queryKey:["/api/workflows"]}),{data:j}=ut({queryKey:["/api/workflows/analytics"]}),{data:w=[]}=ut({queryKey:["/api/workflows/templates"]}),N=dt({mutationFn:async U=>(await Ue("POST","/api/workflows",U)).json(),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/workflows"]}),n(!1),C(),v({title:"Workflow created",description:"Your workflow has been created successfully."})},onError:U=>{v({title:"Error",description:U.message,variant:"destructive"})}}),S=dt({mutationFn:async({id:U,...M})=>(await Ue("PATCH",`/api/workflows/${U}`,M)).json(),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/workflows"]}),v({title:"Workflow updated",description:"Your workflow has been updated successfully."})},onError:U=>{v({title:"Error",description:U.message,variant:"destructive"})}}),k=dt({mutationFn:async U=>(await Ue("DELETE",`/api/workflows/${U}`)).json(),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/workflows"]}),v({title:"Workflow deleted",description:"Your workflow has been deleted."})},onError:U=>{v({title:"Error",description:U.message,variant:"destructive"})}}),T=dt({mutationFn:async({id:U,triggerData:M,testMode:G})=>(await Ue("POST",`/api/workflows/${U}/execute`,{triggerData:M,testMode:G})).json(),onSuccess:U=>{Wt.invalidateQueries({queryKey:["/api/workflows"]}),v({title:a?"Test completed":"Workflow executed",description:`Execution ID: ${U.id}`}),a&&i(!1)},onError:U=>{v({title:"Execution failed",description:U.message,variant:"destructive"})}}),C=()=>{f({name:"",description:"",triggerType:"booking_created",triggerConfig:{}}),m([]),l(null)},E=()=>{t(!0)},P=U=>{S.mutate({id:U.id,isEnabled:!U.isEnabled})},_=async U=>{try{const G=await(await Ue("GET",`/api/workflows/${U.id}/steps`)).json();N.mutate({workflow:{name:`${U.name} (Copy)`,description:U.description,triggerType:U.triggerType,triggerConfig:U.triggerConfig},steps:G.map(K=>({actionType:K.actionType,actionConfig:K.actionConfig,orderIndex:K.orderIndex,delayMinutes:K.delayMinutes}))})}catch{v({title:"Error",description:"Failed to duplicate workflow",variant:"destructive"})}},I=U=>{f({name:U.name,description:U.description,triggerType:U.triggerType,triggerConfig:U.triggerConfig}),m(U.steps.map((M,G)=>({...M,orderIndex:G}))),n(!0)},F=U=>{const M=Qy.find(G=>G.value===U);m([...h,{actionType:U,actionConfig:V(U),orderIndex:h.length,delayMinutes:U==="delay"?60:0}]),v({title:"Step added",description:`Added ${M==null?void 0:M.label} step`})},H=U=>{m(h.filter((M,G)=>G!==U).map((M,G)=>({...M,orderIndex:G})))},W=(U,M)=>{m(h.map((G,K)=>K===U?{...G,...M}:G))},z=()=>{if(!u.name){v({title:"Error",description:"Please enter a workflow name",variant:"destructive"});return}N.mutate({workflow:u,steps:h})},R=U=>{l(U),i(!0)},q=()=>{if(o)try{const U=JSON.parse(g);T.mutate({id:o.id,triggerData:U,testMode:!0})}catch{v({title:"Invalid JSON",description:"Please enter valid JSON test data",variant:"destructive"})}},V=U=>{switch(U){case"send_email":return{to:"{{guestEmail}}",subject:"Booking Confirmation",body:"Your booking has been confirmed."};case"send_sms":return{to:"{{guestPhone}}",message:"Your booking has been confirmed."};case"webhook":return{url:"",method:"POST",headers:{},body:{}};case"zapier":return{webhookUrl:""};case"delay":return{minutes:60};case"condition":return{field:"",operator:"equals",value:""};case"create_event":return{title:"{{eventTitle}}",startTime:"{{startTime}}",duration:30};default:return{}}},se=U=>{const M=Ky.find(G=>G.value===U);return(M==null?void 0:M.icon)||Gt},oe=U=>{const M=Qy.find(G=>G.value===U);return(M==null?void 0:M.icon)||wh};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-50 dark:bg-slate-900",children:[s.jsx(tr,{onCreateEvent:E}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:E}),s.jsx("main",{className:"flex-1 overflow-auto p-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto
714space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-neutral-900 dark:text-slate-100",children:"Workflow Automation"}),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400 mt-1",children:"Create powerful automations for your scheduling workflow"})]}),s.jsxs(D,{onClick:()=>n(!0),className:"flex items-center gap-2",children:[s.jsx(Sr,{className:"h-4 w-4"}),"Create Workflow"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsx(X,{children:s.jsx(te,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-neutral-600 dark:text-slate-400",children:"Total Workflows"}),s.jsx("p",{className:"text-2xl font-bold text-neutral-900 dark:text-slate-100",children:b.length})]}),s.jsx("div",{className:"h-10 w-10 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:s.jsx(og,{className:"h-5 w-5 text-blue-600 dark:text-blue-400"})})]})})}),s.jsx(X,{children:s.jsx(te,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-neutral-600 dar
714k:text-slate-400",children:"Successful"}),s.jsx("p",{className:"text-2xl font-bold text-green-600",children:(j==null?void 0:j.successful)||0})]}),s.jsx("div",{className:"h-10 w-10 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:s.jsx(Aa,{className:"h-5 w-5 text-green-600 dark:text-green-400"})})]})})}),s.jsx(X,{children:s.jsx(te,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-neutral-600 dark:text-slate-400",children:"Failed"}),s.jsx("p",{className:"text-2xl font-bold text-red-600",children:(j==null?void 0:j.failed)||0})]}),s.jsx("div",{className:"h-10 w-10 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:s.jsx(xl,{className:"h-5 w-5 text-red-600 dark:text-red-400"})})]})})}),s.jsx(X,{children:s.jsx(te,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-neutral-600 dar
714k:text-slate-400",children:"Pending"}),s.jsx("p",{className:"text-2xl font-bold text-yellow-600",children:(j==null?void 0:j.pending)||0})]}),s.jsx("div",{className:"h-10 w-10 rounded-full bg-yellow-100 dark:bg-yellow-900/30 flex items-center justify-center",children:s.jsx(sn,{className:"h-5 w-5 text-yellow-600 dark:text-yellow-400"})})]})})})]}),s.jsxs(Br,{value:c,onValueChange:d,children:[s.jsxs(Hr,{children:[s.jsxs(We,{value:"workflows",className:"flex items-center gap-2",children:[s.jsx(og,{className:"h-4 w-4"}),"My Workflows"]}),s.jsxs(We,{value:"templates",className:"flex items-center gap-2",children:[s.jsx(Aoe,{className:"h-4 w-4"}),"Templates"]}),s.jsxs(We,{value:"analytics",className:"flex items-center gap-2",children:[s.jsx(qc,{className:"h-4 w-4"}),"Analytics"]})]}),s.jsx(Ve,{value:"workflows",className:"space-y-4 mt-4",children:y?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):b.length===0?s.jsx(X,{children:s.jsxs(te,{className:"flex flex-col items-center justify-center py-12",children:[s.jsx("div",{className:"h-16 w-16 rounded-full bg-primary/10 flex items-center justify-center mb-4",children:s.jsx(og,{className:"h-8 w-8 text-primary"})}),s.jsx("h3",{className:"text-lg font-semibold text-neutral-900 dark:text-slate-100 mb-2",children:"No workflows yet"}
714),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400 text-center mb-4 max-w-md",children:"Create your first workflow to automate tasks like sending confirmation emails, reminders, or integrating with other tools."}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs(D,{onClick:()=>n(!0),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Create Workflow"]}),s.jsxs(D,{variant:"outline",onClick:()=>d("templates"),children:[s.jsx(Voe,{className:"h-4 w-4 mr-2"}),"Browse Templates"]})]})]})}):s.jsx("div",{className:"grid gap-4",children:b.map(U=>{var G;const M=se(U.triggerType);return s.jsx(X,{className:"hover:shadow-md transition-shadow",children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"h-12 w-12 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:s.jsx(M,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("h3",{className:"font-semibold text-neutral-900 dark:text-slate-100",children:U.name}),s.jsx(pe,{variant:U.isEnabled?"default":"secondary",children:U.isEnabled?"Active":"Inactive"})]}),U.description&&s.jsx("p",{className:"text-sm text-neutral-600 dar
714k:text-slate-400 mt-1",children:U.description}),s.jsxs("div",{className:"flex items-center gap-4 mt-2",children:[s.jsxs("span",{className:"text-xs text-neutral-500 dark:text-slate-500",children:["Trigger: ",(G=Ky.find(K=>K.value===U.triggerType))==null?void 0:G.label]}),s.jsxs("span",{className:"text-xs text-neutral-500 dark:text-slate-500",children:["v",U.version]})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gr,{checked:U.isEnabled,onCheckedChange:()=>P(U)}),s.jsx(D,{variant:"ghost",size:"icon",onClick:()=>R(U),title:"Test workflow",children:s.jsx(pI,{className:"h-4 w-4"})}),s.jsx(D,{variant:"ghost",size:"icon",onClick:()=>_(U),title:"Duplicate",children:s.jsx(ea,{className:"h-4 w-4"})}),s.jsx(D,{variant:"ghost",size:"icon",onClick:()=>k.mutate(U.id),title:"Delete",children:s.jsx(Pr,{className:"h-4 w-4 text-red-500"})})]})]})})},U.id)})})}),s.jsx(Ve,{value:"templates",className:"space-y-4 mt-4",children:s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:w.map(U=>{const M=se(U.triggerType);return s.jsxs(X,{className:"hover:shadow-md transition-shadow cursor-pointer",children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-10 w-10 rounded-lg bg-primary/10 flex items-center justify-center",children:s.jsx(M,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{className:"text-lg",children:U.name}),s.jsxs(ye,{className:"text-xs",children:[U.steps.length," step",U.steps.length!==1?"s":""]})]})]})}),s.jsxs(te,{children:[s.jsx("p",{className:"text-sm text-neutral-600 dar
714k:text-slate-400 mb-4",children:U.description}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[U.steps.slice(0,3).map((G,K)=>{const je=oe(G.actionType);return s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"h-8 w-8 rounded-full bg-neutral-100 dark:bg-slate-700 flex items-center justify-center",children:s.jsx(je,{className:"h-4 w-4 text-neutral-600 dark:text-slate-400"})}),K<U.steps.length-1&&K<2&&s.jsx(Wi,{className:"h-4 w-4 text-neutral-400 mx-1"})]},K)}),U.steps.length>3&&s.jsxs("span",{className:"text-xs text-neutral-500",children:["+",U.steps.length-3," more"]})]}),s.jsx(D,{className:"w-full",variant:"outline",onClick:()=>I(U),children:"Use Template"})]})]},U.id)})})}),s.jsx(Ve,{value:"analytics",className:"space-y-4 mt-4",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Execution Overview"}),s.jsx(ye,{children:"Track your workflow performance"})]}),s.jsx(te,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 bg-neutral-50 dark:bg-slate-800 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-10 w-10 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",children:s.jsx(qc,{className:"h-5 w-5 text-blue-600"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-neutral-900 dark:text-slate-100",children:"Total Executions"}
714),s.jsx("p",{className:"text-sm text-neutral-600 dark:text-slate-400",children:"All time"})]})]}),s.jsx("p",{className:"text-2xl font-bold text-neutral-900 dark:text-slate-100",children:(j==null?void 0:j.total)||0})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsxs("div",{className:"p-4 bg-green-50 dark:bg-green-900/20 rounded-lg text-center",children:[s.jsx(Aa,{className:"h-6 w-6 text-green-600 mx-auto mb-2"}),s.jsx("p",{className:"text-2xl font-bold text-green-600",children:(j==null?void 0:j.successful)||0}),s.jsx("p",{className:"text-sm text-green-700 dark:text-green-400",children:"Successful"})]}),s.jsxs("div",{className:"p-4 bg-red-50 dark:bg-red-900/20 rounded-lg text-center",children:[s.jsx(xl,{className:"h-6 w-6 text-red-600 mx-auto mb-2"}),s.jsx("p",{className:"text-2xl font-bold text-red-600",children:(j==null?void 0:j.failed)||0}),s.jsx("p",{className:"text-sm text-red-700 dark:text-red-400",children:"Failed"})]}),s.jsxs("div",{className:"p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-lg text-center",children:[s.jsx(sn,{className:"h-6 w-6 text-yellow-600 mx-auto mb-2"}),s.jsx("p",{className:"text-2xl font-bold text-yellow-600",children:(j==null?void 0:j.pending)||0}),s.jsx("p",{className:"text-sm text-yellow-700 dark:text-yellow-400",children:"Pending"})]})]}),j&&j.total>0&&s.jsxs("div",{className:"mt-4",children:[s.jsx("p",{className:"text-sm font-medium text-neutral-600 dar
714k:text-slate-400 mb-2",children:"Success Rate"}),s.jsx("div",{className:"w-full bg-neutral-200 dark:bg-slate-700 rounded-full h-3",children:s.jsx("div",{className:"bg-green-600 h-3 rounded-full transition-all",style:{width:`${j.successful/j.total*100}%`}})}),s.jsxs("p",{className:"text-sm text-neutral-600 dark:text-slate-400 mt-1",children:[(j.successful/j.total*100).toFixed(1),"%"]})]})]})})]})})]})]})})]}),s.jsx(Ot,{open:r,onOpenChange:n,children:s.jsxs(kt,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Create Workflow"}),s.jsx($t,{children:"Build an automated workflow with triggers and actions"})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"workflow-name",children:"Workflow Name"}),s.jsx(ie,{id:"workflow-name",value:u.name,onChange:U=>f({...u,name:U.target.value}),placeholder:"e.g., Booking Confirmation"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"trigger-type",children:"Trigger"}),s.jsxs(Xe,{value:u.triggerType,onValueChange:U=>f({...u,triggerType:U}),children:[s.jsx(Qe,{id:"trigger-type",children:s.jsx(Je,{placeholder:"Select a trigger"})}),s.jsx(Ze,{children:Ky.map(U=>s.jsx(Z,{value:U.value,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(U.icon,{className:"h-4 w-4"}),U.label]})},U.value))})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{htmlFor:"workflow-description",children:"Description (Optional)"}),s.jsx(Es,{id:"workflow-description",value:u.description,onChange:U=>f({...u,description:U.target.value}),placeholder:"Describe what this workflow does...",rows:2})]}),s.jsxs("div",{className:"border-t pt-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"font-semibold text-neutral-900 dark:text-slate-100",children:"Workflow Steps"}),s.jsxs("span",{className:"text-sm text-neutral-500",children:[h.length," step(s)"]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"p-4 bg-primary/10 rounded-lg flex items-center gap-3",children:[(()=>{const U=se(u.triggerType);return s.jsx(U,{className:"h-5 w-5 text-primary"})})(),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-primary",children:"Trigger"}),s.jsx("p",{className:"text-sm text-primary/80",children:(_e=Ky.find(U=>U.value===u.triggerType))==null?void 0:_e.label})]})]}),h.map((U,M)=>{var je,ae,de,Ce,B,me,ne,Be,lt;const G=oe(U.actionType||""),K=Qy.find(ct=>ct.value===U.actionType);return s.jsx("div",{className:"p-4 bg-neutral-100 dark:bg-slate-800 rounded-lg",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("div",{className:"h-8 w-8 rounded-full bg-neutral-200 dark:bg-slate-700 flex items-center justify-center",children:s.jsx(ME,{className:"h-4 w-4 text-neutral-400"})}),s.jsx("div",{className:"w-0.5 h-4 bg-neutral-300 dark:bg-slate-600 mt-1"})]}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(G,{className:"h-4 w-4 text-neutral-600 dar
714k:text-slate-400"}),s.jsx("span",{className:"font-medium text-neutral-900 dark:text-slate-100",children:K==null?void 0:K.label}),s.jsxs(pe,{variant:"outline",className:"text-xs",children:["Step ",M+1]})]}),U.actionType==="send_email"&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(ie,{placeholder:"To: {{guestEmail}}",value:((je=U.actionConfig)==null?void 0:je.to)||"",onChange:ct=>W(M,{actionConfig:{...U.actionConfig,to:ct.target.value}})}),s.jsx(ie,{placeholder:"Subject",value:((ae=U.actionConfig)==null?void 0:ae.subject)||"",onChange:ct=>W(M,{actionConfig:{...U.actionConfig,subject:ct.target.value}})})]}),U.actionType==="send_sms"&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(ie,{placeholder:"To: {{guestPhone}}",value:((de=U.actionConfig)==null?void 0:de.to)||"",onChange:ct=>W(M,{actionConfig:{...U.actionConfig,to:ct.target.value}})}),s.jsx(Es,{placeholder:"Message",value:((Ce=U.actionConfig)==null?void 0:Ce.message)||"",onChange:ct=>W(M,{actionConfig:{...U.actionConfig,message:ct.target.value}}),rows:2})]}),U.actionType==="webhook"&&s.jsx("div",{className:"space-y-2 mt-2",children:s.jsx(ie,{placeholder:"Webhook URL",value:((B=U.actionConfig)==null?void 0:B.url)||"",onChange:ct=>W(M,{actionConfig:{...U.actionConfig,url:ct.target.value}})})}),U.actionType==="zapier"&&s.jsx("div",{className:"space-y-2 mt-2",children:s.jsx(ie,{placeholder:"Zapier Webhook URL",value:((me=U.actionConfig)==null?void 0:me.webhookUrl)||"",onChange:ct=>W(M,{actionConfig:{...U.actionConfig,webhookUrl:ct.target.value}})})}),U.actionType==="delay"&&s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsx(ie,{type:"number",className:"w-24",value:U.delayMinutes||60,onChange:ct=>W(M,{delayMinutes:parseInt(ct.target.value)||0})}
714),s.jsx("span",{className:"text-sm text-neutral-600 dark:text-slate-400",children:"minutes"})]}),U.actionType==="condition"&&s.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-2",children:[s.jsx(ie,{placeholder:"Field",value:((ne=U.actionConfig)==null?void 0:ne.field)||"",onChange:ct=>W(M,{actionConfig:{...U.actionConfig,field:ct.target.value}})}),s.jsxs(Xe,{value:((Be=U.actionConfig)==null?void 0:Be.operator)||"equals",onValueChange:ct=>W(M,{actionConfig:{...U.actionConfig,operator:ct}}),children:[s.jsx(Qe,{children:s.jsx(Je,{})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"equals",children:"equals"}),s.jsx(Z,{value:"not_equals",children:"not equals"}),s.jsx(Z,{value:"contains",children:"contains"}),s.jsx(Z,{value:"greater_than",children:"greater than"}),s.jsx(Z,{value:"less_than",children:"less than"})]})]}),s.jsx(ie,{placeholder:"Value",value:((lt=U.actionConfig)==null?void 0:lt.value)||"",onChange:ct=>W(M,{actionConfig:{...U.actionConfig,value:ct.target.value}})})]})]})]}),s.jsx(D,{variant:"ghost",size:"icon",onClick:()=>H(M),className:"text-red-500 hover:text-red-600 hover:bg-red-50",children:s.jsx(Pr,{className:"h-4 w-4"})})]})},M)}),s.jsxs("div",{className:"border-2 border-dashed border-neutral-300 dark:border-slate-600 rounded-lg p-4",children:[s.jsx("p",{className:"text-sm font-medium text-neutral-600 dar
714k:text-slate-400 mb-3",children:"Add Action"}),s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:Qy.map(U=>s.jsxs(D,{variant:"outline",className:"h-auto py-3 flex flex-col items-center gap-1",onClick:()=>F(U.value),children:[s.jsx(U.icon,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:U.label})]},U.value))})]})]})]})]}),s.jsxs(Bt,{className:"mt-6",children:[s.jsx(D,{variant:"outline",onClick:()=>{n(!1),C()},children:"Cancel"}),s.jsx(D,{onClick:z,disabled:N.isPending||!u.name,children:N.isPending?"Creating...":"Create Workflow"})]})]})}),s.jsx(Ot,{open:a,onOpenChange:i,children:s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsxs(Tt,{className:"flex items-center gap-2",children:[s.jsx(pI,{className:"h-5 w-5"}),"Test Workflow"]}),s.jsxs($t,{children:["Run ",o==null?void 0:o.name," with test data. No actual actions will be performed."]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(ee,{children:"Test Trigger Data (JSON)"}),s.jsx(Es,{value:g,onChange:U=>x(U.target.value),rows:8,className:"font-mono text-sm",placeholder:'{"bookingId": 1, "guestEmail": "[email protected]"}'})]}),s.jsxs("div",{className:"p-3 bg-yellow-50 dark:bg-yellow-900/20 rounded-lg flex items-start gap-2",children:[s.jsx(sn,{className:"h-5 w-5 text-yellow-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"text-sm text-yellow-700 dark:text-yellow-400",children:[s.jsx("p",{className:"font-medium",children:"Test Mode"}),s.jsx("p",{children:"Actions will be simulated and logged but not actually executed."})]})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>i(!1),children:"Cancel"}),s.jsx(D,{onClick:q,disabled:T.isPending,children:T.isPending?s.jsx(s.Fragment,{children:"Running Test..."}):s.jsxs(s.Fragment,{children:[s.jsx(wW,{className:"h-4 w-4 mr-2"}),"Run Test"]})})]})]})}),s.jsx(Ds,{onCreateEventClick:E}),s.jsx(Mn,{isOpen:e,onClose:()=>t(!1)}),s.jsx(hi,{})]})}var tEe=Array.isArray,wa=tEe,rEe=typeof $p=="object"&&$p&&$p.Object===Object&&$p,SX=rEe,nEe=SX,sEe=typeof self=="object"&&self&&self.Object===Object&&self,aEe=nEe||sEe||Function("return this")(),Ho=aEe,iEe=Ho,oEe=iEe.Symbol,qv=oEe,o$=qv,kX=Object.prototype,lEe=kX.hasOwnProperty,cEe=kX.toString,Np=o$?o$.toStringTag:void 0;function dEe(e){var t=lEe.call(e,Np),r=e[Np];try{e[Np]=void 0;var n=!0}catch{}var a=cEe.call(e);return n&&(t?e[Np]=r:delete e[Np]),a}var uEe=dEe,fEe=Object.prototype,hEe=fEe.toString;function mEe(e){return hEe.call(e)}var pEe=mEe,l$=qv,gEe=uEe,xEe=pEe,vEe="[object Null]",yEe="[object Undefined]",c$=l$?l$.toStringTag:void 0;function bEe(e){return e==null?e===void 0?yEe:vEe:c$&&c$ in Object(e)?gEe(e):xEe(e)}var ql=bEe;function jEe(e){return e!=null&&typeof e=="object"}var Yl=jEe,wEe=ql,NEe=Yl,SEe="[object Symbol]";function kEe(e){return typeof e=="symbol"||NEe(e)&&wEe(e)==SEe}var Am=kEe,CEe=wa,TEe=Am,_Ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,PEe=/^\w*$/;function EEe(e,t){if(CEe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||TEe(e)?!0:PEe.test(e)||!_Ee.test(e)||t!=null&&e in Object(t)}var UO=EEe;function OEe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var md=OEe;const Dm=ur(md);var AEe=ql,DEe=md,MEe="[object AsyncFunction]",IEe="[object Function]",REe="[object GeneratorFunction]",$Ee="[object Proxy]";function LEe(e){if(!DEe(e))return!1;var t=AEe(e);return t==IEe||t==REe||t==MEe||t==$Ee}var zO=LEe;const Lt=ur(zO);var FEe=Ho,BEe=FEe["__core-js_shared__"],UEe=BEe,pk=UEe,d$=function(){var e=/[^.]+$/.exec(pk&&pk.keys&&pk.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function zEe(e){return!!d$&&d$ in e}var WEe=zEe,VEe=Function.prototype,HEe=VEe.toString;function qEe(e){if(e!=null){try{return HEe.call(e)}catch{}try{return e+""}catch{}}return""}var CX=qEe,YEe=zO,GEe=WEe,KEe=md,QEe=CX,ZEe=/[\\^$.*+?()[\]{}|]/g,XEe=/^\[object .+?Constructor\]$/,JEe=Function.prototype,e2e=Object.prototype,t2e=JEe.toString,r2e=e2e.hasOwnProperty,n2e=RegExp("^"+t2e.call(r2e).replace(ZEe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function s2e(e){if(!KEe(e)||GEe(e))return!1;var t=YEe(e)?n2e:XEe;return t.test(QEe(e))}var a2e=s2e;function i2e(e,t){return e==null?void 0:e[t]}var o2e=i2e,l2e=a2e,c2e=o2e;function d2e(e,t){var r=c2e(e,t);return l2e(r)?r:void 0}var Uu=d2e,u2e=Uu,f2e=u2e(Object,"create"),FN=f2e,u$=FN;function h2e(){this.__data__=u$?u$(null):{},this.size=0}var m2e=h2e;function p2e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var g2e=p2e,x2e=FN,v2e="__lodash_hash_undefined__",y2e=Object.prototype,b2e=y2e.hasOwnProperty;function j2e(e){var t=this.__data__;if(x2e){var r=t[e];return r===v2e?void 0:r}return b2e.call(t,e)?t[e]:void 0}var w2e=j2e,N2e=FN,S2e=Object.prototype,k2e=S2e.hasOwnProperty;function C2e(e){var t=this.__data__;return N2e?t[e]!==void 0:k2e.call(t,e)}var T2e=C2e,_2e=FN,P2e="__lodash_hash_undefined__";function E2e(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_2e&&t===void 0?P2e:t,this}var O2e=E2e,A2e=m2e,D2e=g2e,M2e=w2e,I2e=T2e,R2e=O2e;function Mm(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mm.prototype.clear=A2e;Mm.prototype.delete=D2e;Mm.prototype.get=M2e;Mm.prototype.has=I2e;Mm.prototype.set=R2e;var $2e=Mm;function L2e(){this.__data__=[],this.size=0}var F2e=L2e;function B2e(e,t){return e===t||e!==e&&t!==t}var WO=B2e,U2e=WO;function z2e(e,t){for(var r=e.length;r--;)if(U2e(e[r][0],t))return r;return-1}var BN=z2e,W2e=BN,V2e=Array.prototype,H2e=V2e.splice;function q2e(e){var t=this.__data__,r=W2e(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():H2e.call(t,r,1),--this.size,!0}var Y2e=q2e,G2e=BN;function K2e(e){var t=this.__data__,r=G2e(t,e);return r<0?void 0:t[r][1]}var Q2e=K2e,Z2e=BN;function X2e(e){return Z2e(this.__data__,e)>-1}var J2e=X2e,eOe=BN;function tOe(e,t){var r=this.__data__,n=eOe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var rOe=tOe,nOe=F2e,sOe=Y2e,aOe=Q2e,iOe=J2e,oOe=rOe;function Im(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Im.prototype.clear=nOe;Im.prototype.delete=sOe;Im.prototype.get=aOe;Im.prototype.has=iOe;Im.prototype.set=oOe;var UN=Im,lOe=Uu,cOe=Ho,dOe=lOe(cOe,"Map"),VO=dOe,f$=$2e,uOe=UN,fOe=VO;function hOe(){this.size=0,this.__data__={hash:new f$,map:new(fOe||uOe),string:new f$}}var mOe=hOe;function pOe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var gOe=pOe,xOe=gOe;function vOe(e,t){var r=e.__data__;return xOe(t)?r[typeof t=="string"?"string":"hash"]:r.map}var zN=vOe,yOe=zN;function bOe(e){var t=yOe(this,e).delete(e);return this.size-=t?1:0,t}var jOe=bOe,wOe=zN;function NOe(e){return wOe(this,e).get(e)}var SOe=NOe,kOe=zN;function COe(e){return kOe(this,e).has(e)}var TOe=COe,_Oe=zN;function POe(e,t){var r=_Oe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var EOe=POe,OOe=mOe,AOe=jOe,DOe=SOe,MOe=TOe,IOe=EOe;function Rm(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Rm.prototype.clear=OOe;Rm.prototype.delete=AOe;Rm.prototype.get=DOe;Rm.prototype.has=MOe;Rm.prototype.set=IOe;var HO=Rm,TX=HO,ROe="Expected a function";function qO(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ROe);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(qO.Cache||TX),r}qO.Cache=TX;var _X=qO;const $Oe=ur(_X);var LOe=_X,FOe=500;function BOe(e){var t=LOe(e,function(n){return r.size===FOe&&r.clear(),n}
vendor: 6,545 bytes, lines 714-722
714),r=t.cache;return t}var UOe=BOe,zOe=UOe,WOe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,VOe=/\\(\\)?/g,HOe=zOe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WOe,function(r,n,a,i){t.push(a?i.replace(VOe,"$1"):n||r)}),t}),qOe=HOe;function YOe(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var YO=YOe,h$=qv,GOe=YO,KOe=wa,QOe=Am,ZOe=1/0,m$=h$?h$.prototype:void 0,p$=m$?m$.toString:void 0;function PX(e){if(typeof e=="string")return e;if(KOe(e))return GOe(e,PX)+"";if(QOe(e))return p$?p$.call(e):"";var t=e+"";return t=="0"&&1/e==-ZOe?"-0":t}var XOe=PX,JOe=XOe;function eAe(e){return e==null?"":JOe(e)}var EX=eAe,tAe=wa,rAe=UO,nAe=qOe,sAe=EX;function aAe(e,t){return tAe(e)?e:rAe(e,t)?[e]:nAe(sAe(e))}var OX=aAe,iAe=Am,oAe=1/0;function lAe(e){if(typeof e=="string"||iAe(e))return e;var t=e+"";return t=="0"&&1/e==-oAe?"-0":t}var WN=lAe,cAe=OX,dAe=WN;function uAe(e,t){t=cAe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[dAe(t[r++])];return r&&r==n?e:void 0}var GO=uAe,fAe=GO;function hAe(e,t,r){var n=e==null?void 0:fAe(e,t);return n===void 0?r:n}var AX=hAe;const Ba=ur(AX);function mAe(e){return e==null}var pAe=mAe;const zt=ur(pAe);var gAe=ql,xAe=wa,vAe=Yl,yAe="[object String]";function bAe(e){return typeof e=="string"||!xAe(e)&&vAe(e)&&gAe(e)==yAe}var jAe=bAe;const Yv=ur(jAe);var DX={exports:{}},Dr={};/** 715 * @license React 716 * react-is.production.min.js 717 * 718 * Copyright (c) Facebook, Inc. and its affiliates. 719 * 720 * This source code is licensed under the MIT license found in the 721 * LICENSE file in the root directory of this source tree. 722 */var KO=Symbol.for("react.element"),QO=Symbol.for("react.portal"),VN=Symbol.for("react.fragment"),HN=Symbol.for("react.strict_mode"),qN=Symbol.for("react.profiler"),YN=Symbol.for("react.provider"),GN=Symbol.for("react.context"),wAe=Symbol.for("react.server_context"),KN=Symbol.for("react.forward_ref"),QN=Symbol.for("react.suspense"),ZN=Symbol.for("react.suspense_list"),XN=Symbol.for("react.memo"),JN=Symbol.for("react.lazy"),NAe=Symbol.for("react.offscreen"),MX;MX=Symbol.for("react.module.reference");function gi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case KO:switch(e=e.type,e){case VN:case qN:case HN:case QN:case ZN:return e;default:switch(e=e&&e.$$typeof,e){case wAe:case GN:case KN:case JN:case XN:case YN:return e;default:return t}}case QO:return t}}}Dr.ContextConsumer=GN;Dr.ContextProvider=YN;Dr.Element=KO;Dr.ForwardRef=KN;Dr.Fragment=VN;Dr.Lazy=JN;Dr.Memo=XN;Dr.Portal=QO;Dr.Profiler=qN;Dr.StrictMode=HN;Dr.Suspense=QN;Dr.SuspenseList=ZN;Dr.isAsyncMode=function(){return!1};Dr.isConcurrentMode=function(){return!1};Dr.isContextConsumer=function(e){return gi(e)===GN};Dr.isContextProvider=function(e){return gi(e)===YN};Dr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===KO};Dr.isForwardRef=function(e){return gi(e)===KN};Dr.isFragment=function(e){return gi(e)===VN};Dr.isLazy=function(e){return gi(e)===JN};Dr.isMemo=function(e){return gi(e)===XN};Dr.isPortal=function(e){return gi(e)===QO};Dr.isProfiler=function(e){return gi(e)===qN};Dr.isStrictMode=function(e){return gi(e)===HN};Dr.isSuspense=function(e){return gi(e)===QN};Dr.isSuspenseList=function(e){return gi(e)===ZN};Dr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===VN||e===qN||e===HN||e===QN||e===ZN||e===NAe||typeof e=="object"&&e!==null&&(e.$$typeof===JN||e.$$typeof===XN||e.$$typeof===YN||e.$$typeof===GN||e.$$typeof===KN||e.$$typeof===MX||e.getModuleId!==void 0)};Dr.typeOf=gi;DX.exports=Dr;var SAe=DX.exports,kAe=ql,CAe=Yl,TAe="[object Number]";function _Ae(e){return typeof e=="number"||CAe(e)&&kAe(e)==TAe}var IX=_Ae;const PAe=ur(IX);var EAe=IX;function OAe(e){return EAe(e)&&e!=+e}var AAe=OAe;const Gv=ur(AAe);var Qs=function(t){return t===0?0:t>0?1:-1},Ld=function(t){return Yv(t)&&t.indexOf("%")===t.length-1},ze=function(t){return PAe(t)&&!Gv(t)},Xn=function(t){return ze(t)||Yv(t)},DAe=0,$m=function(t){var r=++DAe;return"".concat(t||"").concat(r)},Zs=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ze(t)&&!Yv(t))return n;var i;if(Ld(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return Gv(i)&&(i=n),a&&i>r&&(i=r),i},gc=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},MAe=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},Oa=function(t,r){return ze(t)&&ze(r)?function(n){return t+n*(r-t)}:function(){return r}};function kj(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Ba(n,t))===r})}function Yf(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function ZT(e){"@babel/helpers - typeof";return ZT=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},ZT(e)}var IAe=["viewBox","children"],RAe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
722dering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],g$=["points","pathLength"],gk={svg:IAe,polygon:g$,polyline:g$},ZO=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDrag
722Capture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Cj=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(p.isValidElement(t)&&(n=t.props),!Dm(n))return null;var a={};return Object.keys(n).forEach(function(i){ZO.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},$Ae=function(t,r,n){return function(a){return t(r,n,a),null}},Tu=function(t,r,n){if(!Dm(t)||ZT(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];ZO.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=$Ae(o,r,n))}),a},LAe=["children"],FAe=["children"];function x$(e,t){if(e==null)return{};var r=BAe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function BAe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function XT(e){"@babel/helpers - typeof";return XT=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},XT(e)}var v$={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},kl=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},y$=null,xk=null,XO=function e(t){if(t===y$&&Array.isArray(xk))return xk;var r=[];return p.Children.forEach(t,function(n){zt(n)||(SAe.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),xk=r,y$=t,r};function Ua(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return kl(a)}):n=[kl(t)],XO(e).forEach(function(a){var i=Ba(a,"type.displayName")||Ba(a,"type.n
722ame");n.indexOf(i)!==-1&&r.push(a)}),r}function Ta(e,t){var r=Ua(e,t);return r&&r[0]}var b$=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!ze(n)||n<=0||!ze(a)||a<=0)},UAe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],zAe=function(t){return t&&t.type&&Yv(t.type)&&UAe.indexOf(t.type)>=0},WAe=function(t){return t&&XT(t)==="object"&&"clipDot"in t},VAe=function(t,r,n,a){var i,o=(i=gk==null?void 0:gk[a])!==null&&i!==void 0?i:[];return!Lt(t)&&(a&&o.includes(r)||RAe.includes(r))||n&&ZO.includes(r)},yt=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(p.isValidElement(t)&&(a=t.props),!Dm(a))return null;var i={};return Object.keys(a).forEach(function(o){var l;VAe((l=a)===null||l===void 0?void 0:l[o],o,r,n)&&(i[o]=a[o])}),i},JT=function e(t,r){if(t===r)return!0;var n=p.Children.count(t);if(n!==p.Children.count(r))return!1;if(n===0)return!0;if(n===1)return j$(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!j$(i,o))return!1}return!0},j$=function(t,r){if(zt(t)&&zt(r))return!0;if(!zt(t)&&!zt(r)){var n=t.props||{},a=n.children,i=x$(n,LAe),o=r.props||{},l=o.children,c=x$(o,FAe);return a&&l?Yf(i,c)&&JT(a,l):!a&&!l?Yf(i,c):!1}return!1},w$=function(t,r){var n=[],a={};return XO(t).forEach(function(i,o){if(zAe(i))n.push(i);else if(i){var l=kl(i.type),c=r[l]||{},d=c.handler,u=c.once;if(d&&(!u||!a[l])){var f=d(i,l,o);n.push(f),a[l]=!0}}}),n},HAe=function(t){var r=t&&t.type;return r&&v$[r]?v$[r]:null},qAe=function(t,r){return XO(r).indexOf(t)},YAe=["children","width","height","viewBox","className","style","title","desc"];function e_(){return e_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e_.apply(this,arguments)}function GAe(e,t){if(e==null)return{};var r=KAe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function KAe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function t_(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,l=e.title,c=e.desc,d=GAe(e,YAe),u=a||{width:r,height:n,x:0,y:0},f=ht("recharts-surface",i);return O.createElement("svg",e_({},yt(d,!0,"svg"),{className:f,width:r,height:n,style:o,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),O.createElement("title",null,l),O.createElement("desc",null,c),t)}var QAe=["children","className"];function r_(){return r_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r_.apply(this,arguments)}function ZAe(e,t){if(e==null)return{};var r=XAe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XAe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var xr=O.forwardRef(function(e,t){var r=e.children,n=e.className,a=ZAe(e,QAe),i=ht("recharts-layer",n);return O.createElement("g",r_({className:i},yt(a,!0),{ref:t}),r)}),Ui=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i]};function JAe(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var eDe=JAe,tDe=eDe;function rDe(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:tDe(e,t,r)}var nDe=rDe,sDe="\\ud800-\\udfff",aDe="\\u0300-\\u036f",iDe="\\ufe20-\\ufe2f",oDe="\\u20d0-\\u20ff",lDe=aDe+iDe+oDe,cDe="\\ufe0e\\ufe0f",dDe="\\u200d",uDe=RegExp("["+dDe+sDe+lDe+cDe+"]");function fDe(e){return uDe.test(e)}var RX=fDe;function hDe(e){return e.split("")}var mDe=hDe,$X="\\ud800-\\udfff",pDe="\\u0300-\\u036f",gDe="\\ufe20-\\ufe2f",xDe="\\u20d0-\\u20ff",vDe=pDe+gDe+xDe,yDe="\\ufe0e\\ufe0f",bDe="["+$X+"]",n_="["+vDe+"]",s_="\\ud83c[\\udffb-\\udfff]",jDe="(?:"+n_+"|"+s_+")",LX="[^"+$X+"]",FX="(?:\\ud83c[\\udde6-\\uddff]){2}",BX="[\\ud800-\\udbff][\\udc00-\\udfff]",wDe="\\u200d",UX=jDe+"?",zX="["+yDe+"]?",NDe="(?:"+wDe+"(?:"+[LX,FX,BX].join("|")+")"+zX+UX+")*",SDe=zX+UX+NDe,kDe="(?:"+[LX+n_+"?",n_,FX,BX,bDe].join("|")+")",CDe=RegExp(s_+"(?="+s_+")|"+kDe+SDe,"g");function TDe(e){return e.match(CDe)||[]}var _De=TDe,PDe=mDe,EDe=RX,ODe=_De;function ADe(e){return EDe(e)?ODe(e):PDe(e)}var DDe=ADe,MDe=nDe,IDe=RX,RDe=DDe,$De=EX;function LDe(e){return function(t){t=$De(t);var r=IDe(t)?RDe(t):void 0,n=r?r[0]:t.charAt(0),a=r?MDe(r,1).join(""):t.slice(1);return n[e]()+a}}var FDe=LDe,BDe=FDe,UDe=BDe("toUpperCase"),zDe=UDe;const e1=ur(zDe);function zr(e){return function(){return e}}const WX=Math.cos,Tj=Math.sin,Zi=Math.sqrt,_j=Math.PI,t1=2*_j,a_=Math.PI,i_=2*a_,Cd=1e-6,WDe=i_-Cd;function VX(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function VDe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return VX;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class HDe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?VX:VDe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n}
722,${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,l=this._y1,c=n-t,d=a-r,u=o-t,f=l-r,h=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>Cd)if(!(Math.abs(f*c-d*u)>Cd)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let m=n-o,g=a-l,x=c*c+d*d,v=m*m+g*g,b=Math.sqrt(x),y=Math.sqrt(h),j=i*Math.tan((a_-Math.acos((x+h-v)/(2*b*y)))/2),w=j/y,N=j/b;Math.abs(w-1)>Cd&&this._append`L${t+w*u},${r+w*f}`,this._append`A${i},${i},0,0,${+(f*m>u*g)},${this._x1=t+N*c},${this._y1=r+N*d}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(a),c=n*Math.sin(a),d=t+l,u=r+c,f=1^o,h=o?a-i:i-a;this._x1===null?this._append`M${d},${u}`:(Math.abs(this._x1-d)>Cd||Math.abs(this._y1-u)>Cd)&&this._append`L${d},${u}`,n&&(h<0&&(h=h%i_+i_),h>WDe?this._append`A${n},${n},0,1,${f},${t-l},${r-c}A${n},${n},0,1,${f},${this._x1=d},${this._y1=u}`:h>Cd&&this._append`A${n},${n},0,${+(h>=a_)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function JO(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new HDe(t)}function eA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function HX(e){this._context=e}HX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function r1(e){return new HX(e)}function qX(e){return e[0]}function YX(e){return e[1]}function GX(e,t){var r=zr(!0),n=null,a=r1,i=null,o=JO(l);e=typeof e=="function"?e:e===void 0?qX:zr(e),t=typeof t=="function"?t:t===void 0?YX:zr(t);function l(c){var d,u=(c=eA(c)).length,f,h=!1,m;
vendor: 10,797 bytes, line 722
722for(n==null&&(i=a(m=o())),d=0;d<=u;++d)!(d<u&&r(f=c[d],d,c))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(f,d,c),+t(f,d,c));if(m)return i=null,m+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:zr(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:zr(+c),l):t},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:zr(!!c),l):r},l.curve=function(c){return arguments.length?(a=c,n!=null&&(i=a(n)),l):a},l.context=function(c){return arguments.length?(c==null?n=i=null:i=a(n=c),l):n},l}function Zy(e,t,r){var n=null,a=zr(!0),i=null,o=r1,l=null,c=JO(d);e=typeof e=="function"?e:e===void 0?qX:zr(+e),t=typeof t=="function"?t:zr(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?YX:zr(+r);function d(f){var h,m,g,x=(f=eA(f)).length,v,b=!1,y,j=new Array(x),w=new Array(x);for(i==null&&(l=o(y=c())),h=0;h<=x;++h){if(!(h<x&&a(v=f[h],h,f))===b)if(b=!b)m=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),g=h-1;g>=m;--g)l.point(j[g],w[g]);l.lineEnd(),l.areaEnd()}b&&(j[h]=+e(v,h,f),w[h]=+t(v,h,f),l.point(n?+n(v,h,f):j[h],r?+r(v,h,f):w[h]))}if(y)return l=null,y+""||null}function u(){return GX().defined(a).curve(o).context(i)}return d.x=function(f){return arguments.length?(e=typeof f=="function"?f:zr(+f),n=null,d):e},d.x0=function(f){return arguments.length?(e=typeof f=="function"?f:zr(+f),d):e},d.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:zr(+f),d):n},d.y=function(f){return arguments.length?(t=typeof f=="function"?f:zr(+f),r=null,d):t},d.y0=function(f){return arguments.length?(t=typeof f=="function"?f:zr(+f),d):t},d.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:zr(+f),d):r},d.lineX0=d.lineY0=function(){return u().x(e).y(t)},d.lineY1=function(){return u().x(e).y(r)},d.lineX1=function(){return u().x(n).y(t)},d.defined=function(f){return arguments.length?(a=typeof f=="function"?f:zr(!!f),d):a},d.curve=function(f){return arguments.length?(o=f,i!=null&&(l=o(i)),d):o},d.context=function(f){return arguments.length?(f==null?i=l=null:l=o(i=f),d):i},d}class KX{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function qDe(e){return new KX(e,!0)}function YDe(e){return new KX(e,!1)}const tA={draw(e,t){const r=Zi(t/_j);e.moveTo(r,0),e.arc(0,0,r,0,t1)}},GDe={draw(e,t){const r=Zi(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},QX=Zi(1/3),KDe=QX*2,QDe={draw(e,t){const r=Zi(t/KDe),n=r*QX;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},ZDe={draw(e,t){const r=Zi(t),n=-r/2;e.rect(n,n,r,r)}},XDe=.8908130915292852,ZX=Tj(_j/10)/Tj(7*_j/10),JDe=Tj(t1/10)*ZX,eMe=-WX(t1/10)*ZX,tMe={draw(e,t){const r=Zi(t*XDe),n=JDe*r,a=eMe*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=t1*i/5,l=WX(o),c=Tj(o);e.lineTo(c*r,-l*r),e.lineTo(l*n-c*a,c*n+l*a)}e.closePath()}},vk=Zi(3),rMe={draw(e,t){const r=-Zi(t/(vk*3));e.moveTo(0,r*2),e.lineTo(-vk*r,-r),e.lineTo(vk*r,-r),e.closePath()}},qa=-.5,Ya=Zi(3)/2,o_=1/Zi(12),nMe=(o_/2+1)*3,sMe={draw(e,t){const r=Zi(t/nMe),n=r/2,a=r*o_,i=n,o=r*o_+r,l=-i,c=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(l,c),e.lineTo(qa*n-Ya*a,Ya*n+qa*a),e.lineTo(qa*i-Ya*o,Ya*i+qa*o),e.lineTo(qa*l-Ya*c,Ya*l+qa*c),e.lineTo(qa*n+Ya*a,qa*a-Ya*n),e.lineTo(qa*i+Ya*o,qa*o-Ya*i),e.lineTo(qa*l+Ya*c,qa*c-Ya*l),e.closePath()}};function aMe(e,t){let r=null,n=JO(a);e=typeof e=="function"?e:zr(e||tA),t=typeof t=="function"?t:zr(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:zr(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:zr(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Pj(){}function Ej(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function XX(e){this._context=e}XX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ej(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ej(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iMe(e){return new XX(e)}function JX(e){this._context=e}JX.prototype={areaStart:Pj,areaEnd:Pj,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ej(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oMe(e){return new JX(e)}function eJ(e){this._context=e}eJ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ej(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lMe(e){return new eJ(e)}function tJ(e){this._context=e}tJ.prototype={areaStart:Pj,areaEnd:Pj,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function cMe(e){return new tJ(e)}function N$(e){return e<0?-1:1}function S$(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),l=(i*a+o*n)/(n+a);return(N$(i)+N$(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(l))||0}function k$(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function yk(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,l=(i-n)/3;e._context.bezierCurveTo(n+l,a+l*t,i-l,o-l*r,i,o)}function Oj(e){this._context=e}Oj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:yk(this,this._t0,k$(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,yk(this,k$(this,r=S$(this,e,t)),r);break;default:yk(this,this._t0,r=S$(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function rJ(e){this._context=new nJ(e)}(rJ.prototype=Object.create(Oj.prototype)).point=function(e,t){Oj.prototype.point.call(this,t,e)};function nJ(e){this._context=e}nJ.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function dMe(e){return new Oj(e)}function uMe(e){return new rJ(e)}function sJ(e){this._context=e}sJ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=C$(e),a=C$(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function C$(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function fMe(e){return new sJ(e)}function n1(e,t){this._context=e,this._t=t}n1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 10,485 bytes, lines 722-725
722default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function hMe(e){return new n1(e,.5)}function mMe(e){return new n1(e,0)}function pMe(e){return new n1(e,1)}function Uh(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,l=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<l;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function l_(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function gMe(e,t){return e[t]}function xMe(e){const t=[];return t.key=e,t}function vMe(){var e=zr([]),t=l_,r=Uh,n=gMe;function a(i){var o=Array.from(e.apply(this,arguments),xMe),l,c=o.length,d=-1,u;for(const f of i)for(l=0,++d;l<c;++l)(o[l][d]=[0,+n(f,o[l].key,d,i)]).data=f;for(l=0,u=eA(t(o));l<c;++l)o[u[l]].index=l;return r(o,u),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:zr(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:zr(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?l_:typeof i=="function"?i:zr(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??Uh,a):r},a}function yMe(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}Uh(e,t)}}function bMe(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,l=0;o<a;++o)l+=e[o][r][1]||0;n[r][1]+=n[r][0]=-l/2}Uh(e,t)}}function jMe(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var l=0,c=0,d=0;l<o;++l){for(var u=e[t[l]],f=u[n][1]||0,h=u[n-1][1]||0,m=(f-h)/2,g=0;g<l;++g){var x=e[t[g]],v=x[n][1]||0,b=x[n-1][1]||0;m+=v-b}c+=f,d+=m*f}a[n-1][1]+=a[n-1][0]=r,c&&(r-=d/c)}a[n-1][1]+=a[n-1][0]=r,Uh(e,t)}}function bx(e){"@babel/helpers - typeof";return bx=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},bx(e)}var wMe=["type","size","sizeType"];function c_(){return c_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c_.apply(this,arguments)}function T$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T$(Object(r),!0).forEach(function(n){NMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NMe(e,t,r){return t=SMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SMe(e){var t=kMe(e,"string");return bx(t)=="symbol"?t:t+""}function kMe(e,t){if(bx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CMe(e,t){if(e==null)return{};var r=TMe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TMe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var aJ={symbolCircle:tA,symbolCross:GDe,symbolDiamond:QDe,symbolSquare:ZDe,symbolStar:tMe,symbolTriangle:rMe,symbolWye:sMe},_Me=Math.PI/180,PMe=function(t){var r="symbol".concat(e1(t));return aJ[r]||tA},EMe=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*_Me;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},OMe=function(t,r){aJ["symbol".concat(e1(t))]=r},rA=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,l=o===void 0?"area":o,c=CMe(t,wMe),d=_$(_$({},c),{},{type:n,size:i,sizeType:l}),u=function(){var v=PMe(n),b=aMe().type(v).size(EMe(i,l,n));return b()},f=d.className,h=d.cx,m=d.cy,g=yt(d,!0);return h===+h&&m===+m&&i===+i?O.createElement("path",c_({},g,{className:ht("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(m,")"),d:u()})):null};rA.registerSymbol=OMe;function zh(e){"@babel/helpers - typeof";return zh=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},zh(e)}function d_(){return d_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d_.apply(this,arguments)}function P$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function AMe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P$(Object(r),!0).forEach(function(n){jx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MMe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,oJ(n.key),n)}}function IMe(e,t,r){return t&&MMe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function RMe(e,t,r){return t=Aj(t),$Me(e,iJ()?Reflect.construct(t,r||[],Aj(e).constructor):t.apply(e,r))}function $Me(e,t){if(t&&(zh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LMe(e)}function LMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iJ=function(){return!!e})()}function Aj(e){return Aj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Aj(e)}function FMe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u_(e,t)}function u_(e,t){return u_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},u_(e,t)}function jx(e,t,r){return t=oJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oJ(e){var t=BMe(e,"string");return zh(t)=="symbol"?t:t+""}function BMe(e,t){if(zh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ga=32,nA=function(e){function t(){return DMe(this,t),RMe(this,t,arguments)}return FMe(t,e),IMe(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=Ga/2,o=Ga/6,l=Ga/3,c=n.inactive?a:n.color;if(n.type==="plainline")return O.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:Ga,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return O.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,` 723 A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,` 724 H`).concat(Ga,"M").concat(2*l,",").concat(i,` 725 A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return O.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Ga/8,"h").concat(Ga,"v").concat(Ga*3/4,"h").concat(-Ga,"z"),className:"recharts-legend-icon"});if(O.isValidElement(n.legendIcon)){var d=AMe({},n);return delete d.legendIcon,O.cloneElement(n.legendIcon,d)}return O.createElement(rA,{fill:c,cx:i,cy:i,size:Ga,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,l=a.layout,c=a.formatter,d=a.inactiveColor,u={x:0,y:0,width:Ga,height:Ga},f={display:l==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(m,g){var x=m.formatter||c,v=ht(jx(jx({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",m.inactive));if(m.type==="none")return null;var b=Lt(m.value)?null:m.value;Ui(!Lt(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var y=m.inactive?d:m.color;return O.createElement("li",d_({className:v,style:f,key:"legend-item-".concat(g)},Tu(n.props,m,g)),O.createElement(t_,{width:o,height:o,viewBox:u,style:h},n.renderIcon(m)),O.createElement("span",{className:"recharts-legend-item-text",style:{color:y}},x?x(b,m,g):b))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return O.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])}(p.PureComponent);jx(nA,"displayName","Legend");jx(nA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var UMe=UN;function zMe(){this.__data__=new UMe,this.size=0}var WMe=zMe;
vendor: 4,708 bytes, line 725
725function VMe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var HMe=VMe;function qMe(e){return this.__data__.get(e)}var YMe=qMe;function GMe(e){return this.__data__.has(e)}var KMe=GMe,QMe=UN,ZMe=VO,XMe=HO,JMe=200;function eIe(e,t){var r=this.__data__;if(r instanceof QMe){var n=r.__data__;if(!ZMe||n.length<JMe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new XMe(n)}return r.set(e,t),this.size=r.size,this}var tIe=eIe,rIe=UN,nIe=WMe,sIe=HMe,aIe=YMe,iIe=KMe,oIe=tIe;function Lm(e){var t=this.__data__=new rIe(e);this.size=t.size}Lm.prototype.clear=nIe;Lm.prototype.delete=sIe;Lm.prototype.get=aIe;Lm.prototype.has=iIe;Lm.prototype.set=oIe;var lJ=Lm,lIe="__lodash_hash_undefined__";function cIe(e){return this.__data__.set(e,lIe),this}var dIe=cIe;function uIe(e){return this.__data__.has(e)}var fIe=uIe,hIe=HO,mIe=dIe,pIe=fIe;function Dj(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new hIe;++t<r;)this.add(e[t])}Dj.prototype.add=Dj.prototype.push=mIe;Dj.prototype.has=pIe;var cJ=Dj;function gIe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var dJ=gIe;function xIe(e,t){return e.has(t)}var uJ=xIe,vIe=cJ,yIe=dJ,bIe=uJ,jIe=1,wIe=2;function NIe(e,t,r,n,a,i){var o=r&jIe,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var d=i.get(e),u=i.get(t);if(d&&u)return d==t&&u==e;var f=-1,h=!0,m=r&wIe?new vIe:void 0;for(i.set(e,t),i.set(t,e);++f<l;){var g=e[f],x=t[f];if(n)var v=o?n(x,g,f,t,e,i):n(g,x,f,e,t,i);if(v!==void 0){if(v)continue;h=!1;break}if(m){if(!yIe(t,function(b,y){if(!bIe(m,y)&&(g===b||a(g,b,r,n,i)))return m.push(y)})){h=!1;break}}else if(!(g===x||a(g,x,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var fJ=NIe,SIe=Ho,kIe=SIe.Uint8Array,CIe=kIe;function TIe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var _Ie=TIe;function PIe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var sA=PIe,E$=qv,O$=CIe,EIe=WO,OIe=fJ,AIe=_Ie,DIe=sA,MIe=1,IIe=2,RIe="[object Boolean]",$Ie="[object Date]",LIe="[object Error]",FIe="[object Map]",BIe="[object Number]",UIe="[object RegExp]",zIe="[object Set]",WIe="[object String]",VIe="[object Symbol]",HIe="[object ArrayBuffer]",qIe="[object DataView]",A$=E$?E$.prototype:void 0,bk=A$?A$.valueOf:void 0;function YIe(e,t,r,n,a,i,o){switch(r){case qIe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case HIe:return!(e.byteLength!=t.byteLength||!i(new O$(e),new O$(t)));case RIe:case $Ie:case BIe:return EIe(+e,+t);case LIe:return e.name==t.name&&e.message==t.message;case UIe:case WIe:return e==t+"";case FIe:var l=AIe;case zIe:var c=n&MIe;if(l||(l=DIe),e.size!=t.size&&!c)return!1;var d=o.get(e);if(d)return d==t;n|=IIe,o.set(e,t);var u=OIe(l(e),l(t),n,a,i,o);return o.delete(e),u;case VIe:if(bk)return bk.call(e)==bk.call(t)}return!1}var GIe=YIe;function KIe(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var hJ=KIe,QIe=hJ,ZIe=wa;function XIe(e,t,r){var n=t(e);return ZIe(e)?n:QIe(n,r(e))}var JIe=XIe;function e4e(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}var t4e=e4e;function r4e(){return[]}var n4e=r4e,s4e=t4e,a4e=n4e,i4e=Object.prototype,o4e=i4e.propertyIsEnumerable,D$=Object.getOwnPropertySymbols,l4e=D$?function(e){return e==null?[]:(e=Object(e),s4e(D$(e),function(t){return o4e.call(e,t)}))}:a4e,c4e=l4e;function d4e(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var u4e=d4e,f4e=ql,h4e=Yl,m4e="[object Arguments]";function p4e(e){return h4e(e)&&f4e(e)==m4e}var g4e=p4e,M$=g4e,x4e=Yl,mJ=Object.prototype,v4e=mJ.hasOwnProperty,y4e=mJ.propertyIsEnumerable,b4e=M$(function(){return arguments}())?M$:function(e){return x4e(e)&&v4e.call(e,"callee")&&!y4e.call(e,"callee")},aA=b4e,Mj={exports:{}};function j4e(){return!1}var w4e=j4e;Mj.exports;(function(e,t){var r=Ho,n=w4e,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,l=o?r.Buffer:void 0,c=l?l.isBuffer:void 0,d=c||n;e.exports=d})(Mj,Mj.exports);var pJ=Mj.exports,N4e=9007199254740991,S4e=/^(?:0|[1-9]\d*)$/;function k4e(e,t){var r=typeof e;return t=t??N4e,!!t&&(r=="number"||r!="symbol"&&S4e.test(e))&&e>-1&&e%1==0&&e<t}var iA=k4e,C4e=9007199254740991;function T4e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=C4e}var oA=T4e,_4e=ql,P4e=oA,E4e=Yl,O4e="[object Arguments]",A4e="[object Array]",D4e="[object Boolean]",M4e="[object Date]",I4e="[object Error]",R4e="[object Function]",$4e="[object Map]",L4e="[object Number]",F4e="[object Object]",B4e="[object RegExp]",U4e="[object Set]",z4e="[object String]",W4e="[object WeakMap]",V4e="[object ArrayBuffer]",H4e="[object DataView]",q4e="[object Float32Array]",Y4e="[object Float64Array
725]",G4e="[object Int8Array]",K4e="[object Int16Array]",Q4e="[object Int32Array]",Z4e="[object Uint8Array]",X4e="[object Uint8ClampedArray]",J4e="[object Uint16Array]",eRe="[object Uint32Array]",Kr={};Kr[q4e]=Kr[Y4e]=Kr[G4e]=Kr[K4e]=Kr[Q4e]=Kr[Z4e]=Kr[X4e]=Kr[J4e]=Kr[eRe]=!0;Kr[O4e]=Kr[A4e]=Kr[V4e]=Kr[D4e]=Kr[H4e]=Kr[M4e]=Kr[I4e]=Kr[R4e]=Kr[$4e]=Kr[L4e]=Kr[F4e]=Kr[B4e]=Kr[U4e]=Kr[z4e]=Kr[W4e]=!1;function tRe(e){return E4e(e)&&P4e(e.length)&&!!Kr[_4e(e)]}var rRe=tRe;function nRe(e){return function(t){return e(t)}}var gJ=nRe,Ij={exports:{}};Ij.exports;(function(e,t){var r=SX,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,l=function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(Ij,Ij.exports);var sRe=Ij.exports,aRe=rRe,iRe=gJ,I$=sRe,R$=I$&&I$.isTypedArray,oRe=R$?iRe(R$):aRe,xJ=oRe,lRe=u4e,cRe=aA,dRe=wa,uRe=pJ,fRe=iA,hRe=xJ,mRe=Object.prototype,pRe=mRe.hasOwnProperty;function gRe(e,t){var r=dRe(e),n=!r&&cRe(e),a=!r&&!n&&uRe(e),i=!r&&!n&&!a&&hRe(e),o=r||n||a||i,l=o?lRe(e.length,String):[],c=l.length;for(var d in e)(t||pRe.call(e,d))&&!(o&&(d=="length"||a&&(d=="offset"||d=="parent")||i&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||fRe(d,c)))&&l.push(d);return l}var xRe=gRe,vRe=Object.prototype;function yRe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||vRe;return e===r}var bRe=yRe;function jRe(e,t){return function(r){return e(t(r))}}var vJ=jRe,wRe=vJ,NRe=wRe(Object.keys,Object),SRe=NRe,kRe=bRe,CRe=SRe,TRe=Object.prototype,_Re=TRe.hasOwnProperty;function PRe(e){if(!kRe(e))return CRe(e);var t=[];for(var r in Object(e))_Re.call(e,r)&&r!="constructor"&&t.push(r);return t}var ERe=PRe,ORe=zO,ARe=oA;function DRe(e){return e!=null&&ARe(e.length)&&!ORe(e)}var Kv=DRe,MRe=xRe,IRe=ERe,RRe=Kv;function $Re(e){return RRe(e)?MRe(e):IRe(e)}var s1=$Re,LRe=JIe,FRe=c4e,BRe=s1;function URe(e){return LRe(e,BRe,FRe)}var zRe=URe,$$=zRe,WRe=1,VRe=Object.prototype,HRe=VRe.hasOwnProperty;function qRe(e,t,r,n,a,i){var o=r&WRe,l=$$(e),c=l.length,d=$$(t),u=d.length;if(c!=u&&!o)return!1;for(var f=c;f--;){var h=l[f];if(!(o?h in t:HRe.call(t,h)))return!1}var m=i.get(e),g=i.get(t);if(m&&g)return m==t&&g==e;var x=!0;i.set(e,t),i.set(t,e);for(var v=o;++f<c;){h=l[f];var b=e[h],y=t[h];if(n)var j=o?n(y,b,h,t,e,i):n(b,y,h,e,t,i);if(!(j===void 0?b===y||a(b,y,r,n,i):j)){x=!1;break}v||(v=h=="constructor")}if(x&&!v){var w=e.constructor,N=t.constructor;w!=N&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof N=="function"&&N instanceof N)&&(x=!1)}return i.delete(e),i.delete(t),x}var YRe=qRe,GRe=Uu,KRe=Ho,QRe=GRe(KRe,"DataView"),ZRe=QRe,XRe=Uu,JRe=Ho,e$e=XRe(JRe,"Promise"),t$e=e$e,r$e=Uu,n$e=Ho,s$e=r$e(n$e,"Set"),yJ=s$e,a$e=Uu,i$e=Ho,o$e=a$e(i$e,"WeakMap"),l$e=o$e,f_=ZRe,h_=VO,m_=t$e,p_=yJ,g_=l$e,bJ=ql,Fm=CX,L$="[object Map]",c$e="[object Object]",F$="[object Promise]",B$="[object Set]",U$="[object WeakMap]",z$="[object DataView]",d$e=Fm(f_),u$e=Fm(h_),f$e=Fm(m_),h$e=Fm(p_),m$e=Fm(g_),Td=bJ;(f_&&Td(new f_(new ArrayBuffer(1)))!=z$||h_&&Td(new h_)!=L$||m_&&Td(m_.resolve())!=F$||p_&&Td(new p_)!=B$||g_&&Td(new g_)!=U$)&&(Td=function(e){var t=bJ(e),r=t==c$e?e.constructor:void 0,n=r?Fm(r):"";if(n)switch(n){case d$e:return z$;case u$e:return L$;case f$e:return F$;case h$e:return B$;case m$e:return U$}return t});var p$e=Td,jk=lJ,g$e=fJ,x$e=GIe,v$e=YRe,W$=p$e,V$=wa,H$=pJ,y$e=xJ,b$e=1,q$="[object Arguments]",Y$="[object Array]",Xy="[object Object]",j$e=Object.prototype,G$=j$e.hasOwnProperty;function w$e(e,t,r,n,a,i){var o=V$(e),l=V$(t),c=o?Y$:W$(e),d=l?Y$:W$(t);c=c==q$?Xy:c,d=d==q$?Xy:d;var u=c==Xy,f=d==Xy,h=c==d;if(h&&H$(e)){if(!H$(t))return!1;o=!0,u=!1}if(h&&!u)return i||(i=new jk),o||y$e(e)?g$e(e,t,r,n,a,i):x$e(e,t,c,r,n,a,i);if(!(r&b$e)){var m=u&&G$.call(e,"__wrapped__"),g=f&&G$.call(t,"__wrapped__");
vendor: 4,112 bytes, line 725
725if(m||g){var x=m?e.value():e,v=g?t.value():t;return i||(i=new jk),a(x,v,r,n,i)}}return h?(i||(i=new jk),v$e(e,t,r,n,a,i)):!1}var N$e=w$e,S$e=N$e,K$=Yl;function jJ(e,t,r,n,a){return e===t?!0:e==null||t==null||!K$(e)&&!K$(t)?e!==e&&t!==t:S$e(e,t,r,n,jJ,a)}var lA=jJ,k$e=lJ,C$e=lA,T$e=1,_$e=2;function P$e(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var l=r[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<i;){l=r[a];var c=l[0],d=e[c],u=l[1];if(o&&l[2]){if(d===void 0&&!(c in e))return!1}else{var f=new k$e;if(n)var h=n(d,u,c,e,t,f);if(!(h===void 0?C$e(u,d,T$e|_$e,n,f):h))return!1}}return!0}var E$e=P$e,O$e=md;function A$e(e){return e===e&&!O$e(e)}var wJ=A$e,D$e=wJ,M$e=s1;function I$e(e){for(var t=M$e(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,D$e(a)]}return t}var R$e=I$e;function $$e(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var NJ=$$e,L$e=E$e,F$e=R$e,B$e=NJ;function U$e(e){var t=F$e(e);return t.length==1&&t[0][2]?B$e(t[0][0],t[0][1]):function(r){return r===e||L$e(r,e,t)}}var z$e=U$e;function W$e(e,t){return e!=null&&t in Object(e)}var V$e=W$e,H$e=OX,q$e=aA,Y$e=wa,G$e=iA,K$e=oA,Q$e=WN;function Z$e(e,t,r){t=H$e(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=Q$e(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&K$e(a)&&G$e(o,a)&&(Y$e(e)||q$e(e)))}var X$e=Z$e,J$e=V$e,eLe=X$e;function tLe(e,t){return e!=null&&eLe(e,t,J$e)}var rLe=tLe,nLe=lA,sLe=AX,aLe=rLe,iLe=UO,oLe=wJ,lLe=NJ,cLe=WN,dLe=1,uLe=2;function fLe(e,t){return iLe(e)&&oLe(t)?lLe(cLe(e),t):function(r){var n=sLe(r,e);return n===void 0&&n===t?aLe(r,e):nLe(t,n,dLe|uLe)}}var hLe=fLe;function mLe(e){return e}var Bm=mLe;function pLe(e){return function(t){return t==null?void 0:t[e]}}var gLe=pLe,xLe=GO;function vLe(e){return function(t){return xLe(t,e)}}var yLe=vLe,bLe=gLe,jLe=yLe,wLe=UO,NLe=WN;function SLe(e){return wLe(e)?bLe(NLe(e)):jLe(e)}var kLe=SLe,CLe=z$e,TLe=hLe,_Le=Bm,PLe=wa,ELe=kLe;function OLe(e){return typeof e=="function"?e:e==null?_Le:typeof e=="object"?PLe(e)?TLe(e[0],e[1]):CLe(e):ELe(e)}var qo=OLe;function ALe(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var SJ=ALe;function DLe(e){return e!==e}var MLe=DLe;function ILe(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var RLe=ILe,$Le=SJ,LLe=MLe,FLe=RLe;function BLe(e,t,r){return t===t?FLe(e,t,r):$Le(e,LLe,r)}var ULe=BLe,zLe=ULe;function WLe(e,t){var r=e==null?0:e.length;return!!r&&zLe(e,t,0)>-1}var VLe=WLe;function HLe(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var qLe=HLe;function YLe(){}var GLe=YLe,wk=yJ,KLe=GLe,QLe=sA,ZLe=1/0,XLe=wk&&1/QLe(new wk([,-0]))[1]==ZLe?function(e){return new wk(e)}:KLe,JLe=XLe,e3e=cJ,t3e=VLe,r3e=qLe,n3e=uJ,s3e=JLe,a3e=sA,i3e=200;function o3e(e,t,r){var n=-1,a=t3e,i=e.length,o=!0,l=[],c=l;if(r)o=!1,a=r3e;else if(i>=i3e){var d=t?null:s3e(e);if(d)return a3e(d);o=!1,a=n3e,c=new e3e}else c=t?[]:l;e:for(;++n<i;){var u=e[n],f=t?t(u):u;if(u=r||u!==0?u:0,o&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;t&&c.push(f),l.push(u)}else a(c,f,r)||(c!==l&&c.push(f),l.push(u))}return l}var l3e=o3e,c3e=qo,d3e=l3e;function u3e(e,t){return e&&e.length?d3e(e,c3e(t)):[]}var f3e=u3e;const Q$=ur(f3e);function kJ(e,t,r){return t===!0?Q$(e,r):Lt(t)?Q$(e,t):e}function Wh(e){"@babel/helpers - typeof";return Wh=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},Wh(e)}var h3e=["ref"];function Z$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Z$(Object(r),!0).forEach(function(n){a1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z$(Object(r)).forEac
vendor: 4,282 bytes, line 725
725h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function m3e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,TJ(n.key),n)}}function p3e(e,t,r){return t&&X$(e.prototype,t),r&&X$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g3e(e,t,r){return t=Rj(t),x3e(e,CJ()?Reflect.construct(t,r||[],Rj(e).constructor):t.apply(e,r))}function x3e(e,t){if(t&&(Wh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v3e(e)}function v3e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CJ=function(){return!!e})()}function Rj(e){return Rj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Rj(e)}function y3e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x_(e,t)}function x_(e,t){return x_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},x_(e,t)}function a1(e,t,r){return t=TJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TJ(e){var t=b3e(e,"string");return Wh(t)=="symbol"?t:t+""}function b3e(e,t){if(Wh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j3e(e,t){if(e==null)return{};var r=w3e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function w3e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function N3e(e){return e.value}function S3e(e,t){if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return O.createElement(e,t);t.ref;var r=j3e(t,h3e);return O.createElement(nA,r)}var J$=1,Gf=function(e){function t(){var r;m3e(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=g3e(this,t,[].concat(a)),a1(r,"lastBoundingBox",{width:-1,height:-1}),r}return y3e(t,e),p3e(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>J$||Math.abs(a.height-this.lastBoundingBox.height)>J$)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Jo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,l=a.verticalAlign,c=a.margin,d=a.chartWidth,u=a.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var m=this.getBBoxSnapshot();f={left:((d||0)-m.width)/2}}else f=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var g=this.getBBoxSnapsh
725ot();h={top:((u||0)-g.height)/2}}else h=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Jo(Jo({},f),h)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,l=a.height,c=a.wrapperStyle,d=a.payloadUniqBy,u=a.payload,f=Jo(Jo({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return O.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(m){n.wrapperNode=m}},S3e(i,Jo(Jo({},this.props),{},{payload:kJ(u,d,N3e)})))}}],[{key:"getWithHeight",value:function(n,a){var i=Jo(Jo({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&ze(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(p.PureComponent);a1(Gf,"displayName","Legend");a1(Gf,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var eL=qv,k3e=aA,C3e=wa,tL=eL?eL.isConcatSpreadable:void 0;function T3e(e){return C3e(e)||k3e(e)||!!(tL&&e&&e[tL])}var _3e=T3e,P3e=hJ,E3e=_3e;function _J(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=E3e),a||(a=[]);++i<o;){var l=e[i];t>0&&r(l)?t>1?_J(l,t-1,r,n,a):P3e(a,l):n||(a[a.length]=l)}return a}var PJ=_J;function O3e(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),l=o.length;l--;){var c=o[e?l:++a];if(r(i[c],c,i)===!1)break}return t}}var A3e=O3e,D3e=A3e,M3e=D3e(),I3e=M3e,R3e=I3e,$3e=s1;function L3e(e,t){return e&&R3e(e,t,$3e)}var EJ=L3e,F3e=Kv;function B3e(e,t){return function(r,n){if(r==null)return r;if(!F3e(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=Object(r);(t?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var U3e=B3e,z3e=EJ,W3e=U3e,V3e=W3e(z3e),cA=V3e,H3e=cA,q3e=Kv;function Y3e(e,t){var r=-1,n=q3e(e)?Array(e.length):[];return H3e(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var OJ=Y3e;function G3e(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var K3e=G3e,rL=Am;function Q3e(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=rL(e),o=t!==void 0,l=t===null,c=t===t,d=rL(t);if(!l&&!d&&!i&&e>t||i&&o&&c&&!l&&!d||n&&o&&c||!r&&c||!a)return 1;if(!n&&!i&&!d&&e<t||d&&r&&a&&!n&&!i||l&&r&&a||!o&&a||!c)return-1}return 0}var Z3e=Q3e,X3e=Z3e;function J3e(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,l=r.length;++n<o;){var c=X3e(a[n],i[n]);if(c){if(n>=l)return c;var d=r[n];return c*(d=="desc"?-1:1)}}return e.index-t.index}var eFe=J3e,Nk=YO,tFe=GO,rFe=qo,nFe=OJ,sFe=K3e,aFe=gJ,iFe=eFe,oFe=Bm,lFe=wa;function cFe(e,t,r){t.length?t=Nk(t,function(i){return lFe(i)?function(o){return tFe(o,i.length===1?i[0]:i)}:i}):t=[oFe];var n=-1;t=Nk(t,aFe(rFe));var a=nFe(e,function(i,o,l){var c=Nk(t,function(d){return d(i)});return{criteria:c,index:++n,value:i}});return sFe(a,function(i,o){return iFe(i,o,r)})}var dFe=cFe;function uFe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var fFe=uFe,hFe=fFe,nL=Math.max;function mFe(e,t,r){return t=nL(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=nL(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=n[a];return l[t]=r(o),hFe(e,this,l)}}var pFe=mFe;function gFe(e){return function(){return e}}var xFe=gFe,vFe=Uu,yFe=function(){try{var e=vFe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),AJ=yFe,bFe=xFe,sL=AJ,jFe=Bm,wFe=sL?function(e,t){return sL(e,"toString",{configurable:!0,enumerable:!1,value:bFe(t),writable:!0})}:jFe,NFe=wFe,SFe=800,kFe=16,CFe=Date.now;function TFe(e){var t=0,r=0;return function(){var n=CFe(),a=kFe-(n-r);if(r=n,a>0){if(++t>=SFe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var _Fe=TFe,PFe=NFe,EFe=_Fe,OFe=EFe(PFe),AFe=OFe,DFe=Bm,MFe=pFe,IFe=AFe;function RFe(e,t){return IFe(MFe(e,t,DFe),e+"")}var $Fe=RFe,LFe=WO,FFe=Kv,BFe=iA,UFe=md;function zFe(e,t,r){if(!UFe(r))return!1;var n=typeof t;return(n=="number"?FFe(r)&&BFe(t,r.length):n=="string"&&t in r)?LFe(r[t],e):!1}var i1=zFe,WFe=PJ,VFe=dFe,HFe=$Fe,aL=i1,qFe=HFe(function(e,t){if(e==null)return[];var r=t.length;return r>1&&aL(e,t[0],t[1])?t=[]:r>2&&aL(t[0],t[1],t[2])&&(t=[t[0]]),VFe(e,WFe(t,1),[])}),YFe=qFe;const dA=ur(YFe);function wx(e){"@babel/helpers - typeof";return wx=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},wx(e)}function v_(){return v_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 10,743 bytes, lines 725-726
725for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v_.apply(this,arguments)}function GFe(e,t){return XFe(e)||ZFe(e,t)||QFe(e,t)||KFe()}function KFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 726In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QFe(e,t){if(e){if(typeof e=="string")return iL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iL(e,t)}}function iL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ZFe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function XFe(e){if(Array.isArray(e))return e}function oL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Sk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oL(Object(r),!0).forEach(function(n){JFe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JFe(e,t,r){return t=e5e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e5e(e){var t=t5e(e,"string");return wx(t)=="symbol"?t:t+""}function t5e(e,t){if(wx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r5e(e){return Array.isArray(e)&&Xn(e[0])&&Xn(e[1])?e.join(" ~ "):e}var n5e=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,d=c===void 0?{}:c,u=t.payload,f=t.formatter,h=t.itemSorter,m=t.wrapperClassName,g=t.labelClassName,x=t.label,v=t.labelFormatter,b=t.accessibilityLayer,y=b===void 0?!1:b,j=function(){if(u&&u.length){var _={padding:0,margin:0},I=(h?dA(u,h):u).map(function(F,H){if(F.type==="none")return null;var W=Sk({display:"block",paddingTop:4,paddingBottom:4,color:F.color||"#000"},l),z=F.formatter||f||r5e,R=F.value,q=F.name,V=R,se=q;if(z&&V!=null&&se!=null){var oe=z(R,q,F,H,u);if(Array.isArray(oe)){var _e=GFe(oe,2);V=_e[0],se=_e[1]}else V=oe}return O.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(H),style:W},Xn(se)?O.createElement("span",{className:"recharts-tooltip-item-name"},se):null,Xn(se)?O.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,O.createElement("span",{className:"recharts-tooltip-item-value"},V),O.createElement("span",{className:"recharts-tooltip-item-unit"},F.unit||""))});return O.createElement("ul",{className:"recharts-tooltip-item-list",style:_},I)}return null},w=Sk({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),N=Sk({margin:0},d),S=!zt(x),k=S?x:"",T=ht("recharts-default-tooltip",m),C=ht("recharts-tooltip-label",g);S&&v&&u!==void 0&&u!==null&&(k=v(x,u));var E=y?{role:"status","aria-live":"assertive"}:{};return O.createElement("div",v_({className:T,style:w},E),O.createElement("p",{className:C,style:N},O.isValidElement(k)?k:"".concat(k)),j())};function Nx(e){"@babel/helpers - typeof";return Nx=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},Nx(e)}function Jy(e,t,r){return t=s5e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s5e(e){var t=a5e(e,"string");return Nx(t)=="symbol"?t:t+""}function a5e(e,t){if(Nx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Nx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sp="recharts-tooltip-wrapper",i5e={visibility:"hidden"};function o5e(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ht(Sp,Jy(Jy(Jy(Jy({},"".concat(Sp,"-right"),ze(r)&&t&&ze(t.x)&&r>=t.x),"".concat(Sp,"-left"),ze(r)&&t&&ze(t.x)&&r<t.x),"".concat(Sp,"-bottom"),ze(n)&&t&&ze(t.y)&&n>=t.y),"".concat(Sp,"-top"),ze(n)&&t&&ze(t.y)&&n<t.y))}function lL(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,d=e.viewBoxDimension;if(i&&ze(i[n]))return i[n];var u=r[n]-l-a,f=r[n]+a;if(t[n])return o[n]?u:f;if(o[n]){var h=u,m=c[n];return h<m?Math.max(f,c[n]):Math.max(u,c[n])}var g=f+l,x=c[n]+d;return g>x?Math.max(u,c[n]):Math.max(f,c[n])}function l5e(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function c5e(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,d,u,f;return o.height>0&&o.width>0&&r?(u=lL({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),f=lL({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),d=l5e({translateX:u,translateY:f,useTranslate3d:l})):d=i5e,{cssProperties:d,cssClasses:o5e({translateX:u,translateY:f,coordinate:r})}}function Vh(e){"@babel/helpers - typeof";return Vh=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},Vh(e)}function cL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function dL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cL(Object(r),!0).forEach(function(n){b_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u5e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,MJ(n.key),n)}}function f5e(e,t,r){return t&&u5e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function h5e(e,t,r){return t=$j(t),m5e(e,DJ()?Reflect.construct(t,r||[],$j(e).constructor):t.apply(e,r))}function m5e(e,t){if(t&&(Vh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p5e(e)}function p5e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DJ=function(){return!!e})()}function $j(e){return $j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$j(e)}function g5e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y_(e,t)}function y_(e,t){return y_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},y_(e,t)}function b_(e,t,r){return t=MJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MJ(e){var t=x5e(e,"string");return Vh(t)=="symbol"?t:t+""}function x5e(e,t){if(Vh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uL=1,v5e=function(e){function t(){var r;d5e(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=h5e(this,t,[].concat(a)),b_(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),b_(r,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,d,u;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(d=(u=r.props.coordinate)===null||u===void 0?void 0:u.y)!==null&&d!==void 0?d:0}})}}),r}return g5e(t,e),f5e(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>uL||Math.abs(n.height-this.state.lastBoundingBox.height)>uL)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,d=a.children,u=a.coordinate,f=a.hasPayload,h=a.isAnimationActive,m=a.offset,g=a.position,x=a.reverseDirection,v=a.useTranslate3d,b=a.viewB
726ox,y=a.wrapperStyle,j=c5e({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:m,position:g,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:b}),w=j.cssClasses,N=j.cssProperties,S=dL(dL({transition:h&&i?"transform ".concat(l,"ms ").concat(c):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},y);return O.createElement("div",{tabIndex:-1,className:w,style:S,ref:function(T){n.wrapperNode=T}},d)}}])}(p.PureComponent),y5e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Mo={isSsr:y5e(),get:function(t){return Mo[t]},set:function(t,r){if(typeof t=="string")Mo[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(a){Mo[a]=t[a]})}}};function Hh(e){"@babel/helpers - typeof";return Hh=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},Hh(e)}function fL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fL(Object(r),!0).forEach(function(n){uA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b5e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j5e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,RJ(n.key),n)}}function w5e(e,t,r){return t&&j5e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N5e(e,t,r){return t=Lj(t),S5e(e,IJ()?Reflect.construct(t,r||[],Lj(e).constructor):t.apply(e,r))}function S5e(e,t){if(t&&(Hh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k5e(e)}function k5e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IJ=function(){return!!e})()}function Lj(e){return Lj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lj(e)}function C5e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j_(e,t)}function j_(e,t){return j_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},j_(e,t)}function uA(e,t,r){return t=RJ(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RJ(e){var t=T5e(e,"string");return Hh(t)=="symbol"?t:t+""}function T5e(e,t){if(Hh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _5e(e){return e.dataKey}function P5e(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement(n5e,t)}var _a=function(e){function t(){return b5e(this,t),N5e(this,t,arguments)}return C5e(t,e),w5e(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,d=a.content,u=a.coordinate,f=a.filterNull,h=a.isAnimationActive,m=a.offset,g=a.payload,x=a.payloadUniqBy,v=a.position,b=a.reverseDirection,y=a.useTranslate3d,j=a.viewBox,w=a.wrapperStyle,N=g??[];f&&N.length&&(N=kJ(g.filter(function(k){return k.value!=null&&(k.hide!==!0||n.props.includeHidden)}),x,_5e));var S=N.length>0;return O.createElement(v5e,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:h,active:i,coordinate:u,hasPayload:S,offset:m,position:v,reverseDirection:b,useTranslate3d:y,viewBox:j,wrapperStyle:w},P5e(d,hL(hL({},this.props),{},{payload:N})))}}])}(p.PureComponent);
vendor: 18,049 bytes, lines 726-733
726uA(_a,"displayName","Tooltip");uA(_a,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Mo.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var E5e=Ho,O5e=function(){return E5e.Date.now()},A5e=O5e,D5e=/\s/;function M5e(e){for(var t=e.length;t--&&D5e.test(e.charAt(t)););return t}var I5e=M5e,R5e=I5e,$5e=/^\s+/;function L5e(e){return e&&e.slice(0,R5e(e)+1).replace($5e,"")}var F5e=L5e,B5e=F5e,mL=md,U5e=Am,pL=NaN,z5e=/^[-+]0x[0-9a-f]+$/i,W5e=/^0b[01]+$/i,V5e=/^0o[0-7]+$/i,H5e=parseInt;function q5e(e){if(typeof e=="number")return e;if(U5e(e))return pL;if(mL(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=mL(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=B5e(e);var r=W5e.test(e);return r||V5e.test(e)?H5e(e.slice(2),r?2:8):z5e.test(e)?pL:+e}var $J=q5e,Y5e=md,kk=A5e,gL=$J,G5e="Expected a function",K5e=Math.max,Q5e=Math.min;function Z5e(e,t,r){var n,a,i,o,l,c,d=0,u=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(G5e);t=gL(t)||0,Y5e(r)&&(u=!!r.leading,f="maxWait"in r,i=f?K5e(gL(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h);function m(S){var k=n,T=a;return n=a=void 0,d=S,o=e.apply(T,k),o}function g(S){return d=S,l=setTimeout(b,t),u?m(S):o}function x(S){var k=S-c,T=S-d,C=t-k;return f?Q5e(C,i-T):C}function v(S){var k=S-c,T=S-d;return c===void 0||k>=t||k<0||f&&T>=i}function b(){var S=kk();if(v(S))return y(S);l=setTimeout(b,x(S))}function y(S){return l=void 0,h&&n?m(S):(n=a=void 0,o)}function j(){l!==void 0&&clearTimeout(l),d=0,n=c=a=l=void 0}function w(){return l===void 0?o:y(kk())}function N(){var S=kk(),k=v(S);if(n=arguments,a=this,c=S,k){if(l===void 0)return g(c);if(f)return clearTimeout(l),l=setTimeout(b,t),m(c)}return l===void 0&&(l=setTimeout(b,t)),o}return N.cancel=j,N.flush=w,N}var X5e=Z5e,J5e=X5e,e6e=md,t6e="Expected a function";function r6e(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(t6e);return e6e(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),J5e(e,t,{leading:n,maxWait:t,trailing:a})}var n6e=r6e;const LJ=ur(n6e);function Sx(e){"@babel/helpers - typeof";return Sx=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},Sx(e)}function xL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function eb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xL(Object(r),!0).forEach(function(n){s6e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s6e(e,t,r){return t=a6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a6e(e){var t=i6e(e,"string");return Sx(t)=="symbol"?t:t+""}function i6e(e,t){if(Sx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Sx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o6e(e,t){return u6e(e)||d6e(e,t)||c6e(e,t)||l6e()}function l6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 727In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c6e(e,t){if(e){if(typeof e=="string")return vL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vL(e,t)}}function vL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d6e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function u6e(e){if(Array.isArray(e))return e}var tb=p.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,o=i===void 0?"100%":i,l=e.height,c=l===void 0?"100%":l,d=e.minWidth,u=d===void 0?0:d,f=e.minHeight,h=e.maxHeight,m=e.children,g=e.debounce,x=g===void 0?0:g,v=e.id,b=e.className,y=e.onResize,j=e.style,w=j===void 0?{}:j,N=p.useRef(null),S=p.useRef();S.current=y,p.useImperativeHandle(t,function(){return Object.defineProperty(N.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),N.current},configurable:!0})});var k=p.useState({containerWidth:a.width,containerHeight:a.height}),T=o6e(k,2),C=T[0],E=T[1],P=p.useCallback(function(I,F){E(function(H){var W=Math.round(I),z=Math.round(F);return H.containerWidth===W&&H.containerHeight===z?H:{containerWidth:W,containerHeight:z}})},[]);p.useEffect(function(){var I=function(q){var V,se=q[0].contentRect,oe=se.width,_e=se.height;P(oe,_e),(V=S.current)===null||V===void 0||V.call(S,oe,_e)};x>0&&(I=LJ(I,x,{trailing:!0,leading:!1}));var F=new ResizeObserver(I),H=N.current.getBoundingClientRect(),W=H.width,z=H.height;return P(W,z),F.observe(N.current),function(){F.disconnect()}},[P,x]);var _=p.useMemo(function(){var I=C.containerWidth,F=C.containerHeight;if(I<0||F<0)return null;Ui(Ld(o)||Ld(c),`The width(%s) and height(%s) are both fixed numbers, 728 maybe you don't need to use a ResponsiveContainer.`,o,c),Ui(!r||r>0,"The aspect(%s) must be greater than zero.",r);var H=Ld(o)?I:o,W=Ld(c)?F:c;r&&r>0&&(H?W=H/r:W&&(H=W*r),h&&W>h&&(W=h)),Ui(H>0||W>0,`The width(%s) and height(%s) of chart should be greater than 0, 729 please check the style of container, or the props width(%s) and height(%s), 730 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 731 height and width.`,H,W,o,c,u,f,r);var z=!Array.isArray(m)&&kl(m.type).endsWith("Chart");return O.Children.map(m,function(R){return O.isValidElement(R)?p.cloneElement(R,eb({width:H,height:W},z?{style:eb({height:"100%",width:"100%",maxHeight:W,maxWidth:H},R.props.style)}:{})):R})},[r,m,c,h,f,u,C,o]);return O.createElement("div",{id:v?"".concat(v):void 0,className:ht("recharts-responsive-container",b),style:eb(eb({},w),{},{width:o,height:c,minWidth:u,minHeight:f,maxHeight:h}),ref:N},_)}),o1=function(t){return null};o1.displayName="Cell";function kx(e){"@babel/helpers - typeof";return kx=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},kx(e)}function yL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function w_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yL(Object(r),!0).forEach(function(n){f6e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yL(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f6e(e,t,r){return t=h6e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h6e(e){var t=m6e(e,"string");return kx(t)=="symbol"?t:t+""}function m6e(e,t){if(kx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(kx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ju={widthCache:{},cacheCount:0},p6e=2e3,g6e={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},bL="recharts_measurement_span";function x6e(e){var t=w_({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var hg=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Mo.isSsr)return{width:0,height:0};var n=x6e(r),a=JSON.stringify({text:t,copyStyle:n});if(Ju.widthCache[a])return Ju.widthCache[a];try{var i=document.getElementById(bL);i||(i=document.createElement("span"),i.setAttribute("id",bL),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=w_(w_({},g6e),n);Object.assign(i.style,o),i.textContent="".concat(t);var l=i.getBoundingClientRect(),c={width:l.width,height:l.height};return Ju.widthCache[a]=c,++Ju.cacheCount>p6e&&(Ju.cacheCount=0,Ju.widthCache={}),c}catch{return{width:0,height:0}}},v6e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Cx(e){"@babel/helpers - typeof";return Cx=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},Cx(e)}function Fj(e,t){return w6e(e)||j6e(e,t)||b6e(e,t)||y6e()}function y6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 732In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b6e(e,t){if(e){if(typeof e=="string")return jL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jL(e,t)}}function jL(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j6e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function w6e(e){if(Array.isArray(e))return e}function N6e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wL(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,k6e(n.key),n)}}function S6e(e,t,r){return t&&wL(e.prototype,t),r&&wL(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function k6e(e){var t=C6e(e,"string");return Cx(t)=="symbol"?t:t+""}function C6e(e,t){if(Cx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var NL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,SL=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,T6e=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,_6e=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,FJ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},P6e=Object.keys(FJ),kf="NaN";function E6e(e,t){return e*FJ[t]}var rb=function(){function e(t,r){N6e(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!T6e.test(r)&&(this.num=NaN,this.unit=""),P6e.includes(r)&&(this.num=E6e(t,r),this.unit="px")}return S6e(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=_6e.exec(r))!==null&&n!==void 0?n:[],i=Fj(a,3),o=i[1],l=i[2];return new e(parseFloat(o),l??"")}}])}();function BJ(e){if(e.includes(kf))return kf;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=NL.exec(t))!==null&&r!==void 0?r:[],a=Fj(n,4),i=a[1],o=a[2],l=a[3],c=rb.parse(i??""),d=rb.parse(l??""),u=o==="*"?c.multiply(d):c.divide(d);if(u.isNaN())return kf;t=t.replace(NL,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=SL.exec(t))!==null&&f!==void 0?f:[],m=Fj(h,4),g=m[1],x=m[2],v=m[3],b=rb.parse(g??""),y=rb.parse(v??""),j=x==="+"?b.add(y):b.subtract(y);if(j.isNaN())return kf;t=t.replace(SL,j.toString())}return t}var kL=/\(([^()]*)\)/;function O6e(e){for(var t=e;t.includes("(");){var r=kL.exec(t),n=Fj(r,2),a=n[1];t=t.replace(kL,BJ(a))}return t}function A6e(e){var t=e.replace(/\s+/g,"");return t=O6e(t),t=BJ(t),t}function D6e(e){try{return A6e(e)}catch{return kf}}function Ck(e){var t=D6e(e.slice(5,-1));return t===kf?"":t}var M6e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],I6e=["dx","dy","angle","className","breakAll"];function N_(){return N_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},N_.apply(this,arguments)}function CL(e,t){if(e==null)return{};var r=R6e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function R6e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function TL(e,t){return B6e(e)||F6e(e,t)||L6e(e,t)||$6e()}function $6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 733In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L6e(e,t){if(e){if(typeof e=="string")return _L(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _L(e,t)}}function _L(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function F6e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function B6e(e){if(Array.isArray(e))return e}var UJ=/[ \f\n\r\t\v\u2028\u2029]+/,zJ=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];zt(r)||(n?i=r.toString().split(""):i=r.toString().split(UJ));var o=i.map(function(c){return{word:c,width:hg(c,a).width}}),l=n?0:hg(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},U6e=function(t,r,n,a,i){var o=t.maxLines,l=t.children,c=t.style,d=t.breakAll,u=ze(o),f=l,h=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return H.reduce(function(W,z){var R=z.word,q=z.width,V=W[W.length-1];if(V&&(a==null||i||V.width+q+n<Number(a)))V.words.push(R),V.width+=q+n;else{var se={words:[R],width:q};W.push(se)}return W},[])},m=h(r),g=function(H){return H.reduce(function(W,z){return W.width>z.width?W:z})};if(!u)return m;for(var x="â¦",v=function(H){var W=f.slice(0,H),z=zJ({breakAll:d,style:c,children:W+x}).wordsWithComputedWidth,R=h(z),q=R.length>o||g(R).width>Number(a);return[q,R]},b=0,y=f.length-1,j=0,w;b<=y&&j<=f.length-1;){var N=Math.floor((b+y)/2),S=N-1,k=v(S),T=TL(k,2),C=T[0],E=T[1],P=v(N),_=TL(P,1),I=_[0];if(!C&&!I&&(b=N+1),C&&I&&(y=N-1),!C&&I){w=E;break}j++}return w||m},PL=function(t){var r=zt(t)?[]:t.toString().split(UJ);return[{words:r}]},z6e=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,l=t.maxLines;if((r||n)&&!Mo.isSsr){var c,d,u=zJ({breakAll:o,children:a,style:i});if(u){var f=u.wordsWithComputedWidth,h=u.spaceWidth;c=f,d=h}else return PL(a);return U6e({breakAll:o,children:a,maxLines:l,style:i},c,d,r,n)}return PL(a)},EL="#808080",_u=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,d=c===void 0?"0.71em":c,u=t.scaleToFit,f=u===void 0?!1:u,h=t.textAnchor,m=h===void 0?"start":h,g=t.verticalAnchor,x=g===void 0?"end":g,v=t.fill,b=v===void 0?EL:v,y=CL(t,M6e),j=p.useMemo(function(){return z6e({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:f,style:y.style,width:y.width})},[y.breakAll,y.children,y.maxLines,f,y.style,y.width]),w=y.dx,N=y.dy,S=y.angle,k=y.className,T=y.breakAll,C=CL(y,I6e);if(!Xn(n)||!Xn(i))return null;var E=n+(ze(w)?w:0),P=i+(ze(N)?N:0),_;switch(x){case"start":_=Ck("calc(".concat(d,")"));break;case"middle":_=Ck("calc(".concat((j.length-1)/2," * -").concat(l," + (").concat(d," / 2))"));break;default:_=Ck("calc(".concat(j.length-1," * -").concat(l,")"));break}var I=[];if(f){var F=j[0].width,H=y.width;I.push("scale(".concat((ze(H)?H/F:1)/F,")"))}return S&&I.push("rotate(".concat(S,", ").concat(E,", ").concat(P,")")),I.length&&(C.transform=I.join(" ")),O.createElement("text",N_({}
733,yt(C,!0),{x:E,y:P,className:ht("recharts-text",k),textAnchor:m,fill:b.includes("url")?EL:b}),j.map(function(W,z){var R=W.words.join(T?"":" ");return O.createElement("tspan",{x:E,dy:z===0?_:l,key:"".concat(R,"-").concat(z)},R)}))};function Wc(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function W6e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function fA(e){let t,r,n;e.length!==2?(t=Wc,r=(l,c)=>Wc(e(l),c),n=(l,c)=>e(l)-c):(t=e===Wc||e===W6e?e:V6e,r=e,n=e);function a(l,c,d=0,u=l.length){if(d<u){if(t(c,c)!==0)return u;do{const f=d+u>>>1;r(l[f],c)<0?d=f+1:u=f}while(d<u)}return d}function i(l,c,d=0,u=l.length){if(d<u){if(t(c,c)!==0)return u;do{const f=d+u>>>1;r(l[f],c)<=0?d=f+1:u=f}while(d<u)}return d}function o(l,c,d=0,u=l.length){const f=a(l,c,d,u-1);return f>d&&n(l[f-1],c)>-n(l[f],c)?f-1:f}return{left:a,center:o,right:i}}function V6e(){return 0}function WJ(e){return e===null?NaN:+e}function*H6e(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const q6e=fA(Wc),Qv=q6e.right;fA(WJ).center;class OL extends Map{constructor(t,r=K6e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(AL(this,t))}has(t){return super.has(AL(this,t))}set(t,r){return super.set(Y6e(this,t),r)}delete(t){return super.delete(G6e(this,t))}}function AL({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Y6e({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function G6e({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function K6e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Q6e(e=Wc){if(e===Wc)return VJ;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function VJ(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Z6e=Math.sqrt(50),X6e=Math.sqrt(10),J6e=Math.sqrt(2);function Bj(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=Z6e?10:i>=X6e?5:i>=J6e?2:1;let l,c,d;return a<0?(d=Math.pow(10,-a)/o,l=Math.round(e*d),c=Math.round(t*d),l/d<e&&++l,c/d>t&&--c,d=-d):(d=Math.pow(10,a)*o,l=Math.round(e/d),c=Math.round(t/d),l*d<e&&++l,c*d>t&&--c),c<l&&.5<=r&&r<2?Bj(e,t,r*2):[l,c,d]}function S_(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,o]=n?Bj(t,e,r):Bj(e,t,r);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(n)if(o<0)for(let d=0;d<l;++d)c[d]=(i-d)/-o;else for(let d=0;d<l;++d)c[d]=(i-d)*o;else if(o<0)for(let d=0;d<l;++d)c[d]=(a+d)/-o;else for(let d=0;d<l;++d)c[d]=(a+d)*o;return c}function k_(e,t,r){return t=+t,e=+e,r=+r,Bj(e,t,r)[2]}function C_(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?k_(t,e,r):k_(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function DL(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function ML(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function HJ(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?VJ:Q6e(a);n>r;){if(n-r>600){const c=n-r+1,d=t-r+1,u=Math.log(c),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(c-f)/c)*(d-c/2<0?-1:1),m=Math.max(r,Math.floor(t-d*f/c+h)),g=Math.min(n,Math.floor(t+(c-d)*f/c+h));HJ(e,t,m,g,a)}const i=e[t];let o=r,l=n;for(kp(e,r,t),a(e[n],i)>0&&kp(e,r,n);o<l;){for(kp(e,o,l),++o,--l;a(e[o],i)<0;)++o;for(;a(e[l],i)>0;)--l}a(e[r],i)===0?kp(e,r,l):(++l,kp(e,l,n)),l<=t&&(r=l+1),t<=l&&(n=l-1)}return e}function kp(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function eBe(e,t,r){if(e=Float64Array.from(H6e(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return ML(e);if(t>=1)return DL(e);var n,a=(n-1)*t,i=Math.floor(a),o=DL(HJ(e,i).subarray(0,i+1)),l=ML(e.subarray(i+1));return o+(l-o)*(a-i)}}function tBe(e,t,r=WJ){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),l=+r(e[i+1],i+1,e);return o+(l-o)*(a-i)}}function rBe(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function xi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Gl(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}
vendor: 5,142 bytes, line 733
733const T_=Symbol("implicit");function hA(){var e=new OL,t=[],r=[],n=T_;function a(i){let o=e.get(i);if(o===void 0){if(n!==T_)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new OL;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return hA(t,r).unknown(n)},xi.apply(a,arguments),a}function Tx(){var e=hA().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,o,l=!1,c=0,d=0,u=.5;delete e.unknown;function f(){var h=t().length,m=a<n,g=m?a:n,x=m?n:a;i=(x-g)/Math.max(1,h-c+d*2),l&&(i=Math.floor(i)),g+=(x-g-i*(h-c))*u,o=i*(1-c),l&&(g=Math.round(g),o=Math.round(o));var v=rBe(h).map(function(b){return g+i*b});return r(m?v.reverse():v)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,l=!0,f()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(h){return arguments.length?(l=!!h,f()):l},e.padding=function(h){return arguments.length?(c=Math.min(1,d=+h),f()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),f()):c},e.paddingOuter=function(h){return arguments.length?(d=+h,f()):d},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),f()):u},e.copy=function(){return Tx(t(),[n,a]).round(l).paddingInner(c).paddingOuter(d).align(u)},xi.apply(f(),arguments)}function qJ(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return qJ(t())},e}function mg(){return qJ(Tx.apply(null,arguments).paddingInner(1))}function mA(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function YJ(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Zv(){}var _x=.7,Uj=1/_x,Kf="\\s*([+-]?\\d+)\\s*",Px="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Io="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nBe=/^#([0-9a-f]{3,8})$/,sBe=new RegExp(`^rgb\\(${Kf},${Kf},${Kf}\\)$`),aBe=new RegExp(`^rgb\\(${Io},${Io},${Io}\\)$`),iBe=new RegExp(`^rgba\\(${Kf},${Kf},${Kf},${Px}\\)$`),oBe=new RegExp(`^rgba\\(${Io},${Io},${Io},${Px}\\)$`),lBe=new RegExp(`^hsl\\(${Px},${Io},${Io}\\)$`),cBe=new RegExp(`^hsla\\(${Px},${Io},${Io},${Px}\\)$`),IL={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};
vendor: 4,869 bytes, line 733
733mA(Zv,Ex,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:RL,formatHex:RL,formatHex8:dBe,formatHsl:uBe,formatRgb:$L,toString:$L});function RL(){return this.rgb().formatHex()}function dBe(){return this.rgb().formatHex8()}function uBe(){return GJ(this).formatHsl()}function $L(){return this.rgb().formatRgb()}function Ex(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=nBe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?LL(t):r===3?new ga(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?nb(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?nb(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=sBe.exec(e))?new ga(t[1],t[2],t[3],1):(t=aBe.exec(e))?new ga(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=iBe.exec(e))?nb(t[1],t[2],t[3],t[4]):(t=oBe.exec(e))?nb(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=lBe.exec(e))?UL(t[1],t[2]/100,t[3]/100,1):(t=cBe.exec(e))?UL(t[1],t[2]/100,t[3]/100,t[4]):IL.hasOwnProperty(e)?LL(IL[e]):e==="transparent"?new ga(NaN,NaN,NaN,0):null}function LL(e){return new ga(e>>16&255,e>>8&255,e&255,1)}function nb(e,t,r,n){return n<=0&&(e=t=r=NaN),new ga(e,t,r,n)}function fBe(e){return e instanceof Zv||(e=Ex(e)),e?(e=e.rgb(),new ga(e.r,e.g,e.b,e.opacity)):new ga}function __(e,t,r,n){return arguments.length===1?fBe(e):new ga(e,t,r,n??1)}function ga(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}mA(ga,__,YJ(Zv,{brighter(e){return e=e==null?Uj:Math.pow(Uj,e),new ga(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_x:Math.pow(_x,e),new ga(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ga(su(this.r),su(this.g),su(this.b),zj(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FL,formatHex:FL,formatHex8:hBe,formatRgb:BL,toString:BL}));function FL(){return`#${Fd(this.r)}${Fd(this.g)}${Fd(this.b)}`}function hBe(){return`#${Fd(this.r)}${Fd(this.g)}${Fd(this.b)}${Fd((isNaN(this.opacity)?1:this.opacity)*255)}`}function BL(){const e=zj(this.opacity);return`${e===1?"rgb(":"rgba("}${su(this.r)}, ${su(this.g)}, ${su(this.b)}${e===1?")":`, ${e})`}`}function zj(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function su(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Fd(e){return e=su(e),(e<16?"0":"")+e.toString(16)}function UL(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Di(e,t,r,n)}function GJ(e){if(e instanceof Di)return new Di(e.h,e.s,e.l,e.opacity);if(e instanceof Zv||(e=Ex(e)),!e)return new Di;if(e instanceof Di)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,l=i-a,c=(i+a)/2;return l?(t===i?o=(r-n)/l+(r<n)*6:r===i?o=(n-t)/l+2:o=(t-r)/l+4,l/=c<.5?i+a:2-i-a,o*=60):l=c>0&&c<1?0:o,new Di(o,l,c,e.opacity)}function mBe(e,t,r,n){return arguments.length===1?GJ(e):new Di(e,t,r,n??1)}function Di(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}mA(Di,mBe,YJ(Zv,{brighter(e){return e=e==null?Uj:Math.pow(Uj,e),new Di(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_x:Math.pow(_x,e),new Di(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new ga(Tk(e>=240?e-240:e+120,a,n),Tk(e,a,n),Tk(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Di(zL(this.h),sb(this.s),sb(this.l),zj(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=zj(this.opacity);return`${e===1?"hsl(":"hsla("}${zL(this.h)}, ${sb(this.s)*100}%, ${sb(this.l)*100}%${e===1?")":`, ${e})`}`}}));function zL(e){return e=(e||0)%360,e<0?e+360:e}function sb(e){return Math.max(0,Math.min(1,e||0))}function Tk(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const pA=e=>()=>e;function pBe(e,t){return function(r){return e+r*t}}function gBe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function xBe(e){return(e=+e)==1?KJ:function(t,r){return r-t?gBe(t,r,e):pA(isNaN(t)?r:t)}}function KJ(e,t){var r=t-e;return r?pBe(e,r):pA(isNaN(e)?t:e)}const WL=function e(t){var r=xBe(t);function n(a,i){var o=r((a=__(a)).r,(i=__(i)).r),l=r(a.g,i.g),c=r(a.b,i.b),d=KJ(a.opacity,i.opacity);return function(u){return a.r=o(u),a.g=l(u),a.b=c(u),a.opacity=d(u),a+""}}return n.gamma=e,n}(1);function vBe(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function yBe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function bBe(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o<n;++o)a[o]=Um(e[o],t[o]);for(;o<r;
vendor: 5,216 bytes, line 733
733++o)i[o]=t[o];return function(l){for(o=0;o<n;++o)i[o]=a[o](l);return i}}function jBe(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Wj(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function wBe(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Um(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var P_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_k=new RegExp(P_.source,"g");function NBe(e){return function(){return e}}function SBe(e){return function(t){return e(t)+""}}function kBe(e,t){var r=P_.lastIndex=_k.lastIndex=0,n,a,i,o=-1,l=[],c=[];for(e=e+"",t=t+"";(n=P_.exec(e))&&(a=_k.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),l[o]?l[o]+=i:l[++o]=i),(n=n[0])===(a=a[0])?l[o]?l[o]+=a:l[++o]=a:(l[++o]=null,c.push({i:o,x:Wj(n,a)})),r=_k.lastIndex;return r<t.length&&(i=t.slice(r),l[o]?l[o]+=i:l[++o]=i),l.length<2?c[0]?SBe(c[0].x):NBe(t):(t=c.length,function(d){for(var u=0,f;u<t;++u)l[(f=c[u]).i]=f.x(d);return l.join("")})}function Um(e,t){var r=typeof t,n;return t==null||r==="boolean"?pA(t):(r==="number"?Wj:r==="string"?(n=Ex(t))?(t=n,WL):kBe:t instanceof Ex?WL:t instanceof Date?jBe:yBe(t)?vBe:Array.isArray(t)?bBe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?wBe:Wj)(e,t)}function gA(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function CBe(e,t){t===void 0&&(t=e,e=Um);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var l=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[l](o-l)}}function TBe(e){return function(){return e}}function Vj(e){return+e}var VL=[0,1];function Xs(e){return e}function E_(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:TBe(isNaN(t)?NaN:.5)}function _Be(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function PBe(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=E_(a,n),i=r(o,i)):(n=E_(n,a),i=r(i,o)),function(l){return i(n(l))}}function EBe(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=E_(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(l){var c=Qv(e,l,1,n)-1;return i[c](a[c](l))}}function Xv(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function l1(){var e=VL,t=VL,r=Um,n,a,i,o=Xs,l,c,d;function u(){var h=Math.min(e.length,t.length);return o!==Xs&&(o=_Be(e[0],e[h-1])),l=h>2?EBe:PBe,c=d=null,f}function f(h){return h==null||isNaN(h=+h)?i:(c||(c=l(e.map(n),t,r)))(n(o(h)))}return f.invert=function(h){return o(a((d||(d=l(t,e.map(n),Wj)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Vj),u()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=gA,u()},f.clamp=function(h){return arguments.length?(o=h?!0:Xs,u()):o!==Xs},f.interpolate=function(h){return arguments.length?(r=h,u()):r},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,m){return n=h,a=m,u()}}function xA(){return l1()(Xs,Xs)}function OBe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Hj(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function qh(e){return e=Hj(Math.abs(e)),e?e[1]:NaN}function ABe(e,t){return function(r,n){for(var a=r.length,i=[],o=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),i.push(r.substring(a-=l,a+l)),!((c+=l+1)>n));)l=e[o=(o+1)%e.length];return i.reverse().join(t)}}function DBe(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var MBe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ox(e){if(!(t=MBe.exec(e)))throw new Error("invalid format: "+e);var t;return new vA({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ox.prototype=vA.prototype;function vA(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}vA.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function IBe(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var QJ;function RBe(e,t){var r=Hj(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(QJ=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>
vendor: 5,910 bytes, line 733
7330?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Hj(e,Math.max(0,t+i-1))[0]}function HL(e,t){var r=Hj(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const qL={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:OBe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>HL(e*100,t),r:HL,s:RBe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function YL(e){return e}var GL=Array.prototype.map,KL=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $Be(e){var t=e.grouping===void 0||e.thousands===void 0?YL:ABe(GL.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?YL:DBe(GL.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"â":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function d(f){f=Ox(f);var h=f.fill,m=f.align,g=f.sign,x=f.symbol,v=f.zero,b=f.width,y=f.comma,j=f.precision,w=f.trim,N=f.type;N==="n"?(y=!0,N="g"):qL[N]||(j===void 0&&(j=12),w=!0,N="g"),(v||h==="0"&&m==="=")&&(v=!0,h="0",m="=");var S=x==="$"?r:x==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():"",k=x==="$"?n:/[%p]/.test(N)?o:"",T=qL[N],C=/[defgprs%]/.test(N);j=j===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function E(P){var _=S,I=k,F,H,W;if(N==="c")I=T(P)+I,P="";else{P=+P;var z=P<0||1/P<0;if(P=isNaN(P)?c:T(Math.abs(P),j),w&&(P=IBe(P)),z&&+P==0&&g!=="+"&&(z=!1),_=(z?g==="("?g:l:g==="-"||g==="("?"":g)+_,I=(N==="s"?KL[8+QJ/3]:"")+I+(z&&g==="("?")":""),C){for(F=-1,H=P.length;++F<H;)if(W=P.charCodeAt(F),48>W||W>57){I=(W===46?a+P.slice(F+1):P.slice(F))+I,P=P.slice(0,F);break}}}y&&!v&&(P=t(P,1/0));var R=_.length+P.length+I.length,q=R<b?new Array(b-R+1).join(h):"";switch(y&&v&&(P=t(q+P,q.length?b-I.length:1/0),q=""),m){case"<":P=_+P+I+q;break;case"=":P=_+q+P+I;break;case"^":P=q.slice(0,R=q.length>>1)+_+P+I+q.slice(R);break;default:P=q+_+P+I;break}return i(P)}return E.toString=function(){return f+""},E}function u(f,h){var m=d((f=Ox(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(qh(h)/3)))*3,x=Math.pow(10,-g),v=KL[8+g/3];return function(b){return m(x*b)+v}}return{format:d,formatPrefix:u}}var ab,yA,ZJ;LBe({thousands:",",grouping:[3],currency:["$",""]});function LBe(e){return ab=$Be(e),yA=ab.format,ZJ=ab.formatPrefix,ab}function FBe(e){return Math.max(0,-qh(Math.abs(e)))}function BBe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qh(t)/3)))*3-qh(Math.abs(e)))}function UBe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qh(t)-qh(e))+1}function XJ(e,t,r,n){var a=C_(e,t,r),i;switch(n=Ox(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=BBe(a,o))&&(n.precision=i),ZJ(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=UBe(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=FBe(a))&&(n.precision=i-(n.type==="%")*2);break}}return yA(n)}function pd(e){var t=e.domain;return e.ticks=function(r){var n=t();return S_(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return XJ(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],l=n[i],c,d,u=10;for(l<o&&(d=o,o=l,l=d,d=a,a=i,i=d);u-- >0;){if(d=k_(o,l,r),d===c)return n[a]=o,n[i]=l,t(n);if(d>0)o=Math.floor(o/d)*d,l=Math.ceil(l/d)*d;else if(d<0)o=Math.ceil(o*d)/d,l=Math.floor(l*d)/d;else break;c=d}return e},e}function qj(){var e=xA();return e.copy=function(){return Xv(e,qj())},xi.apply(e,arguments),pd(e)}function JJ(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Vj),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return JJ(e).unknown(t)},e=arguments.length?Array.from(e,Vj):[0,1],pd(r)}function eee(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return i<a&&(o=r,r=n,n=o,o=a,a=i,i=o),e[r]=t.floor(a),e[n]=t.ceil(i),e}function QL(e){return Math.log(e)}function ZL(e){return Math.exp(e)}function zBe(e){return-Math.log(-e)}function WBe(e){return-Math.exp(-e)}function VBe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function HBe(e){return e===10?VBe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function qBe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function XL(e){return(t,r)=>-e(-t,r)}function bA(e){const t=e(QL,ZL),r=t.domain;let n=10,a,i;function o(){return a=qBe(n),i=HBe(n),r()[0]<0?(a=XL(a),i=XL(i),e(zBe,WBe)):e(QL,ZL),t}return t.base=function(l){return arguments.length?(n=+l,o()):n},t.domain=function(l){return arguments.length?(r(l),o()):r()},t.ticks=l=>{const c=r();let d=c[0],u=c[c.length-1];const f=u<d;f&&([d,u]=[u,d]);let h=a(d),m=a(u),g,x;const v=l==null?10:+l;let b=[];if(!(n%1)&&m-h<v){if(h=Math.floor(h),m=Math.ceil(m),d>0){for(;h<=m;++h)for(g=1;g<n;++g)if(x=h<0?g/i(-h):g*i(h),!(x<d)){if(x>u)break;b.push(x)}}else for(;h<=m;++h)for(g=n-1;g>=1;--g)if(x=h>0?g/i(-h):g*i(h),!(x<d)){if(x>u)break;b.push(x)}b.length*2<v&&(b=S_(d,u,v))}else b=S_(h,m,Math.min(m-h,v)).map(i);return f?b.reverse():b},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Ox(c)).precision==null&&(c.trim=!0),c=yA(c)),l===1/0)return c;const d=Math.max(1,n*l/t.ticks().length);return u=>{let f=u/i(Math.round(a(u)));return f*n<n-.5&&(f*=n),f<=d?c(u):""}},t.nice=()=>r(eee(r(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function tee(){const e=bA(l1()).domain([1,10]);return e.copy=()=>Xv(e,tee()).base(e.base()),xi.apply(e,arguments),e}
733function JL(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function e3(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function jA(e){var t=1,r=e(JL(t),e3(t));return r.constant=function(n){return arguments.length?e(JL(t=+n),e3(t)):t},pd(r)}function ree(){var e=jA(l1());return e.copy=function(){return Xv(e,ree()).constant(e.constant())},xi.apply(e,arguments)}function t3(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function YBe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function GBe(e){return e<0?-e*e:e*e}function wA(e){var t=e(Xs,Xs),r=1;function n(){return r===1?e(Xs,Xs):r===.5?e(YBe,GBe):e(t3(r),t3(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},pd(t)}function NA(){var e=wA(l1());return e.copy=function(){return Xv(e,NA()).exponent(e.exponent())},xi.apply(e,arguments),e}function KBe(){return NA.apply(null,arguments).exponent(.5)}function r3(e){return Math.sign(e)*e*e}function QBe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function nee(){var e=xA(),t=[0,1],r=!1,n;function a(i){var o=QBe(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(r3(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,Vj)).map(r3)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return nee(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},xi.apply(a,arguments),pd(a)}function see(){var e=[],t=[],r=[],n;function a(){var o=0,l=Math.max(1,t.length);for(r=new Array(l-1);++o<l;)r[o-1]=tBe(e,o/l);return i}function i(o){return o==null||isNaN(o=+o)?n:t[Qv(r,o)]}return i.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?r[l-1]:e[0],l<r.length?r[l]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Wc),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return see().domain(e).range(t).unknown(n)},xi.apply(i,arguments)}function aee(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(c){return c!=null&&c<=c?a[Qv(n,c,0,r)]:i}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(r=(a=Array.from(c)).length-1,l()):a.slice()},o.invertExtent=function(c){var d=a.indexOf(c);return d<0?[NaN,NaN]:d<1?[e,n[0]]:d>=r?[n[r-1],t]:[n[d-1],n[d]]},o.unknown=function(c){return arguments.length&&(i=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return aee().domain([e,t]).range(a).unknown(i)},xi.apply(pd(o),arguments)}function iee(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Qv(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return iee().domain(e).range(t).unknown(r)},xi.apply(a,arguments)}const Pk=new Date,Ek=new Date;function es(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),l=a.ceil(i);return i-o<l-i?o:l},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<o)||!(l>0))return c;let d;do c.push(d=new Date(+i)),t(i,l),e(i);while(d<i&&i<o);return c},a.filter=i=>es(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!i(o););else for(;--l>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(Pk.setTime(+i),Ek.setTime(+o),e(Pk),e(Ek),Math.floor(r(Pk,Ek))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const Yj=es(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Yj.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?es(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>
vendor: 4,214 bytes, line 733
733(r-t)/e):Yj);Yj.range;const hl=1e3,oi=hl*60,ml=oi*60,Fl=ml*24,SA=Fl*7,n3=Fl*30,Ok=Fl*365,Bd=es(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*hl)},(e,t)=>(t-e)/hl,e=>e.getUTCSeconds());Bd.range;const kA=es(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hl)},(e,t)=>{e.setTime(+e+t*oi)},(e,t)=>(t-e)/oi,e=>e.getMinutes());kA.range;const CA=es(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*oi)},(e,t)=>(t-e)/oi,e=>e.getUTCMinutes());CA.range;const TA=es(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hl-e.getMinutes()*oi)},(e,t)=>{e.setTime(+e+t*ml)},(e,t)=>(t-e)/ml,e=>e.getHours());TA.range;const _A=es(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ml)},(e,t)=>(t-e)/ml,e=>e.getUTCHours());_A.range;const Jv=es(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*oi)/Fl,e=>e.getDate()-1);Jv.range;const c1=es(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Fl,e=>e.getUTCDate()-1);c1.range;const oee=es(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Fl,e=>Math.floor(e/Fl));oee.range;function zu(e){return es(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*oi)/SA)}const d1=zu(0),Gj=zu(1),ZBe=zu(2),XBe=zu(3),Yh=zu(4),JBe=zu(5),e8e=zu(6);d1.range;Gj.range;ZBe.range;XBe.range;Yh.range;JBe.range;e8e.range;function Wu(e){return es(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/SA)}const u1=Wu(0),Kj=Wu(1),t8e=Wu(2),r8e=Wu(3),Gh=Wu(4),n8e=Wu(5),s8e=Wu(6);u1.range;Kj.range;t8e.range;r8e.range;Gh.range;n8e.range;s8e.range;const PA=es(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());PA.range;const EA=es(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());EA.range;const Bl=es(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Bl.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:es(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Bl.range;const Ul=es(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ul.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:es(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Ul.range;function lee(e,t,r,n,a,i){const o=[[Bd,1,hl],[Bd,5,5*hl],[Bd,15,15*hl],[Bd,30,30*hl],[i,1,oi],[i,5,5*oi],[i,15,15*oi],[i,30,30*oi],[a,1,ml],[a,3,3*ml],[a,6,6*ml],[a,12,12*ml],[n,1,Fl],[n,2,2*Fl],[r,1,SA],[t,1,n3],[t,3,3*n3],[e,1,Ok]];function l(d,u,f){const h=u<d;h&&([d,u]=[u,d]);const m=f&&typeof f.range=="function"?f:c(d,u,f),g=m?m.range(d,+u+1):[];return h?g.reverse():g}function c(d,u,f){const h=Math.abs(u-d)/f,m=fA(([,,v])=>v).right(o,h);if(m===o.length)return e.every(C_(d/Ok,u/Ok,f));if(m===0)return Yj.every(Math.max(C_(d,u,f),1));const[g,x]=o[h/o[m-1][2]<o[m][2]/h?m-1:m];return g.every(x)}return[l,c]}const[a8e,i8e]=lee(Ul,EA,u1,oee,_A,CA),[o8e,l8e]=lee(Bl,PA,d1,Jv,TA,kA);function Ak(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Dk(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Cp(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function c8e(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,d=Tp(a),u=_p(a),f=Tp(i),h=_p(i),m=Tp(o),g=_p(o),x=Tp(l),v=_p(l),b=Tp(c),y=_p(c),j={a:z,A:R,b:q,B:V,c:null,d:c3,e:c3,f:A8e,g
vendor: 8,348 bytes, line 733
733:z8e,G:V8e,H:P8e,I:E8e,j:O8e,L:cee,m:D8e,M:M8e,p:se,q:oe,Q:f3,s:h3,S:I8e,u:R8e,U:$8e,V:L8e,w:F8e,W:B8e,x:null,X:null,y:U8e,Y:W8e,Z:H8e,"%":u3},w={a:_e,A:U,b:M,B:G,c:null,d:d3,e:d3,f:K8e,g:aUe,G:oUe,H:q8e,I:Y8e,j:G8e,L:uee,m:Q8e,M:Z8e,p:K,q:je,Q:f3,s:h3,S:X8e,u:J8e,U:eUe,V:tUe,w:rUe,W:nUe,x:null,X:null,y:sUe,Y:iUe,Z:lUe,"%":u3},N={a:E,A:P,b:_,B:I,c:F,d:o3,e:o3,f:k8e,g:i3,G:a3,H:l3,I:l3,j:j8e,L:S8e,m:b8e,M:w8e,p:C,q:y8e,Q:T8e,s:_8e,S:N8e,u:m8e,U:p8e,V:g8e,w:h8e,W:x8e,x:H,X:W,y:i3,Y:a3,Z:v8e,"%":C8e};j.x=S(r,j),j.X=S(n,j),j.c=S(t,j),w.x=S(r,w),w.X=S(n,w),w.c=S(t,w);function S(ae,de){return function(Ce){var B=[],me=-1,ne=0,Be=ae.length,lt,ct,Y;for(Ce instanceof Date||(Ce=new Date(+Ce));++me<Be;)ae.charCodeAt(me)===37&&(B.push(ae.slice(ne,me)),(ct=s3[lt=ae.charAt(++me)])!=null?lt=ae.charAt(++me):ct=lt==="e"?" ":"0",(Y=de[lt])&&(lt=Y(Ce,ct)),B.push(lt),ne=me+1);return B.push(ae.slice(ne,me)),B.join("")}}function k(ae,de){return function(Ce){var B=Cp(1900,void 0,1),me=T(B,ae,Ce+="",0),ne,Be;if(me!=Ce.length)return null;if("Q"in B)return new Date(B.Q);if("s"in B)return new Date(B.s*1e3+("L"in B?B.L:0));if(de&&!("Z"in B)&&(B.Z=0),"p"in B&&(B.H=B.H%12+B.p*12),B.m===void 0&&(B.m="q"in B?B.q:0),"V"in B){if(B.V<1||B.V>53)return null;"w"in B||(B.w=1),"Z"in B?(ne=Dk(Cp(B.y,0,1)),Be=ne.getUTCDay(),ne=Be>4||Be===0?Kj.ceil(ne):Kj(ne),ne=c1.offset(ne,(B.V-1)*7),B.y=ne.getUTCFullYear(),B.m=ne.getUTCMonth(),B.d=ne.getUTCDate()+(B.w+6)%7):(ne=Ak(Cp(B.y,0,1)),Be=ne.getDay(),ne=Be>4||Be===0?Gj.ceil(ne):Gj(ne),ne=Jv.offset(ne,(B.V-1)*7),B.y=ne.getFullYear(),B.m=ne.getMonth(),B.d=ne.getDate()+(B.w+6)%7)}else("W"in B||"U"in B)&&("w"in B||(B.w="u"in B?B.u%7:"W"in B?1:0),Be="Z"in B?Dk(Cp(B.y,0,1)).getUTCDay():Ak(Cp(B.y,0,1)).getDay(),B.m=0,B.d="W"in B?(B.w+6)%7+B.W*7-(Be+5)%7:B.w+B.U*7-(Be+6)%7);return"Z"in B?(B.H+=B.Z/100|0,B.M+=B.Z%100,Dk(B)):Ak(B)}}function T(ae,de,Ce,B){for(var me=0,ne=de.length,Be=Ce.length,lt,ct;me<ne;){if(B>=Be)return-1;if(lt=de.charCodeAt(me++),lt===37){if(lt=de.charAt(me++),ct=N[lt in s3?de.charAt(me++):lt],!ct||(B=ct(ae,Ce,B))<0)return-1}else if(lt!=Ce.charCodeAt(B++))return-1}return B}function C(ae,de,Ce){var B=d.exec(de.slice(Ce));return B?(ae.p=u.get(B[0].toLowerCase()),Ce+B[0].length):-1}function E(ae,de,Ce){var B=m.exec(de.slice(Ce));return B?(ae.w=g.get(B[0].toLowerCase()),Ce+B[0].length):-1}function P(ae,de,Ce){var B=f.exec(de.slice(Ce));return B?(ae.w=h.get(B[0].toLowerCase()),Ce+B[0].length):-1}function _(ae,de,Ce){var B=b.exec(de.slice(Ce));return B?(ae.m=y.get(B[0].toLowerCase()),Ce+B[0].length):-1}function I(ae,de,Ce){var B=x.exec(de.slice(Ce));return B?(ae.m=v.get(B[0].toLowerCase()),Ce+B[0].length):-1}function F(ae,de,Ce){return T(ae,t,de,Ce)}function H(ae,de,Ce){return T(ae,r,de,Ce)}function W(ae,de,Ce){return T(ae,n,de,Ce)}function z(ae){return o[ae.getDay()]}function R(ae){return i[ae.getDay()]}function q(ae){return c[ae.getMonth()]}function V(ae){return l[ae.getMonth()]}function se(ae){return a[+(ae.getHours()>=12)]}function oe(ae){return 1+~~(ae.getMonth()/3)}function _e(ae){return o[ae.getUTCDay()]}function U(ae){return i[ae.getUTCDay()]}function M(ae){return c[ae.getUTCMonth()]}function G(ae){return l[ae.getUTCMonth()]}function K(ae){return a[+(ae.getUTCHours()>=12)]}function je(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var de=S(ae+="",j);return de.toString=function(){return ae},de},parse:function(ae){var de=k(ae+="",!1);return de.toString=function(){return ae},de},utcFormat:function(ae){var de=S(ae+="",w);return de.toString=function(){return ae},de},utcParse:function(ae){var de=k(ae+="",!0);return de.toString=function(){return ae},de}}}var s3={"-":"",_:" ",0:"0"},ls=/^\s*\d+/,d8e=/^%/,u8e=/[\\^$*+?|[\]().{}]/g;function vr(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function f8e(e){return e.replace(u8e,"\\$&")}function Tp(e){return new RegExp("^(?:"+e.map(f8e).join("|")+")","i")}function _p(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function h8e(e,t,r){var n=ls.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function m8e(e,t,r){var n=ls.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function p8e(e,t,r){var n=ls.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function g8e(e,t,r){var n=ls.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function x8e(e,t,r){var n=ls.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function a3(e,t,r){var n=ls.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function i3(e,t,r){var n=ls.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function v8e(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function y8e(e,t,r){var n=ls.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function b8e(e,t,r){var n=ls.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function o3(e,t,r){var n=ls.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function j8e(e,t,r){var n=ls.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function l3(e,t,r){var n=ls.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function w8e(e,t,r){var n=ls.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function N8e(e,t,r){var n=ls.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function S8e(e,t,r){var n=ls.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function k8e(e,t,r){var n=ls.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function C8e(e,t,r){var n=d8e.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function T8e(e,t,r){var n=ls.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function _8e(e,t,r){var n=ls.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function c3(e,t){return vr(e.getDate(),t,2)}function P8e(e,t){return vr(e.getHours(),t,2)}function E8e(e,t){return vr(e.getHours()%12||12,t,2)}function O8e(e,t){return vr(1+Jv.count(Bl(e),e),t,3)}function cee(e,t){return vr(e.getMilliseconds(),t,3)}function A8e(e,t){return cee(e,t)+"000"}function D8e(e,t){return vr(e.getMonth()+1,t,2)}function M8e(e,t){return vr(e.getMinutes(),t,2)}function I8e(e,t){return vr(e.getSeconds(),t,2)}function R8e(e){var t=e.getDay();return t===0?7:t}function $8e(e,t){return vr(d1.count(Bl(e)-1,e),t,2)}function dee(e){var t=e.getDay();return t>=4||t===0?Yh(e):Yh.ceil(e)}function L8e(e,t){return e=dee(e),vr(Yh.count(Bl(e),e)+(Bl(e).getDay()===4),t,2)}function F8e(e){return e.getDay()}function B8e(e,t){return vr(Gj.count(Bl(e)-1,e),t,2)}function U8e(e,t){return vr(e.getFullYear()%100,t,2)}function z8e(e,t){return e=dee(e),vr(e.getFullYear()%100,t,2)}function W8e(e,t){return vr(e.getFullYear()%1e4,t,4)}function V8e(e,t){var r=e.getDay();return e=r>=4||r===0?Yh(e):Yh.ceil(e),vr(e.getFullYear()%1e4,t,4)}function H8e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+vr(t/60|0,"0",2)+vr(t%60,"0",2)}function d3(e,t){return vr(e.getUTCDate(),t,2)}function q8e(e,t){return vr(e.getUTCHours(),t,2)}function Y8e(e,t){return vr(e.getUTCHours()%12||12,t,2)}function G8e(e,t){return vr(1+c1.count(Ul(e),e),t,3)}function uee(e,t){return vr(e.getUTCMilliseconds(),t,3)}function K8e(e,t){return uee(e,t)+"000"}function Q8e(e,t){return vr(e.getUTCMonth()+1,t,2)}function Z8e(e,t){return vr(e.getUTCMinutes(),t,2)}function X8e(e,t){return vr(e.getUTCSeconds(),t,2)}function J8e(e){var t=e.getUTCDay();return t===0?7:t}function eUe(e,t){return vr(u1.count(Ul(e)-1,e),t,2)}function fee(e){var t=e.getUTCDay();return t>=4||t===0?Gh(e):Gh.ceil(e)}function tUe(e,t){return e=fee(e),vr(Gh.count(Ul(e),e)+(Ul(e).getUTCDay()===4),t,2)}function rUe(e){return e.getUTCDay()}function nUe(e,t){return vr(Kj.count(Ul(e)-1,e),t,2)}function sUe(e,t){return vr(e.getUTCFullYear()%100,t,2)}function aUe(e,t){return e=fee(e),vr(e.getUTCFullYear()%100,t,2)}function iUe(e,t){return vr(e.getUTCFullYear()%1e4,t,4)}function oUe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Gh(e):Gh.ceil(e),vr(e.getUTCFullYear()%1e4,t,4)}function lUe(){return"+0000"}function u3(){return"%"}function f3(e){return+e}function h3(e){return Math.floor(+e/1e3)}var ef,hee,mee;cUe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
733ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function cUe(e){return ef=c8e(e),hee=ef.format,ef.parse,mee=ef.utcFormat,ef.utcParse,ef}function dUe(e){return new Date(e)}function uUe(e){return e instanceof Date?+e:+new Date(+e)}function OA(e,t,r,n,a,i,o,l,c,d){var u=xA(),f=u.invert,h=u.domain,m=d(".%L"),g=d(":%S"),x=d("%I:%M"),v=d("%I %p"),b=d("%a %d"),y=d("%b %d"),j=d("%B"),w=d("%Y");function N(S){return(c(S)<S?m:l(S)<S?g:o(S)<S?x:i(S)<S?v:n(S)<S?a(S)<S?b:y:r(S)<S?j:w)(S)}return u.invert=function(S){return new Date(f(S))},u.domain=function(S){return arguments.length?h(Array.from(S,uUe)):h().map(dUe)},u.ticks=function(S){var k=h();return e(k[0],k[k.length-1],S??10)},u.tickFormat=function(S,k){return k==null?N:d(k)},u.nice=function(S){var k=h();return(!S||typeof S.range!="function")&&(S=t(k[0],k[k.length-1],S??10)),S?h(eee(k,S)):u},u.copy=function(){return Xv(u,OA(e,t,r,n,a,i,o,l,c,d))},u}function fUe(){return xi.apply(OA(o8e,l8e,Bl,PA,d1,Jv,TA,kA,Bd,hee).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function hUe(){return xi.apply(OA(a8e,i8e,Ul,EA,u1,c1,_A,CA,Bd,mee).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function f1(){var e=0,t=1,r,n,a,i,o=Xs,l=!1,c;function d(f){return f==null||isNaN(f=+f)?c:o(a===0?.5:(f=(i(f)-r)*a,l?Math.max(0,Math.min(1,f)):f))}d.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),d):[e,t]},d.clamp=function(f){return arguments.length?(l=!!f,d):l},d.interpolator=function(f){return arguments.length?(o=f,d):o};function u(f){return function(h){var m,g;return arguments.length?([m,g]=h,o=f(m,g),d):[o(0),o(1)]}}return d.range=u(Um),d.rangeRound=u(gA),d.unknown=function(f){return arguments.length?(c=f,d):c},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),d}}function gd(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function pee(){var e=pd(f1()(Xs));return e.copy=function(){return gd(e,pee())},Gl.apply(e,arguments)}function gee(){var e=bA(f1()).domain([1,10]);return e.copy=function(){return gd(e,gee()).base(e.base())},Gl.apply(e,arguments)}function xee(){var e=jA(f1());return e.copy=function(){return gd(e,xee()).constant(e.constant())},Gl.apply(e,arguments)}function AA(){var e=wA(f1());return e.copy=function(){return gd(e,AA()).exponent(e.exponent())},Gl.apply(e,arguments)}function mUe(){return AA.apply(null,arguments).exponent(.5)}function vee(){var e=[],t=Xs;function r(n){if(n!=null&&!isNaN(n=+n))return t((Qv(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Wc),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>eBe(e,i/n))},r.copy=function(){return vee(t).domain(e)},Gl.apply(r,arguments)}function h1(){var e=0,t=.5,r=1,n=1,a,i,o,l,c,d=Xs,u,f=!1,h;function m(x){return isNaN(x=+x)?h:(x=.5+((x=+u(x))-i)*(n*x<n*i?l:c),d(f?Math.max(0,Math.min(1,x)):x))}m.domain=function(x){return arguments.length?([e,t,r]=x,a=u(e=+e),i=u(t=+t),o=u(r=+r),l=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),n=i<a?-1:1,m):[e,t,r]},m.clamp=function(x){return arguments.length?(f=!!x,m):f},m.interpolator=function(x){return arguments.length?(d=x,m):d};function g(x){return function(v){var b,y,j;return arguments.length?([b,y,j]=v,d=CBe(x,[b,y,j]),m):[d(0),d(.5),d(1)]}}return m.range=g(Um),m.rangeRound=g(gA),m.unknown=function(x){return arguments.length?(h=x,m):h},function(x){return u=x,a=x(e),i=x(t),o=x(r),l=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),n=i<a?-1:1,m}}function yee(){var e=pd(h1()(Xs));return e.copy=function(){return gd(e,yee())},Gl.apply(e,arguments)}function bee(){var e=bA(h1()).domain([.1,1,10]);return e.copy=function(){return gd(e,bee()).base(e.base())},Gl.apply(e,arguments)}function jee(){var e=jA(h1());return e.copy=function(){return gd(e,jee()).constant(e.constant())},Gl.apply(e,arguments)}function DA(){var e=wA(h1());return e.copy=function(){return gd(e,DA()).exponent(e.exponent())},Gl.apply(e,arguments)}function pUe(){return DA.apply(null,arguments).exponent(.5)}const m3=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Tx,scaleDiverging:yee,scaleDivergingLog:bee,scaleDivergingPow:DA,scaleDivergingSqrt:pUe,scaleDivergingSymlog:jee,scaleIdentity:JJ,scaleImplicit:T_,scaleLinear:qj,scaleLog:tee,scaleOrdinal:hA,scalePoint:mg,scalePow:NA,scaleQuantile:see,scaleQuantize:aee,scaleRadial:nee,scaleSequential:pee,scaleSequentialLog:gee,scaleSequentialPow:AA,scaleSequentialQuantile:vee,scaleSequentialSqrt:mUe,scaleSequentialSymlog:xee,scaleSqrt:KBe,scaleSymlog:ree,scaleThreshold:iee,scaleTime:fUe,scaleUtc:hUe,tickFormat:XJ},Symbol.toStringTag,{value:"Module"}));var gUe=Am;function xUe(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],o=t(i);if(o!=null&&(l===void 0?o===o&&!gUe(o):r(o,l)))var l=o,c=i}return c}var m1=xUe;function vUe(e,t){return e>t}var wee=vUe,yUe=m1,bUe=wee,jUe=Bm;function wUe(e){return e&&e.length?yUe(e,jUe,bUe):void 0}var NUe=wUe;const p1=ur(NUe);function SUe(e,t){return e<t}var Nee=SUe,kUe=m1,CUe=Nee,TUe=Bm;function _Ue(e){return e&&e.length?kUe(e,TUe,CUe):void 0}
vendor: 62,260 bytes, lines 733-760
733var PUe=_Ue;const g1=ur(PUe);var EUe=YO,OUe=qo,AUe=OJ,DUe=wa;function MUe(e,t){var r=DUe(e)?EUe:AUe;return r(e,OUe(t))}var IUe=MUe,RUe=PJ,$Ue=IUe;function LUe(e,t){return RUe($Ue(e,t),1)}var FUe=LUe;const BUe=ur(FUe);var UUe=lA;function zUe(e,t){return UUe(e,t)}var WUe=zUe;const ey=ur(WUe);var zm=1e9,VUe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},IA,on=!0,mi="[DecimalError] ",au=mi+"Invalid argument: ",MA=mi+"Exponent out of range: ",Wm=Math.floor,_d=Math.pow,HUe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Da,ts=1e7,Qr=7,See=9007199254740991,Qj=Wm(See/Qr),st={};st.absoluteValue=st.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};st.comparedTo=st.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};st.decimalPlaces=st.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Qr;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};st.dividedBy=st.div=function(e){return Cl(this,new this.constructor(e))};st.dividedToIntegerBy=st.idiv=function(e){var t=this,r=t.constructor;return Fr(Cl(t,new r(e),0,1),r.precision)};st.equals=st.eq=function(e){return!this.cmp(e)};st.exponent=function(){return Fn(this)};st.greaterThan=st.gt=function(e){return this.cmp(e)>0};st.greaterThanOrEqualTo=st.gte=function(e){return this.cmp(e)>=0};st.isInteger=st.isint=function(){return this.e>this.d.length-2};st.isNegative=st.isneg=function(){return this.s<0};st.isPositive=st.ispos=function(){return this.s>0};st.isZero=function(){return this.s===0};st.lessThan=st.lt=function(e){return this.cmp(e)<0};st.lessThanOrEqualTo=st.lte=function(e){return this.cmp(e)<1};st.logarithm=st.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Da))throw Error(mi+"NaN");if(r.s<1)throw Error(mi+(r.s?"NaN":"-Infinity"));return r.eq(Da)?new n(0):(on=!1,t=Cl(Ax(r,i),Ax(e,i),i),on=!0,Fr(t,a))};st.minus=st.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Tee(t,e):kee(t,(e.s=-e.s,e))};st.modulo=st.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(mi+"NaN");return r.s?(on=!1,t=Cl(r,e,0,1).times(e),on=!0,r.minus(t)):Fr(new n(r),a)};st.naturalExponential=st.exp=function(){return Cee(this)};st.naturalLogarithm=st.ln=function(){return Ax(this)};st.negated=st.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};st.plus=st.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?kee(t,e):Tee(t,(e.s=-e.s,e))};st.precision=st.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(au+e);if(t=Fn(a)+1,n=a.d.length-1,r=n*Qr+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};st.squareRoot=st.sqrt=function(){var e,t,r,n,a,i,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(mi+"NaN")}for(e=Fn(l),on=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=To(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Wm((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(a.toString()),r=c.precision,a=o=r+3;;)if(i=n,n=i.plus(Cl(l,i,o+2)).times(.5),To(i.d).slice(0,o)===(t=To(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(Fr(i,r+1,0),i.times(i).eq(l)){n=i;break}}else if(t!="9999")break;o+=4}return on=!0,Fr(n,r)};st.times=st.mul=function(e){var t,r,n,a,i,o,l,c,d,u=this,f=u.constructor,h=u.d,m=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,r=u.e+e.e,c=h.length,d=m.length,c<d&&(i=h,h=m,m=i,o=c,c=d,d=o),i=[],o=c+d,n=o;n--;)i.push(0);for(n=d;--n>=0;){for(t=0,a=c+n;a>n;)l=i[a]+m[n]*h[a-n-1]+t,i[a--]=l%ts|0,t=l/ts|0;i[a]=(i[a]+t)%ts|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,on?Fr(e,f.precision):e};st.toDecimalPlaces=st.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Uo(e,0,zm),t===void 0?t=n.rounding:Uo(t,0,8),Fr(r,e+Fn(r)+1,t))};st.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Pu(n,!0):(Uo(e,0,zm),t===void 0?t=a.rounding:Uo(t,0,8),n=Fr(new a(n),e+1,t),r=Pu(n,!0,e+1)),r};st.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Pu(a):(Uo(e,0,zm),t===void 0?t=i.rounding:Uo(t,0,8),n=Fr(new i(a),e+Fn(a)+1,t),r=Pu(n.abs(),!1,e+Fn(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};st.toInteger=st.toint=function(){var e=this,t=e.constructor;return Fr(new t(e),Fn(e)+1,t.rounding)};st.toNumber=function(){return+this};st.toPower=st.pow=function(e){var t,r,n,a,i,o,l=this,c=l.constructor,d=12,u=+(e=new c(e));if(!e.s)return new c(Da);if(l=new c(l),!l.s){if(e.s<1)throw Error(mi+"Infinity");return l}if(l.eq(Da))return l;if(n=c.precision,e.eq(Da))return Fr(l,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=l.s,o){if((r=u<0?-u:u)<=See){for(a=new c(Da),t=Math.ceil(n/Qr+4),on=!1;r%2&&(a=a.times(l),g3(a.d,t)),r=Wm(r/2),r!==0;)l=l.times(l),g3(l.d,t);return on=!0,e.s<0?new c(Da).div(a):Fr(a,n)}}else if(i<0)throw Error(mi+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,l.s=1,on=!1,a=e.times(Ax(l,n+d)),on=!0,a=Cee(a),a.s=i,a};st.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=Fn(a),n=Pu(a,r<=i.toExpNeg||r>=i.toExpPos)):(Uo(e,1,zm),t===void 0?t=i.rounding:Uo(t,0,8),a=Fr(new i(a),e,t),r=Fn(a),n=Pu(a,e<=r||r<=i.toExpNeg,e)),n};st.toSignificantDigits=st.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Uo(e,1,zm),t===void 0?t=n.rounding:Uo(t,0,8)),Fr(new n(r),e,t)};st.toString=st.valueOf=st.val=st.toJSON=st[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Fn(e),r=e.constructor;return Pu(e,t<=r.toExpNeg||t>=r.toExpPos)};function kee(e,t){var r,n,a,i,o,l,c,d,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),on?Fr(t,f):t;if(c=e.d,d=t.d,o=e.e,a=t.e,c=c.slice(),i=o-a,i){for(i<0?(n=c,i=-i,l=d.length):(n=d,a=o,l=c.length),o=Math.ceil(f/Qr),l=o>l?o+1:l+1,i>l&&(i=l,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(l=c.length,i=d.length,l-i<0&&(i=l,n=d,d=c,c=n),r=0;i;)r=(c[--i]=c[i]+d[i]+r)/ts|0,c[i]%=ts;for(r&&(c.unshift(r),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,on?Fr(t,f):t}function Uo(e,t,r){if(e!==~~e||e<t||e>r)throw Error(au+e)}function To(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Qr-n.length,r&&(i+=dc(r)),i+=n;o=e[t],n=o+"",r=Qr-n.length,r&&(i+=dc(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var Cl=function(){function e(n,a){var i,o=0,l=n.length;for(n=n.slice();l--;)i=n[l]*a+o,n[l]=i%ts|0,o=i/ts|0;return o&&n.unshift(o),n}function t(n,a,i,o){var l,c;if(i!=o)c=i>o?1:-1;else for(l=c=0;l<i;l++)if(n[l]!=a[l]){c=n[l]>a[l]?1:-1;break}return c}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*ts+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var l,c,d,u,f,h,m,g,x,v,b,y,j,w,N,S,k,T,C=n.constructor,E=n.s==a.s?1:-1,P=n.d,_=a.d;if(!n.s)return new C(n);if(!a.s)throw Error(mi+"Division by zero");for(c=n.e-a.e,k=_.length,N=P.length,m=new C(E),g=m.d=[],d=0;_[d]==(P[d]||0);)++d;if(_[d]>(P[d]||0)&&--c,i==null?y=i=C.precision:o?y=i+(Fn(n)-Fn(a))+1:y=i,y<0)return new C(0);if(y=y/Qr+2|0,d=0,k==1)for(u=0,_=_[0],y++;(d<N||u)&&y--;d++)j=u*ts+(P[d]||0),g[d]=j/_|0,u=j%_|0;else{for(u=ts/(_[0]+1)|0,u>1&&(_=e(_,u),P=e(P,u),k=_.length,N=P.length),w=k,x=P.slice(0,k),v=x.length;v<k;)x[v++]=0;T=_.slice(),T.unshift(0),S=_[0],_[1]>=ts/2&&++S;do u=0,l=t(_,x,k,v),l<0?(b=x[0],k!=v&&(b=b*ts+(x[1]||0)),u=b/S|0,u>1?(u>=ts&&(u=ts-1),f=e(_,u),h=f.length,v=x.length,l=t(f,x,h,v),l==1&&(u--,r(f,k<h?T:_,h))):(u==0&&(l=u=1),f=_.slice()),h=f.length,h<v&&f.unshift(0),r(x,f,v),l==-1&&(v=x.length,l=t(_,x,k,v),l<1&&(u++,r(x,k<v?T:_,v))),v=x.length):l===0&&(u++,x=[0]),g[d++]=u,l&&x[0]?x[v++]=P[w]||0:(x=[P[w]],v=1);while((w++<N||x[0]!==void 0)&&y--)}return g[0]||g.shift(),m.e=c,Fr(m,o?i+Fn(m)+1:i)}}();function Cee(e,t){var r,n,a,i,o,l,c=0,d=0,u=e.constructor,f=u.precision;if(Fn(e)>16)throw Error(MA+Fn(e));if(!e.s)return new u(Da);for(t==null?(on=!1,l=f):l=t,o=new u(.03125);e.abs().gte(.1);)e=e.times(o),d+=5;for(n=Math.log(_d(2,d))/Math.LN10*2+5|0,l+=n,r=a=i=new u(Da),u.precision=l;;){if(a=Fr(a.times(e),l),r=r.times(++c),o=i.plus(Cl(a,r,l)),To(o.d).slice(0,l)===To(i.d).slice(0,l)){for(;d--;)i=Fr(i.times(i),l);return u.precision=f,t==null?(on=!0,Fr(i,f)):i}i=o}}function Fn(e){for(var t=e.e*Qr,r=e.d[0];r>=10;r/=10)t++;return t}function Mk(e,t,r){if(t>e.LN10.sd())throw on=!0,r&&(e.precision=r),Error(mi+"LN10 precision limit exceeded");return Fr(new e(e.LN10),t)}function dc(e){for(var t="";e--;)t+="0";return t}function Ax(e,t){var r,n,a,i,o,l,c,d,u,f=1,h=10,m=e,g=m.d,x=m.constructor,v=x.precision;if(m.s<1)throw Error(mi+(m.s?"NaN":"-Infinity"));if(m.eq(Da))return new x(0);if(t==null?(on=!1,d=v):d=t,m.eq(10))return t==null&&(on=!0),Mk(x,d);if(d+=h,x.precision=d,r=To(g),n=r.charAt(0),i=Fn(m),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(e),r=To(m.d),n=r.charAt(0),f++;i=Fn(m),n>1?(m=new x("0."+r),i++):m=new x(n+"."+r.slice(1))}else return c=Mk(x,d+2,v).times(i+""),m=Ax(new x(n+"."+r.slice(1)),d-h).plus(c),x.precision=v,t==null?(on=!0,Fr(m,v)):m;for(l=o=m=Cl(m.minus(Da),m.plus(Da),d),u=Fr(m.times(m),d),a=3;;){if(o=Fr(o.times(u),d),c=l.plus(Cl(o,new x(a),d)),To(c.d).slice(0,d)===To(l.d).slice(0,d))return l=l.times(2),i!==0&&(l=l.plus(Mk(x,d+2,v).times(i+""))),l=Cl(l,new x(f),d),x.precision=v,t==null?(on=!0,Fr(l,v)):l;l=c,a+=2}}function p3(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Wm(r/Qr),e.d=[],n=(r+1)%Qr,r<0&&(n+=Qr),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Qr;n<a;)e.d.push(+t.slice(n,n+=Qr));t=t.slice(n),n=Qr-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),on&&(e.e>Qj||e.e<-Qj))throw Error(MA+r)}else e.s=0,e.e=0,e.d=[0];return e}function Fr(e,t,r){var n,a,i,o,l,c,d,u,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Qr,a=t,d=f[u=0];else{if(u=Math.ceil((n+1)/Qr),i=f.length,u>=i)return e;for(d=i=f[u],o=1;i>=10;i/=10)o++;n%=Qr,a=n-Qr+o}if(r!==void 0&&(i=_d(10,o-a-1),l=d/i%10|0,c=t<0||f[u+1]!==void 0||d%i,c=r<4?(l||c)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?a>0?d/_d(10,o-a):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return c?(i=Fn(e),f.length=1,t=t-i-1,f[0]=_d(10,(Qr-t%Qr)%Qr),e.e=Wm(-t/Qr)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=u,i=1,u--):(f.length=u+1,i=_d(10,Qr-n),f[u]=a>0?(d/_d(10,o-a)%_d(10,a)|0)*i:0),c)for(;;)if(u==0){(f[0]+=i)==ts&&(f[0]=1,++e.e);break}else{if(f[u]+=i,f[u]!=ts)break;f[u--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(on&&(e.e>Qj||e.e<-Qj))throw Error(MA+Fn(e));return e}function Tee(e,t){var r,n,a,i,o,l,c,d,u,f,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),on?Fr(t,m):t;if(c=e.d,f=t.d,n=t.e,d=e.e,c=c.slice(),o=d-n,o){for(u=o<0,u?(r=c,o=-o,l=f.length):(r=f,n=d,l=c.length),a=Math.max(Math.ceil(m/Qr),l)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=c.length,l=f.length,u=a<l,u&&(l=a),a=0;a<l;a++)if(c[a]!=f[a]){u=c[a]<f[a];break}o=0}for(u&&(r=c,c=f,f=r,t.s=-t.s),l=c.length,a=f.length-l;a>0;--a)c[l++]=0;for(a=f.length;a>o;){if(c[--a]<f[a]){for(i=a;i&&c[--i]===0;)c[i]=ts-1;--c[i],c[a]+=ts}c[a]-=f[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,on?Fr(t,m):t):new h(0)}function Pu(e,t,r){var n,a=Fn(e),i=To(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+dc(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+dc(-a-1)+i,r&&(n=r-o)>0&&(i+=dc(n))):a>=o?(i+=dc(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+dc(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=dc(n))),e.s<0?"-"+i:i}function g3(e,t){if(e.length>t)return e.length=t,!0}function _ee(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(au+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return p3(o,i.toString())}else if(typeof i!="string")throw Error(au+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,HUe.test(i))p3(o,i);else throw Error(au+i)}if(a.prototype=st,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=_ee,a.config=a.set=qUe,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function qUe(e){if(!e||typeof e!="object")throw Error(mi+"Object expected");var t,r,n,a=["precision",1,zm,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(Wm(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(au+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(au+r+": "+n);return this}var IA=_ee(VUe);Da=new IA(1);const Ir=IA;function YUe(e){return ZUe(e)||QUe(e)||KUe(e)||GUe()}function GUe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 734In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KUe(e,t){if(e){if(typeof e=="string")return O_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O_(e,t)}}function QUe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ZUe(e){if(Array.isArray(e))return O_(e)}function O_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var XUe=function(t){return t},Pee={"@@functional/placeholder":!0},Eee=function(t){return t===Pee},x3=function(t){return function r(){return arguments.length===0||arguments.length===1&&Eee(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},JUe=function e(t,r){return t===1?r:x3(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(l){return l!==Pee}).length;return o>=t?r.apply(void 0,a):e(t-o,x3(function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];var u=a.map(function(f){return Eee(f)?c.shift():f});return r.apply(void 0,YUe(u).concat(c))}))})},x1=function(t){return JUe(t.length,t)},A_=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},eze=x1(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),tze=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return XUe;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(l,c){return c(l)},i.apply(void 0,arguments))}},D_=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Oee=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(l,c){return l===r[c]})||(r=i,n=t.apply(void 0,i)),n}};function rze(e){var t;return e===0?t=1:t=Math.floor(new Ir(e).abs().log(10).toNumber())+1,t}function nze(e,t,r){for(var n=new Ir(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var sze=x1(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),aze=x1(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),ize=x1(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const v1={rangeStep:nze,getDigitCount:rze,interpolateNumber:sze,uninterpolateNumber:aze,uninterpolateTruncation:ize};function M_(e){return cze(e)||lze(e)||Aee(e)||oze()}function oze(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 735In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lze(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function cze(e){if(Array.isArray(e))return I_(e)}function Dx(e,t){return fze(e)||uze(e,t)||Aee(e,t)||dze()}function dze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 736In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aee(e,t){if(e){if(typeof e=="string")return I_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return I_(e,t)}}function I_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uze(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),l;!(n=(l=o.next()).done)&&(r.push(l.value),!(t&&r.length===t));n=!0);}catch(c){a=!0,i=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function fze(e){if(Array.isArray(e))return e}function Dee(e){var t=Dx(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function Mee(e,t,r){if(e.lte(0))return new Ir(0);var n=v1.getDigitCount(e.toNumber()),a=new Ir(10).pow(n),i=e.div(a),o=n!==1?.05:.1,l=new Ir(Math.ceil(i.div(o).toNumber())).add(r).mul(o),c=l.mul(a);return t?c:new Ir(Math.ceil(c))}function hze(e,t,r){var n=1,a=new Ir(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new Ir(10).pow(v1.getDigitCount(e)-1),a=new Ir(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new Ir(Math.floor(e)))}else e===0?a=new Ir(Math.floor((t-1)/2)):r||(a=new Ir(Math.floor(e)));var o=Math.floor((t-1)/2),l=tze(eze(function(c){return a.add(new Ir(c-o).mul(n)).toNumber()}),A_);return l(0,t)}function Iee(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new Ir(0),tickMin:new Ir(0),tickMax:new Ir(0)};var i=Mee(new Ir(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new Ir(0):(o=new Ir(e).add(t).div(2),o=o.sub(new Ir(o).mod(i)));var l=Math.ceil(o.sub(e).div(i).toNumber()),c=Math.ceil(new Ir(t).sub(o).div(i).toNumber()),d=l+c+1;return d>r?Iee(e,t,r,n,a+1):(d<r&&(c=t>0?c+(r-d):c,l=t>0?l:l+(r-d)),{step:i,tickMin:o.sub(new Ir(l).mul(i)),tickMax:o.add(new Ir(c).mul(i))})}function mze(e){var t=Dx(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),l=Dee([r,n]),c=Dx(l,2),d=c[0],u=c[1];if(d===-1/0||u===1/0){var f=u===1/0?[d].concat(M_(A_(0,a-1).map(function(){return 1/0}))):[].concat(M_(A_(0,a-1).map(function(){return-1/0})),[u]);return r>n?D_(f):f}if(d===u)return hze(d,a,i);var h=Iee(d,u,o,i),m=h.step,g=h.tickMin,x=h.tickMax,v=v1.rangeStep(g,x.add(new Ir(.1).mul(m)),m);return r>n?D_(v):v}function pze(e,t){var r=Dx(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Dee([n,a]),l=Dx(o,2),c=l[0],d=l[1];if(c===-1/0||d===1/0)return[n,a];if(c===d)return[c];var u=Math.max(t,2),f=Mee(new Ir(d).sub(c).div(u-1),i,0),h=[].concat(M_(v1.rangeStep(new Ir(c),new Ir(d).sub(new Ir(.99).mul(f)),f)),[d]);return n>a?D_(h):h}var gze=Oee(mze),xze=Oee(pze),vze="Invariant failed";function Eu(e,t){throw new Error(vze)}var yze=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Kh(e){"@babel/helpers - typeof";return Kh=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},Kh(e)}function Zj(){return Zj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zj.apply(this,arguments)}function bze(e,t){return Sze(e)||Nze(e,t)||wze(e,t)||jze()}function jze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 737In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wze(e,t){if(e){if(typeof e=="string")return v3(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v3(e,t)}}function v3(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nze(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function Sze(e){if(Array.isArray(e))return e}function kze(e,t){if(e==null)return{};var r=Cze(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Cze(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Tze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _ze(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Lee(n.key),n)}}function Pze(e,t,r){return t&&_ze(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Eze(e,t,r){return t=Xj(t),Oze(e,Ree()?Reflect.construct(t,r||[],Xj(e).constructor):t.apply(e,r))}function Oze(e,t){if(t&&(Kh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Aze(e)}function Aze(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ree(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ree=function(){return!!e})()}function Xj(e){return Xj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xj(e)}function Dze(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R_(e,t)}function R_(e,t){return R_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},R_(e,t)}function $ee(e,t,r){return t=Lee(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lee(e){var t=Mze(e,"string");return Kh(t)=="symbol"?t:t+""}function Mze(e,t){if(Kh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ty=function(e){function t(){return Tze(this,t),Eze(this,t,arguments)}return Dze(t,e),Pze(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,l=n.dataKey,c=n.data,d=n.dataPointFormatter,u=n.xAxis,f=n.yAxis,h=kze(n,yze),m=yt(h,!1);this.props.direction==="x"&&u.type!=="number"&&Eu();var g=c.map(function(x){var v=d(x,l),b=v.x,y=v.y,j=v.value,w=v.errorVal;if(!w)return null;var N=[],S,k;if(Array.isArray(w)){var T=bze(w,2);S=T[0],k=T[1]}else S=k=w;if(i==="vertical"){var C=u.scale,E=y+a,P=E+o,_=E-o,I=C(j-S),F=C(j+k);N.push({x1:F,y1:P,x2:F,y2:_}),N.push({x1:I,y1:E,x2:F,y2:E}),N.push({x1:I,y1:P,x2:I,y2:_})}else if(i==="horizontal"){var H=f.scale,W=b+a,z=W-o,R=W+o,q=H(j-S),V=H(j+k);N.push({x1:z,y1:V,x2:R,y2:V}),N.push({x1:W,y1:q,x2:W,y2:V}),N.push({x1:z,y1:q,x2:R,y2:q})}return O.createElement(xr,Zj({className:"recharts-errorBar",key:"bar-".concat(N.map(function(se){return"".concat(se.x1,"-").concat(se.x2,"-").concat(se.y1,"-").concat(se.y2)}))},m),N.map(function(se){return O.createElement("line",Zj({},se,{key:"line-".concat(se.x1,"-").concat(se.x2,"-").concat(se.y1,"-").concat(se.y2)}))}))});return O.createElement(xr,{className:"recharts-errorBars"},g)}}])}(O.Component);$ee(ty,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});$ee(ty,"displayName","ErrorBar");function Mx(e){"@babel/helpers - typeof";return Mx=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},Mx(e)}function y3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y3(Object(r),!0).forEach(function(n){Ize(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ize(e,t,r){return t=Rze(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rze(e){var t=$ze(e,"string");return Mx(t)=="symbol"?t:t+""}function $ze(e,t){if(Mx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Mx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fee=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=Ta(r,Gf);if(!o)return null;var l=Gf.defaultProps,c=l!==void 0?yd(yd({},l),o.props):{},d;return o.props&&o.props.payload?d=o.props&&o.props.payload:i==="children"?d=(n||[]).reduce(function(u,f){var h=f.item,m=f.props,g=m.sectors||m.data||[];return u.concat(g.map(function(x){return{type:o.props.iconType||h.props.legendType,value:x.name,color:x.fill,payload:x}}))},[]):d=(n||[]).map(function(u){var f=u.item,h=f.type.defaultProps,m=h!==void 0?yd(yd({},h),f.props):{},g=m.dataKey,x=m.name,v=m.legendType,b=m.hide;return{inactive:b,dataKey:g,type:c.iconType||v||"square",color:RA(f),value:x||g,payload:m}}),yd(yd(yd({},c),Gf.getWithHeight(o,a)),{},{payload:d,item:o})};function Ix(e){"@babel/helpers - typeof";return Ix=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},Ix(e)}function b3(e){return Uze(e)||Bze(e)||Fze(e)||Lze()}function Lze(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 738In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fze(e,t){if(e){if(typeof e=="string")return $_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $_(e,t)}}function Bze(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Uze(e){if(Array.isArray(e))return $_(e)}function $_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j3(Object(r),!0).forEach(function(n){Qf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qf(e,t,r){return t=zze(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zze(e){var t=Wze(e,"string");return Ix(t)=="symbol"?t:t+""}function Wze(e,t){if(Ix(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ix(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kn(e,t,r){return zt(e)||zt(t)?r:Xn(t)?Ba(e,t,r):Lt(t)?t(e):r}function pg(e,t,r,n){var a=BUe(e,function(l){return Kn(l,t)});if(r==="number"){var i=a.filter(function(l){return ze(l)||parseFloat(l)});return i.length?[g1(i),p1(i)]:[1/0,-1/0]}var o=n?a.filter(function(l){return!zt(l)}):a;return o.map(function(l){return Xn(l)||l instanceof Date?l:""})}var Vze=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,d=0;d<l;d++){var u=d>0?a[d-1].coordinate:a[l-1].coordinate,f=a[d].coordinate,h=d>=l-1?a[0].coordinate:a[d+1].coordinate,m=void 0;if(Qs(f-u)!==Qs(h-f)){var g=[];if(Qs(h-f)===Qs(c[1]-c[0])){m=h;var x=f+c[1]-c[0];g[0]=Math.min(x,(x+u)/2),g[1]=Math.max(x,(x+u)/2)}else{m=u;var v=h+c[1]-c[0];g[0]=Math.min(f,(v+f)/2),g[1]=Math.max(f,(v+f)/2)}var b=[Math.min(f,(m+f)/2),Math.max(f,(m+f)/2)];if(t>b[0]&&t<=b[1]||t>=g[0]&&t<=g[1]){o=a[d].index;break}}else{var y=Math.min(u,h),j=Math.max(u,h);if(t>(y+f)/2&&t<=(j+f)/2){o=a[d].index;break}}}else for(var w=0;w<l;w++)if(w===0&&t<=(n[w].coordinate+n[w+1].coordinate)/2||w>0&&w<l-1&&t>(n[w].coordinate+n[w-1].coordinate)/2&&t<=(n[w].coordinate+n[w+1].coordinate)/2||w===l-1&&t>(n[w].coordinate+n[w-1].coordinate)/2){o=n[w].index;break}return o},RA=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?jn(jn({},t.type.defaultProps),t.props):t.props,o=i.stroke,l=i.fill,c;switch(a){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},Hze=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},l=Object.keys(i),c=0,d=l.length;c<d;c++)for(var u=i[l[c]].stackGroups,f=Object.keys(u),h=0,m=f.length;h<m;h++){var g=u[f[h]],x=g.items,v=g.cateAxisId,b=x.filter(function(k){return kl(k.type).indexOf("Bar")>=0});if(b&&b.length){var y=b[0].type.defaultProps,j=y!==void 0?jn(jn({},y),b[0].props):b[0].props,w=j.barSize,N=j[v];o[N]||(o[N]=[]);var S=zt(w)?r:w;o[N].push({item:b[0],stackList:b.slice(1),barSize:zt(S)?void 0:Zs(S,n,0)})}}return o},qze=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,l=t.maxBarSize,c=o.length;if(c<1)return null;var d=Zs(r,a,0,!0),u,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,m=a/c,g=o.reduce(function(w,N){return w+N.barSize||0},0);g+=(c-1)*d,g>=a&&(g-=(c-1)*d,d=0),g>=a&&m>0&&(h=!0,m*=.9,g=c*m);var x=(a-g)/2>>0,v={offset:x-d,size:0};u=o.reduce(function(w,N){var S={item:N.item,position:{offset:v.offset+v.size+d,size:h?m:N.barSize}},k=[].concat(b3(w),[S]);return v=k[k.length-1].position,N.stackList&&N.stackList.length&&N.stackList.forEach(function(T){k.push({item:T,position:v})}),k},f)}else{var b=Zs(n,a,0,!0);a-2*b-(c-1)*d<=0&&(d=0);var y=(a-2*b-(c-1)*d)/c;y>1&&(y>>=0);var j=l===+l?Math.min(y,l):y;u=o.reduce(function(w,N,S){var k=[].concat(b3(w),[{item:N.item,position:{offset:b+(y+d)*S+(y-j)/2,size:j}}]);return N.stackList&&N.stackList.length&&N.stackList.forEach(function(T){k.push({item:T,position:k[k.length-1].position})}),k},f)}return u},Yze=function(t,r,n,a){var i=n.children,o=n.width,l=n.margin,c=o-(l.left||0)-(l.right||0),d=Fee({children:i,legendWidth:c});if(d){var u=a||{},f=u.width,h=u.height,m=d.align,g=d.verticalAlign,x=d.layout;if((x==="vertical"||x==="horizontal"&&g==="middle")&&m!=="center"&&ze(t[m]))return jn(jn({},t),{},Qf({},m,t[m]+(f||0)));if((x==="horizontal"||x==="vertical"&&m==="center")&&g!=="middle"&&ze(t[g]))return jn(jn({},t),{},Qf({},g,t[g]+(h||0)))}return t},Gze=function(t,r,n){return zt(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},Bee=function(t,r,n,a,i){var o=r.props.children,l=Ua(o,ty).filter(function(d){return Gze(a,i,d.props.direction)});if(l&&l.length){var c=l.map(function(d){return d.props.dataKey});return t.reduce(function(d,u){var f=Kn(u,n);if(zt(f))return d;var h=Array.isArray(f)?[g1(f),p1(f)]:[f,f],m=c.reduce(function(g,x){var v=Kn(u,x,0),b=h[0]-Math.abs(Array.isArray(v)?v[0]:v),y=h[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(b,g[0]),Math.max(y,g[1])]},[1/0,-1/0]);return[Math.min(m[0],d[0]),Math.max(m[1],d[1])]},[1/0,-1/0])}return null},Kze=function(t,r,n,a,i){var o=r.map(function(l){return Bee(t,l,n,i,a)}).filter(function(l){return!zt(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},Uee=function(t,r,n,a,i){var o=r.map(function(c){var d=c.props.dataKey;return n==="number"&&d&&Bee(t,c,d,a)||pg(t,d,n,i)});if(n==="number")return o.reduce(function(c,d){return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,d){for(var u=0,f=d.length;u<f;u++)l[d[u]]||(l[d[u]]=!0,c.push(d[u]));return c},[])},zee=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},Wee=function(t,r,n,a){if(a)return t.map(function(c){return c.coordinate});var i,o,l=t.map(function(c){return c.coordinate===r&&(i=!0),c.coordinate===n&&(o=!0),c.coordinate});return i||l.push(r),o||l.push(n),l},pl=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,d=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/c:0;if(d=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Qs(l[0]-l[1])*2*d:d,r&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(f){var h=i?i.indexOf(f):f;return{coordinate:a(h)+d,value:f,offset:d}});return u.filter(function(f){return!Gv(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:a(f)+d,value:f,index:h,offset:d}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+d,value:f,offset:d}}):a.domain().map(function(f,h){return{coordinate:a(f)+d,value:i?i[f]:f,index:h,offset:d}})},Ik=new WeakMap,ib=function(t,r){if(typeof r!="function")return t;Ik.has(t)||Ik.set(t,new WeakMap);var n=Ik.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},Vee=function(t,r,n){var a=t.scale,i=t.type,o=t.layout,l=t.axisType;if(a==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Tx(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:qj(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:mg(),realScaleType:"point"}:i==="category"?{scale:Tx(),realScaleType:"band"}:{scale:qj(),realScaleType:"linear"};if(Yv(a)){var c="scale".concat(e1(a));return{scale:(m3[c]||mg)(),realScaleType:m3[c]?c:"point"}}return Lt(a)?{scale:a}:{scale:mg(),realScaleType:"point"}},w3=1e-4,Hee=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-w3,o=Math.max(a[0],a[1])+w3,l=t(r[0]),c=t(r[n-1]);(l<i||l>o||c<i||c>o)&&t.domain([r[0],r[n-1]])}},Qze=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},Zze=function(t,r){if(!r||r.length!==2||!ze(r[0])||!ze(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!ze(t[0])||t[0]<n)&&(i[0]=n),(!ze(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},Xze=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,l=0;l<r;++l){var c=Gv(t[l][n][1])?t[l][n][0]:t[l][n][1];c>=0?(t[l][n][0]=i,t[l][n][1]=i+c,i=t[l][n][1]):(t[l][n][0]=o,t[l][n][1]=o+c,o=t[l][n][1])}},Jze=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var l=Gv(t[o][n][1])?t[o][n][0]:t[o][n][1];l>=0?(t[o][n][0]=i,t[o][n][1]=i+l,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},e9e={sign:Xze,expand:yMe,none:Uh,silhouette:bMe,wiggle:jMe,positive:Jze},t9e=function(t,r,n){var a=r.map(function(l){return l.props.dataKey}),i=e9e[n],o=vMe().keys(a).value(function(l,c){return+Kn(l,c,0)}).order(l_).offset(i);return o(t)},r9e=function(t,r,n,a,i,o){if(!t)return null;var l=o?r.reverse():r,c={},d=l.reduce(function(f,h){var m,g=(m=h.type)!==null&&m!==void 0&&m.defaultProps?jn(jn({},h.type.defaultProps),h.props):h.props,x=g.stackId,v=g.hide;if(v)return f;var b=g[n],y=f[b]||{hasStack:!1,stackGroups:{}};if(Xn(x)){var j=y.stackGroups[x]||{numericAxisId:n,cateAxisId:a,items:[]};j.items.push(h),y.hasStack=!0,y.stackGroups[x]=j}else y.stackGroups[$m("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[h]};return jn(jn({},f),{},Qf({},b,y))},c),u={};return Object.keys(d).reduce(function(f,h){var m=d[h];if(m.hasStack){var g={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(x,v){var b=m.stackGroups[v];return jn(jn({},x),{},Qf({},v,{numericAxisId:n,cateAxisId:a,items:b.items,stackedData:t9e(t,b.items,i)}))},g)}return jn(jn({},f),{},Qf({},h,m))},u)},qee=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,l=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var d=t.domain();if(!d.length)return null;var u=gze(d,i,l);return t.domain([g1(u),p1(u)]),{niceTicks:u}}if(i&&a==="number"){var f=t.domain(),h=xze(f,i,l);return{niceTicks:h}}return null};function N3(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!zt(a[t.dataKey])){var l=kj(r,"value",a[t.dataKey]);if(l)return l.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var c=Kn(a,zt(o)?t.dataKey:o);return zt(c)?null:t.scale(c)}var S3=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,l=t.index;if(r.type==="category")return n[l]?n[l].coordinate+a:null;var c=Kn(o,r.dataKey,r.domain[l]);return zt(c)?null:r.scale(c)-i/2+a},n9e=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},s9e=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?jn(jn({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Xn(i)){var o=r[i];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},a9e=function(t){return t.reduce(function(r,n){return[g1(n.concat([r[0]]).filter(ze)),p1(n.concat([r[1]]).filter(ze))]},[1/0,-1/0])},Yee=function(t,r,n){return Object.keys(t).reduce(function(a,i){var o=t[i],l=o.stackedData,c=l.reduce(function(d,u){var f=a9e(u.slice(r,n+1));return[Math.min(d[0],f[0]),Math.max(d[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},k3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,C3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,L_=function(t,r,n){if(Lt(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(ze(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(k3.test(t[0])){var i=+k3.exec(t[0])[1];a[0]=r[0]-i}else Lt(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(ze(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(C3.test(t[1])){var o=+C3.exec(t[1])[1];a[1]=r[1]+o}else Lt(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Jj=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=dA(r,function(f){return f.coordinate}),o=1/0,l=1,c=i.length;l<c;l++){var d=i[l],u=i[l-1];o=Math.min((d.coordinate||0)-(u.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},T3=function(t,r,n){return!t||!t.length||ey(t,Ba(n,"type.defaultProps.domain"))?r:t},Gee=function(t,r){var n=t.type.defaultProps?jn(jn({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,l=n.formatter,c=n.tooltipType,d=n.chartType,u=n.hide;return jn(jn({},yt(t,!1)),{},{dataKey:a,unit:o,formatter:l,name:i||a,color:RA(t),value:Kn(r,a),type:c,payload:r,chartType:d,hide:u})};function Rx(e){"@babel/helpers - typeof";return Rx=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},Rx(e)}function _3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function al(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_3(Object(r),!0).forEach(function(n){Kee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kee(e,t,r){return t=i9e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i9e(e){var t=o9e(e,"string");return Rx(t)=="symbol"?t:t+""}function o9e(e,t){if(Rx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l9e(e,t){return f9e(e)||u9e(e,t)||d9e(e,t)||c9e()}function c9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 739In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d9e(e,t){if(e){if(typeof e=="string")return P3(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P3(e,t)}}function P3(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u9e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function f9e(e){if(Array.isArray(e))return e}var ew=Math.PI/180,h9e=function(t){return t*180/Math.PI},Vr=function(t,r,n,a){return{x:t+Math.cos(-ew*a)*n,y:r+Math.sin(-ew*a)*n}},Qee=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},m9e=function(t,r,n,a,i){var o=t.width,l=t.height,c=t.startAngle,d=t.endAngle,u=Zs(t.cx,o,o/2),f=Zs(t.cy,l,l/2),h=Qee(o,l,n),m=Zs(t.innerRadius,h,0),g=Zs(t.outerRadius,h,h*.8),x=Object.keys(r);return x.reduce(function(v,b){var y=r[b],j=y.domain,w=y.reversed,N;if(zt(y.range))a==="angleAxis"?N=[c,d]:a==="radiusAxis"&&(N=[m,g]),w&&(N=[N[1],N[0]]);else{N=y.range;var S=N,k=l9e(S,2);c=k[0],d=k[1]}var T=Vee(y,i),C=T.realScaleType,E=T.scale;E.domain(j).range(N),Hee(E);var P=qee(E,al(al({},y),{},{realScaleType:C})),_=al(al(al({},y),P),{},{range:N,radius:g,realScaleType:C,scale:E,cx:u,cy:f,innerRadius:m,outerRadius:g,startAngle:c,endAngle:d});return al(al({},v),{},Kee({},b,_))},{})},p9e=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},g9e=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,l=p9e({x:n,y:a},{x:i,y:o});if(l<=0)return{radius:l};var c=(n-i)/l,d=Math.acos(c);return a>o&&(d=2*Math.PI-d),{radius:l,angle:h9e(d),angleInRadian:d}},x9e=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},v9e=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),l=Math.min(i,o);return t+l*360},E3=function(t,r){var n=t.x,a=t.y,i=g9e({x:n,y:a},r),o=i.radius,l=i.angle,c=r.innerRadius,d=r.outerRadius;if(o<c||o>d)return!1;if(o===0)return!0;var u=x9e(r),f=u.startAngle,h=u.endAngle,m=l,g;if(f<=h){for(;m>h;)m-=360;for(;m<f;)m+=360;g=m>=f&&m<=h}else{for(;m>f;)m-=360;for(;m<h;)m+=360;g=m>=h&&m<=f}return g?al(al({},r),{},{radius:o,angle:v9e(m,r)}):null},Zee=function(t){return!p.isValidElement(t)&&!Lt(t)&&typeof t!="boolean"?t.className:""};function $x(e){"@babel/helpers - typeof";return $x=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},$x(e)}var y9e=["offset"];function b9e(e){return S9e(e)||N9e(e)||w9e(e)||j9e()}function j9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 740In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w9e(e,t){if(e){if(typeof e=="string")return F_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F_(e,t)}}function N9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function S9e(e){if(Array.isArray(e))return F_(e)}function F_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function k9e(e,t){if(e==null)return{};var r=C9e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function C9e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function O3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function zn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O3(Object(r),!0).forEach(function(n){T9e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T9e(e,t,r){return t=_9e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _9e(e){var t=P9e(e,"string");return $x(t)=="symbol"?t:t+""}function P9e(e,t){if($x(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($x(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lx(){return Lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lx.apply(this,arguments)}var E9e=function(t){var r=t.value,n=t.formatter,a=zt(t.children)?r:t.children;return Lt(n)?n(a):a},O9e=function(t,r){var n=Qs(r-t),a=Math.min(Math.abs(r-t),360);return n*a},A9e=function(t,r,n){var a=t.position,i=t.viewBox,o=t.offset,l=t.className,c=i,d=c.cx,u=c.cy,f=c.innerRadius,h=c.outerRadius,m=c.startAngle,g=c.endAngle,x=c.clockWise,v=(f+h)/2,b=O9e(m,g),y=b>=0?1:-1,j,w;a==="insideStart"?(j=m+y*o,w=x):a==="insideEnd"?(j=g-y*o,w=!x):a==="end"&&(j=g+y*o,w=x),w=b<=0?w:!w;var N=Vr(d,u,v,j),S=Vr(d,u,v,j+(w?1:-1)*359),k="M".concat(N.x,",").concat(N.y,` 741 A`).concat(v,",").concat(v,",0,1,").concat(w?0:1,`, 742 `).concat(S.x,",").concat(S.y),T=zt(t.id)?$m("recharts-radial-line-"):t.id;return O.createElement("text",Lx({},n,{dominantBaseline:"central",className:ht("recharts-radial-bar-label",l)}),O.createElement("defs",null,O.createElement("path",{id:T,d:k})),O.createElement("textPath",{xlinkHref:"#".concat(T)},r))},D9e=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,o=i.cx,l=i.cy,c=i.innerRadius,d=i.outerRadius,u=i.startAngle,f=i.endAngle,h=(u+f)/2;if(a==="outside"){var m=Vr(o,l,d+n,h),g=m.x,x=m.y;return{x:g,y:x,textAnchor:g>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var v=(c+d)/2,b=Vr(o,l,v,h),y=b.x,j=b.y;return{x:y,y:j,textAnchor:"middle",verticalAnchor:"middle"}},M9e=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,o=r,l=o.x,c=o.y,d=o.width,u=o.height,f=u>=0?1:-1,h=f*a,m=f>0?"end":"start",g=f>0?"start":"end",x=d>=0?1:-1,v=x*a,b=x>0?"end":"start",y=x>0?"start":"end";if(i==="top"){var j={x:l+d/2,y:c-f*a,textAnchor:"middle",verticalAnchor:m};return zn(zn({},j),n?{height:Math.max(c-n.y,0),width:d}:{})}if(i==="bottom"){var w={x:l+d/2,y:c+u+h,textAnchor:"middle",verticalAnchor:g};return zn(zn({},w),n?{height:Math.max(n.y+n.height-(c+u),0),width:d}:{})}if(i==="left"){var N={x:l-v,y:c+u/2,textAnchor:b,verticalAnchor:"middle"};return zn(zn({},N),n?{width:Math.max(N.x-n.x,0),height:u}:{})}if(i==="right"){var S={x:l+d+v,y:c+u/2,textAnchor:y,verticalAnchor:"middle"};return zn(zn({},S),n?{width:Math.max(n.x+n.width-S.x,0),height:u}:{})}var k=n?{width:d,height:u}:{};return i==="insideLeft"?zn({x:l+v,y:c+u/2,textAnchor:y,verticalAnchor:"middle"},k):i==="insideRight"?zn({x:l+d-v,y:c+u/2,textAnchor:b,verticalAnchor:"middle"},k):i==="insideTop"?zn({x:l+d/2,y:c+h,textAnchor:"middle",verticalAnchor:g},k):i==="insideBottom"?zn({x:l+d/2,y:c+u-h,textAnchor:"middle",verticalAnchor:m},k):i==="insideTopLeft"?zn({x:l+v,y:c+h,textAnchor:y,verticalAnchor:g},k):i==="insideTopRight"?zn({x:l+d-v,y:c+h,textAnchor:b,verticalAnchor:g},k):i==="insideBottomLeft"?zn({x:l+v,y:c+u-h,textAnchor:y,verticalAnchor:m},k):i==="insideBottomRight"?zn({x:l+d-v,y:c+u-h,textAnchor:b,verticalAnchor:m},k):Dm(i)&&(ze(i.x)||Ld(i.x))&&(ze(i.y)||Ld(i.y))?zn({x:l+Zs(i.x,d),y:c+Zs(i.y,u),textAnchor:"end",verticalAnchor:"end"},k):zn({x:l+d/2,y:c+u/2,textAnchor:"middle",verticalAnchor:"middle"},k)},I9e=function(t){return"cx"in t&&ze(t.cx)};function ns(e){var t=e.offset,r=t===void 0?5:t,n=k9e(e,y9e),a=zn({offset:r},n),i=a.viewBox,o=a.position,l=a.value,c=a.children,d=a.content,u=a.className,f=u===void 0?"":u,h=a.textBreakAll;if(!i||zt(l)&&zt(c)&&!p.isValidElement(d)&&!Lt(d))return null;if(p.isValidElement(d))return p.cloneElement(d,a);var m;if(Lt(d)){if(m=p.createElement(d,a),p.isValidElement(m))return m}else m=E9e(a);var g=I9e(i),x=yt(a,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return A9e(a,m,x);var v=g?D9e(a):M9e(a);return O.createElement(_u,Lx({className:ht("recharts-label",f)},x,v,{breakAll:h}),m)}ns.displayName="Label";var Xee=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,d=t.innerRadius,u=t.outerRadius,f=t.x,h=t.y,m=t.top,g=t.left,x=t.width,v=t.height,b=t.clockWise,y=t.labelViewBox;if(y)return y;if(ze(x)&&ze(v)){if(ze(f)&&ze(h))return{x:f,y:h,width:x,height:v};if(ze(m)&&ze(g))return{x:m,y:g,width:x,height:v}}return ze(f)&&ze(h)?{x:f,y:h,width:0,height:0}:ze(r)&&ze(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:d||0,outerRadius:u||c||l||0,clockWise:b}:t.viewBox?t.viewBox:{}},R9e=function(t,r){return t?t===!0?O.createElement(ns,{key:"label-implicit",viewBox:r}):Xn(t)?O.createElement(ns,{key:"label-implicit",viewBox:r,value:t}):p.isValidElement(t)?t.type===ns?p.cloneElement(t,{key:"label-implicit",viewBox:r}):O.createElement(ns,{key:"label-implicit",content:t,viewBox:r}):Lt(t)?O.createElement(ns,{key:"label-implicit",content:t,viewBox:r}):Dm(t)?O.createElement(ns,Lx({viewBox:r},t,{key:"label-implicit"})):null:null},$9e=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=Xee(t),o=Ua(a,ns).map(function(c,d){return p.cloneElement(c,{viewBox:r||i,key:"label-".concat(d)})});if(!n)return o;var l=R9e(t.label,r||i);return[l].concat(b9e(o))};ns.parseViewBox=Xee;ns.renderCallByParent=$9e;function L9e(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var F9e=L9e;const B9e=ur(F9e);function Fx(e){"@babel/helpers - typeof";return Fx=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},Fx(e)}var U9e=["valueAccessor"],z9e=["data","dataKey","clockWise","id","textBreakAll"];function W9e(e){return Y9e(e)||q9e(e)||H9e(e)||V9e()}function V9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 743In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H9e(e,t){if(e){if(typeof e=="string")return B_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return B_(e,t)}}function q9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Y9e(e){if(Array.isArray(e))return B_(e)}function B_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function tw(){return tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tw.apply(this,arguments)}function A3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function D3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A3(Object(r),!0).forEach(function(n){G9e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function G9e(e,t,r){return t=K9e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K9e(e){var t=Q9e(e,"string");return Fx(t)=="symbol"?t:t+""}function Q9e(e,t){if(Fx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Fx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function M3(e,t){if(e==null)return{};var r=Z9e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Z9e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var X9e=function(t){return Array.isArray(t.value)?B9e(t.value):t.value};function Tl(e){var t=e.valueAccessor,r=t===void 0?X9e:t,n=M3(e,U9e),a=n.data,i=n.dataKey,o=n.clockWise,l=n.id,c=n.textBreakAll,d=M3(n,z9e);return!a||!a.length?null:O.createElement(xr,{className:"recharts-label-list"},a.map(function(u,f){var h=zt(i)?r(u,f):Kn(u&&u.payload,i),m=zt(l)?{}:{id:"".concat(l,"-").concat(f)};return O.createElement(ns,tw({},yt(u,!0),d,m,{parentViewBox:u.parentViewBox,value:h,textBreakAll:c,viewBox:ns.parseViewBox(zt(o)?u:D3(D3({},u),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Tl.displayName="LabelList";function J9e(e,t){return e?e===!0?O.createElement(Tl,{key:"labelList-implicit",data:t}):O.isValidElement(e)||Lt(e)?O.createElement(Tl,{key:"labelList-implicit",data:t,content:e}):Dm(e)?O.createElement(Tl,tw({data:t},e,{key:"labelList-implicit"})):null:null}function eWe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=Ua(n,Tl).map(function(o,l){return p.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!r)return a;var i=J9e(e.label,t);return[i].concat(W9e(a))}Tl.renderCallByParent=eWe;function Bx(e){"@babel/helpers - typeof";return Bx=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},Bx(e)}function U_(){return U_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U_.apply(this,arguments)}function I3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function R3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I3(Object(r),!0).forEach(function(n){tWe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tWe(e,t,r){return t=rWe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rWe(e){var t=nWe(e,"string");return Bx(t)=="symbol"?t:t+""}function nWe(e,t){if(Bx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sWe=function(t,r){var n=Qs(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},ob=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,d=t.cornerIsExternal,u=c*(l?1:-1)+a,f=Math.asin(c/u)/ew,h=d?i:i+o*f,m=Vr(r,n,u,h),g=Vr(r,n,a,h),x=d?i-o*f:i,v=Vr(r,n,u*Math.cos(f*ew),x);return{center:m,circleTangency:g,lineTangency:v,theta:f}},Jee=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,l=t.endAngle,c=sWe(o,l),d=o+c,u=Vr(r,n,i,o),f=Vr(r,n,i,d),h="M ".concat(u.x,",").concat(u.y,` 744 A `).concat(i,",").concat(i,`,0, 745 `).concat(+(Math.abs(c)>180),",").concat(+(o>d),`, 746 `).concat(f.x,",").concat(f.y,` 747 `);if(a>0){var m=Vr(r,n,a,o),g=Vr(r,n,a,d);h+="L ".concat(g.x,",").concat(g.y,` 748 A `).concat(a,",").concat(a,`,0, 749 `).concat(+(Math.abs(c)>180),",").concat(+(o<=d),`, 750 `).concat(m.x,",").concat(m.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},aWe=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,d=t.startAngle,u=t.endAngle,f=Qs(u-d),h=ob({cx:r,cy:n,radius:i,angle:d,sign:f,cornerRadius:o,cornerIsExternal:c}),m=h.circleTangency,g=h.lineTangency,x=h.theta,v=ob({cx:r,cy:n,radius:i,angle:u,sign:-f,cornerRadius:o,cornerIsExternal:c}),b=v.circleTangency,y=v.lineTangency,j=v.theta,w=c?Math.abs(d-u):Math.abs(d-u)-x-j;if(w<0)return l?"M ".concat(g.x,",").concat(g.y,` 751 a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 752 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 753 `):Jee({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:d,endAngle:u});var N="M ".concat(g.x,",").concat(g.y,` 754 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(m.x,",").concat(m.y,` 755 A`).concat(i,",").concat(i,",0,").concat(+(w>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,` 756 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(y.x,",").concat(y.y,` 757 `);if(a>0){var S=ob({cx:r,cy:n,radius:a,angle:d,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),k=S.circleTangency,T=S.lineTangency,C=S.theta,E=ob({cx:r,cy:n,radius:a,angle:u,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),P=E.circleTangency,_=E.lineTangency,I=E.theta,F=c?Math.abs(d-u):Math.abs(d-u)-C-I;if(F<0&&o===0)return"".concat(N,"L").concat(r,",").concat(n,"Z");N+="L".concat(_.x,",").concat(_.y,` 758 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,` 759 A`).concat(a,",").concat(a,",0,").concat(+(F>180),",").concat(+(f>0),",").concat(k.x,",").concat(k.y,` 760 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(T.x,",").concat(T.y,"Z")}else N+="L".concat(r,",").concat(n,"Z");return N},iWe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},ete=function(t){var r=R3(R3({},iWe),t),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,d=r.cornerIsExternal,u=r.startAngle,f=r.endAngle,h=r.className;if(o<i||u===f)return null;var m=ht("recharts-sector",h),g=o-i,x=Zs(l,g,0,!0),v;return x>0&&Math.abs(u-f)<360?v=aWe({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(x,g/2),forceCornerRadius:c,cornerIsExternal:d,startAngle:u,endAngle:f}):v=Jee({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f}),O.createElement("path",U_({}
760,yt(r,!0),{className:m,d:v,role:"img"}))};function Ux(e){"@babel/helpers - typeof";return Ux=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},Ux(e)}function z_(){return z_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z_.apply(this,arguments)}function $3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function L3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$3(Object(r),!0).forEach(function(n){oWe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oWe(e,t,r){return t=lWe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lWe(e){var t=cWe(e,"string");return Ux(t)=="symbol"?t:t+""}function cWe(e,t){if(Ux(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ux(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F3={curveBasisClosed:oMe,curveBasisOpen:lMe,curveBasis:iMe,curveBumpX:qDe,curveBumpY:YDe,curveLinearClosed:cMe,curveLinear:r1,curveMonotoneX:dMe,curveMonotoneY:uMe,curveNatural:fMe,curveStep:hMe,curveStepAfter:pMe,curveStepBefore:mMe},lb=function(t){return t.x===+t.x&&t.y===+t.y},Pp=function(t){return t.x},Ep=function(t){return t.y},dWe=function(t,r){if(Lt(t))return t;var n="curve".concat(e1(t));return(n==="curveMonotone"||n==="curveBump")&&r?F3["".concat(n).concat(r==="vertical"?"Y":"X")]:F3[n]||r1},uWe=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,o=t.baseLine,l=t.layout,c=t.connectNulls,d=c===void 0?!1:c,u=dWe(n,l),f=d?i.filter(function(x){return lb(x)}):i,h;if(Array.isArray(o)){var m=d?o.filter(function(x){return lb(x)}):o,g=f.map(function(x,v){return L3(L3({},x),{},{base:m[v]})});return l==="vertical"?h=Zy().y(Ep).x1(Pp).x0(function(x){return x.base.x}):h=Zy().x(Pp).y1(Ep).y0(function(x){return x.base.y}),h.defined(lb).curve(u),h(g)}return l==="vertical"&&ze(o)?h=Zy().y(Ep).x1(Pp).x0(o):ze(o)?h=Zy().x(Pp).y1(Ep).y0(o):h=GX().x(Pp).y(Ep),h.defined(lb).curve(u),h(f)},rw=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?uWe(t):a;return O.createElement("path",z_({},yt(t,!1),Cj(t),{className:ht("recharts-curve",r),d:o,ref:i}))},fWe=Object.getOwnPropertyNames,hWe=Object.getOwnPropertySymbols,mWe=Object.prototype.hasOwnProperty;function B3(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function cb(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,o=i.get(r),l=i.get(n);if(o&&l)return o===n&&l===r;i.set(r,n),i.set(n,r);var c=e(r,n,a);return i.delete(r),i.delete(n),c}}function U3(e){return fWe(e).concat(hWe(e))}var tte=Object.hasOwn||function(e,t){return mWe.call(e,t)};function Vm(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var rte="_owner",z3=Object.getOwnPropertyDescriptor,W3=Object.keys;function pWe(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function gWe(e,t){return Vm(e.getTime(),t.getTime())}function V3(e,t,r){if(e.size!==t.size)return!1;for(var n={},a=e.entries(),i=0,o,l;(o=a.next())&&!o.done;){for(var c=t.entries(),d=!1,u=0;(l=c.next())&&!l.done;){var f=o.value,h=f[0],m=f[1],g=l.value,x=g[0],v=g[1];!d&&!n[u]&&(d=r.equals(h,x,i,u,e,t,r)&&r.equals(m,v,h,x,e,t,r))&&(n[u]=!0),u++}if(!d)return!1;i++}return!0}function xWe(e,t,r){var n=W3(e),a=n.length;if(W3(t).length!==a)return!1;for(var i;a-- >0;)if(i=n[a],i===rte&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!tte(t,i)||!r.equals(e[i],t[i],i,i,e,t,r))return!1;return!0}function Op(e,t,r){var n=U3(e),a=n.length;if(U3(t).length!==a)return!1;for(var i,o,l;a-- >0;)if(i=n[a],i===rte&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!tte(t,i)||!r.equals(e[i],t[i],i,i,e,t,r)||(o=z3(e,i),l=z3(t,i),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function vWe(e,t){return Vm(e.valueOf(),t.valueOf())}function yWe(e,t){return e.source===t.source&&e.flags===t.flags}function H3(e,t,r){if(e.size!==t.size)return!1;for(var n={},a=e.values(),i,o;(i=a.next())&&!i.done;){for(var l=t.values(),c=!1,d=0;(o=l.next())&&!o.done;)!c&&!n[d]&&(c=r.equals(i.value,o.value,i.value,o.value,e,t,r))&&(n[d]=!0),d++;if(!c)return!1}return!0}function bWe(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}var jWe="[object Arguments]",wWe="[object Boolean]",NWe="[object Date]",SWe="[object Map]",kWe="[object Number]",CWe="[object Object]",TWe="[object RegExp]",_We="[object Set]",PWe="[object String]",EWe=Array.isArray,q3=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Y3=Object.assign,OWe=Object.prototype.toString.call.bind(Object.prototype.toString);function AWe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areMapsEqual,a=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,o=e.areRegExpsEqual,l=e.areSetsEqual,c=e.areTypedArraysEqual;return function(u,f,h){if(u===f)return!0;
760if(u==null||f==null||typeof u!="object"||typeof f!="object")return u!==u&&f!==f;var m=u.constructor;if(m!==f.constructor)return!1;if(m===Object)return a(u,f,h);if(EWe(u))return t(u,f,h);if(q3!=null&&q3(u))return c(u,f,h);if(m===Date)return r(u,f,h);if(m===RegExp)return o(u,f,h);if(m===Map)return n(u,f,h);if(m===Set)return l(u,f,h);var g=OWe(u);return g===NWe?r(u,f,h):g===TWe?o(u,f,h):g===SWe?n(u,f,h):g===_We?l(u,f,h):g===CWe?typeof u.then!="function"&&typeof f.then!="function"&&a(u,f,h):g===jWe?a(u,f,h):g===wWe||g===kWe||g===PWe?i(u,f,h):!1}}function DWe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?Op:pWe,areDatesEqual:gWe,areMapsEqual:n?B3(V3,Op):V3,areObjectsEqual:n?Op:xWe,arePrimitiveWrappersEqual:vWe,areRegExpsEqual:yWe,areSetsEqual:n?B3(H3,Op):H3,areTypedArraysEqual:n?Op:bWe};if(r&&(a=Y3({},a,r(a))),t){var i=cb(a.areArraysEqual),o=cb(a.areMapsEqual),l=cb(a.areObjectsEqual),c=cb(a.areSetsEqual);a=Y3({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return a}function MWe(e){return function(t,r,n,a,i,o,l){return e(t,r,l)}}function IWe(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(c,d){var u=n(),f=u.cache,h=f===void 0?t?new WeakMap:void 0:f,m=u.meta;return r(c,d,{cache:h,equals:a,meta:m,strict:i})};if(t)return function(c,d){return r(c,d,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(c,d){return r(c,d,o)}}var RWe=xd();xd({strict:!0});xd({circular:!0});xd({circular:!0,strict:!0});xd({createInternalComparator:function(){return Vm}});xd({strict:!0,createInternalComparator:function(){return Vm}});xd({circular:!0,createInternalComparator:function(){return Vm}});xd({circular:!0,createInternalComparator:function(){return Vm},strict:!0});function xd(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,l=DWe(e),c=AWe(l),d=n?n(c):MWe(c);return IWe({circular:r,comparator:c,createState:a,equals:d,strict:o})}function $We(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function G3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):$We(a)};requestAnimationFrame(n)}function W_(e){"@babel/helpers - typeof";return W_=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},W_(e)}function LWe(e){return zWe(e)||UWe(e)||BWe(e)||FWe()}function FWe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 761In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BWe(e,t){if(e){if(typeof e=="string")return K3(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return K3(e,t)}}function K3(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function UWe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zWe(e){if(Array.isArray(e))return e}function WWe(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,l=LWe(o),c=l[0],d=l.slice(1);if(typeof c=="number"){G3(a.bind(null,d),c);return}a(c),G3(a.bind(null,d));return}W_(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function zx(e){"@babel/helpers - typeof";return zx=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},zx(e)}function Q3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Z3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
vendor: 58,863 bytes, lines 761-779
761t%2?Q3(Object(r),!0).forEach(function(n){nte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nte(e,t,r){return t=VWe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VWe(e){var t=HWe(e,"string");return zx(t)==="symbol"?t:String(t)}function HWe(e,t){if(zx(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(zx(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qWe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},YWe=function(t){return t},GWe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},gg=function(t,r){return Object.keys(r).reduce(function(n,a){return Z3(Z3({},n),{},nte({},a,t(a,r[a])))},{})},X3=function(t,r,n){return t.map(function(a){return"".concat(GWe(a)," ").concat(r,"ms ").concat(n)}).join(",")};function KWe(e,t){return XWe(e)||ZWe(e,t)||ste(e,t)||QWe()}function QWe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 762In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZWe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function XWe(e){if(Array.isArray(e))return e}function JWe(e){return rVe(e)||tVe(e)||ste(e)||eVe()}function eVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 763In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ste(e,t){if(e){if(typeof e=="string")return V_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V_(e,t)}}function tVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rVe(e){if(Array.isArray(e))return V_(e)}function V_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var nw=1e-4,ate=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},ite=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},J3=function(t,r){return function(n){var a=ate(t,r);return ite(a,n)}},nVe=function(t,r){return function(n){var a=ate(t,r),i=[].concat(JWe(a.map(function(o,l){return o*l}).slice(1)),[0]);return ite(i,n)}},eF=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,l=1;break;case"ease":a=.25,i=.1,o=.25,l=1;break;case"ease-in":a=.42,i=0,o=1,l=1;break;case"ease-out":a=.42,i=0,o=.58,l=1;break;case"ease-in-out":a=0,i=0,o=.58,l=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var d=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),u=KWe(d,4);a=u[0],i=u[1],o=u[2],l=u[3]}}}var f=J3(a,o),h=J3(i,l),m=nVe(a,o),g=function(b){return b>1?1:b<0?0:b},x=function(b){for(var y=b>1?1:b,j=y,w=0;w<8;++w){var N=f(j)-y,S=m(j);if(Math.abs(N-y)<nw||S<nw)return h(j);j=g(j-N/S)}return h(j)};return x.isStepper=!1,x},sVe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,o=t.dt,l=o===void 0?17:o,c=function(u,f,h){var m=-(u-f)*n,g=h*i,x=h+(m-g)*l/1e3,v=h*l/1e3+u;return Math.abs(v-f)<nw&&Math.abs(x)<nw?[f,0]:[v,x]};return c.isStepper=!0,c.dt=l,c},aVe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return eF(a);case"spring":return sVe();default:if(a.split("(")[0]==="cubic-bezier")return eF(a)}return typeof a=="function"?a:null};function Wx(e){"@babel/helpers - typeof";return Wx=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},Wx(e)}function tF(e){return lVe(e)||oVe(e)||ote(e)||iVe()}function iVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 764In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lVe(e){if(Array.isArray(e))return q_(e)}function rF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ds(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rF(Object(r),!0).forEach(function(n){H_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H_(e,t,r){return t=cVe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cVe(e){var t=dVe(e,"string");return Wx(t)==="symbol"?t:String(t)}function dVe(e,t){if(Wx(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wx(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uVe(e,t){return mVe(e)||hVe(e,t)||ote(e,t)||fVe()}function fVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 765In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ote(e,t){if(e){if(typeof e=="string")return q_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return q_(e,t)}}function q_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hVe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function mVe(e){if(Array.isArray(e))return e}var sw=function(t,r,n){return t+(r-t)*n},Y_=function(t){var r=t.from,n=t.to;return r!==n},pVe=function e(t,r,n){var a=gg(function(i,o){if(Y_(o)){var l=t(o.from,o.to,o.velocity),c=uVe(l,2),d=c[0],u=c[1];return ds(ds({},o),{},{from:d,velocity:u})}return o},r);return n<1?gg(function(i,o){return Y_(o)?ds(ds({},o),{},{velocity:sw(o.velocity,a[i].velocity,n),from:sw(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const gVe=function(e,t,r,n,a){var i=qWe(e,t),o=i.reduce(function(v,b){return ds(ds({},v),{},H_({},b,[e[b],t[b]]))},{}),l=i.reduce(function(v,b){return ds(ds({},v),{},H_({},b,{from:e[b],velocity:0,to:t[b]}))},{}),c=-1,d,u,f=function(){return null},h=function(){return gg(function(b,y){return y.from},l)},m=function(){return!Object.values(l).filter(Y_).length},g=function(b){d||(d=b);var y=b-d,j=y/r.dt;l=pVe(r,l,j),a(ds(ds(ds({},e),t),h())),d=b,m()||(c=requestAnimationFrame(f))},x=function(b){u||(u=b);var y=(b-u)/n,j=gg(function(N,S){return sw.apply(void 0,tF(S).concat([r(y)]))},o);if(a(ds(ds(ds({},e),t),j)),y<1)c=requestAnimationFrame(f);else{var w=gg(function(N,S){return sw.apply(void 0,tF(S).concat([r(1)]))},o);a(ds(ds(ds({},e),t),w))}};return f=r.isStepper?g:x,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}};function Qh(e){"@babel/helpers - typeof";return Qh=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},Qh(e)}var xVe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function vVe(e,t){if(e==null)return{};var r=yVe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yVe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Rk(e){return NVe(e)||wVe(e)||jVe(e)||bVe()}function bVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 766In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jVe(e,t){if(e){if(typeof e=="string")return G_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return G_(e,t)}}function wVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NVe(e){if(Array.isArray(e))return G_(e)}function G_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nF(Object(r),!0).forEach(function(n){Qp(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qp(e,t,r){return t=lte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kVe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lte(n.key),n)}}function CVe(e,t,r){return t&&kVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lte(e){var t=TVe(e,"string");return Qh(t)==="symbol"?t:String(t)}function TVe(e,t){if(Qh(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qh(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _Ve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K_(e,t)}function K_(e,t){return K_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},K_(e,t)}function PVe(e){var t=EVe();return function(){var n=aw(e),a;if(t){var i=aw(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return Q_(this,a)}}function Q_(e,t){if(t&&(Qh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z_(e)}function Z_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EVe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function aw(e){return aw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},aw(e)}var zo=function(e){_Ve(r,e);var t=PVe(r);function r(n,a){var i;SVe(this,r),i=t.call(this,n,a);var o=i.props,l=o.isActive,c=o.attributeName,d=o.from,u=o.to,f=o.steps,h=o.children,m=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(Z_(i)),i.changeStyle=i.changeStyle.bind(Z_(i)),!l||m<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:u}),Q_(i);if(f&&f.length)i.state={style:f[0].style};else if(d){if(typeof h=="function")return i.state={style:d},Q_(i);i.state={style:c?Qp({},c,d):d}}else i.state={style:{}};return i}return CVe(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,l=i.canBegin,c=i.attributeName,d=i.shouldReAnimate,u=i.to,f=i.from,h=this.state.style;if(l){if(!o){var m={style:c?Qp({},c,u):u};this.state&&h&&(c&&h[c]!==u||!c&&h!==u)&&this.setState(m);return}if(!(RWe(a.to,u)&&a.canBegin&&a.isActive)){var g=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=g||d?f:a.to;if(this.state&&h){var v={style:c?Qp({},c,x):x};(c&&h[c]!==x||!c&&h!==x)&&this.setState(v)}this.runAnimation(yi(yi({},this.props),{},{from:x,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,l=a.to,c=a.duration,d=a.easing,u=a.begin,f=a.onAnimationEnd,h=a.onAnimationStart,m=gVe(o,l,aVe(d),c,this.changeStyle),g=function(){i.stopJSAnimation=m()};this.manager.start([h,u,g,c,f])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,l=a.begin,c=a.onAnimationStart,d=o[0],u=d.style,f=d.duration,h=f===void 0?0:f,m=function(x,v,b){if(b===0)return x;var y=v.duration,j=v.easing,w=j===void 0?"ease":j,N=v.style,S=v.properties,k=v.onAnimationEnd,T=b>0?o[b-1]:v,C=S||Object.keys(N);if(typeof w=="function"||w==="spring")return[].concat(Rk(x),[i.runJSAnimation.bind(i,{from:T.style,to:N,duration:y,easing:w}),y]);var E=X3(C,y,w),P=yi(yi(yi({},T.style),N),{},{transition:E});return[].concat(Rk(x),[P,y,k]).filter(YWe)};return this.manager.start([c].concat(Rk(o.reduce(m,[u,Math.max(h,l)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=WWe());var i=a.begin,o=a.duration,l=a.attributeName,c=a.to,d=a.easing,u=a.onAnimationStart,f=a.onAnimationEnd,h=a.steps,m=a.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof d=="function"||typeof m=="function"||d==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var x=l?Qp({},l,c):c,v=X3(Object.keys(x),o,d);g.start([u,i,yi(yi({},x),{},{transition:v}),o,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var l=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=vVe(a,xVe),d=p.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!l||d===0||o<=0)return i;var f=function(m){var g=m.props,x=g.style,v=x===void 0?{}:x,b=g.className,y=p.cloneElement(m,yi(yi({},c),{},{style:yi(yi({},v),u),className:b}));return y};return d===1?f(p.Children.only(i)):O.createElement("div",null,p.Children.map(i,function(h){return f(h)}))}}]),r}(p.PureComponent);zo.displayName="Animate";zo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};zo.propTypes={from:ge.oneOfType([ge.object,ge.string]),to:ge.oneOfType([ge.object,ge.string]),attributeName:ge.string,duration:ge.number,begin:ge.number,easing:ge.oneOfType([ge.string,ge.func]),steps:ge.arrayOf(ge.shape({duration:ge.number.isRequired,style:ge.object.isRequired,easing:ge.oneOfType([ge.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ge.func]),properties:ge.arrayOf("string"),onAnimationEnd:ge.func})),children:ge.oneOfType([ge.node,ge.func]),isActive:ge.bool,canBegin:ge.bool,onAnimationEnd:ge.func,shouldReAnimate:ge.bool,onAnimationStart:ge.func,onAnimationReStart:ge.func};ge.object,ge.object,ge.object,ge.element;ge.object,ge.object,ge.object,ge.oneOfType([ge.array,ge.element]),ge.any;function Vx(e){"@babel/helpers - typeof";return Vx=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},Vx(e)}function iw(){return iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},iw.apply(this,arguments)}function OVe(e,t){return IVe(e)||MVe(e,t)||DVe(e,t)||AVe()}function AVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 767In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DVe(e,t){if(e){if(typeof e=="string")return sF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sF(e,t)}}function sF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function MVe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function IVe(e){if(Array.isArray(e))return e}function aF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function iF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aF(Object(r),!0).forEach(function(n){RVe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RVe(e,t,r){return t=$Ve(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $Ve(e){var t=LVe(e,"string");return Vx(t)=="symbol"?t:t+""}function LVe(e,t){if(Vx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oF=function(t,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),l=a>=0?1:-1,c=n>=0?1:-1,d=a>=0&&n>=0||a<0&&n<0?1:0,u;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],h=0,m=4;h<m;h++)f[h]=i[h]>o?o:i[h];u="M".concat(t,",").concat(r+l*f[0]),f[0]>0&&(u+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(d,",").concat(t+c*f[0],",").concat(r)),u+="L ".concat(t+n-c*f[1],",").concat(r),f[1]>0&&(u+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(d,`, 768 `).concat(t+n,",").concat(r+l*f[1])),u+="L ".concat(t+n,",").concat(r+a-l*f[2]),f[2]>0&&(u+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(d,`, 769 `).concat(t+n-c*f[2],",").concat(r+a)),u+="L ".concat(t+c*f[3],",").concat(r+a),f[3]>0&&(u+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(d,`, 770 `).concat(t,",").concat(r+a-l*f[3])),u+="Z"}else if(o>0&&i===+i&&i>0){var g=Math.min(o,i);u="M ".concat(t,",").concat(r+l*g,` 771 A `).concat(g,",").concat(g,",0,0,").concat(d,",").concat(t+c*g,",").concat(r,` 772 L `).concat(t+n-c*g,",").concat(r,` 773 A `).concat(g,",").concat(g,",0,0,").concat(d,",").concat(t+n,",").concat(r+l*g,` 774 L `).concat(t+n,",").concat(r+a-l*g,` 775 A `).concat(g,",").concat(g,",0,0,").concat(d,",").concat(t+n-c*g,",").concat(r+a,` 776 L `).concat(t+c*g,",").concat(r+a,` 777 A `).concat(g,",").concat(g,",0,0,").concat(d,",").concat(t,",").concat(r+a-l*g," Z")}else u="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return u},FVe=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,o=r.y,l=r.width,c=r.height;if(Math.abs(l)>0&&Math.abs(c)>0){var d=Math.min(i,i+l),u=Math.max(i,i+l),f=Math.min(o,o+c),h=Math.max(o,o+c);return n>=d&&n<=u&&a>=f&&a<=h}return!1},BVe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},$A=function(t){var r=iF(iF({},BVe),t),n=p.useRef(),a=p.useState(-1),i=OVe(a,2),o=i[0],l=i[1];p.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var w=n.current.getTotalLength();w&&l(w)}catch{}},[]);var c=r.x,d=r.y,u=r.width,f=r.height,h=r.radius,m=r.className,g=r.animationEasing,x=r.animationDuration,v=r.animationBegin,b=r.isAnimationActive,y=r.isUpdateAnimationActive;if(c!==+c||d!==+d||u!==+u||f!==+f||u===0||f===0)return null;var j=ht("recharts-rectangle",m);return y?O.createElement(zo,{canBegin:o>0,from:{width:u,height:f,x:c,y:d},to:{width:u,height:f,x:c,y:d},duration:x,animationEasing:g,isActive:y},function(w){var N=w.width,S=w.height,k=w.x,T=w.y;return O.createElement(zo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:x,isActive:b,easing:g},O.createElement("path",iw({},yt(r,!0),{className:j,d:oF(k,T,N,S,h),ref:n})))}):O.createElement("path",iw({},yt(r,!0),{className:j,d:oF(c,d,u,f,h)}))},UVe=["points","className","baseLinePoints","connectNulls"];function Cf(){return Cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cf.apply(this,arguments)}function zVe(e,t){if(e==null)return{};var r=WVe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function WVe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function lF(e){return YVe(e)||qVe(e)||HVe(e)||VVe()}function VVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 778In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HVe(e,t){if(e){if(typeof e=="string")return X_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X_(e,t)}}function qVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YVe(e){if(Array.isArray(e))return X_(e)}function X_(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var cF=function(t){return t&&t.x===+t.x&&t.y===+t.y},GVe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){cF(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),cF(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},xg=function(t,r){var n=GVe(t);r&&(n=[n.reduce(function(i,o){return[].concat(lF(i),lF(o))},[])]);var a=n.map(function(i){return i.reduce(function(o,l,c){return"".concat(o).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return n.length===1?"".concat(a,"Z"):a},KVe=function(t,r,n){var a=xg(t,n);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(xg(r.reverse(),n).slice(1))},QVe=function(t){var r=t.points,n=t.className,a=t.baseLinePoints,i=t.connectNulls,o=zVe(t,UVe);if(!r||!r.length)return null;var l=ht("recharts-polygon",n);if(a&&a.length){var c=o.stroke&&o.stroke!=="none",d=KVe(r,a,i);return O.createElement("g",{className:l},O.createElement("path",Cf({},yt(o,!0),{fill:d.slice(-1)==="Z"?o.fill:"none",stroke:"none",d})),c?O.createElement("path",Cf({},yt(o,!0),{fill:"none",d:xg(r,i)})):null,c?O.createElement("path",Cf({},yt(o,!0),{fill:"none",d:xg(a,i)})):null)}var u=xg(r,i);return O.createElement("path",Cf({},yt(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",className:l,d:u}))};function J_(){return J_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J_.apply(this,arguments)}var y1=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=ht("recharts-dot",i);return r===+r&&n===+n&&a===+a?O.createElement("circle",J_({},yt(t,!1),Cj(t),{className:o,cx:r,cy:n,r:a})):null};function Hx(e){"@babel/helpers - typeof";return Hx=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},Hx(e)}var ZVe=["x","y","top","left","width","height","className"];function eP(){return eP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},eP.apply(this,arguments)}function dF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function XVe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dF(Object(r),!0).forEach(function(n){JVe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JVe(e,t,r){return t=e7e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e7e(e){var t=t7e(e,"string");return Hx(t)=="symbol"?t:t+""}function t7e(e,t){if(Hx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r7e(e,t){if(e==null)return{};var r=n7e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function n7e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var s7e=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},a7e=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.top,l=o===void 0?0:o,c=t.left,d=c===void 0?0:c,u=t.width,f=u===void 0?0:u,h=t.height,m=h===void 0?0:h,g=t.className,x=r7e(t,ZVe),v=XVe({x:n,y:i,top:l,left:d,width:f,height:m},x);return!ze(n)||!ze(i)||!ze(f)||!ze(m)||!ze(l)||!ze(d)?null:O.createElement("path",eP({},yt(v,!0),{className:ht("recharts-cross",g),d:s7e(n,i,f,m,l,d)}))},i7e=m1,o7e=wee,l7e=qo;function c7e(e,t){return e&&e.length?i7e(e,l7e(t),o7e):void 0}var d7e=c7e;const u7e=ur(d7e);var f7e=m1,h7e=qo,m7e=Nee;function p7e(e,t){return e&&e.length?f7e(e,h7e(t),m7e):void 0}var g7e=p7e;const x7e=ur(g7e);var v7e=["cx","cy","angle","ticks","axisLine"],y7e=["ticks","tick","angle","tickFormatter","stroke"];function Zh(e){"@babel/helpers - typeof";return Zh=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},Zh(e)}function vg(){return vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vg.apply(this,arguments)}function uF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function bd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uF(Object(r),!0).forEach(function(n){b1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fF(e,t){if(e==null)return{};var r=b7e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function b7e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function j7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,dte(n.key),n)}}function w7e(e,t,r){return t&&hF(e.prototype,t),r&&hF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function N7e(e,t,r){return t=ow(t),S7e(e,cte()?Reflect.construct(t,r||[],ow(e).constructor):t.apply(e,r))}function S7e(e,t){if(t&&(Zh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k7e(e)}function k7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cte=function(){return!!e})()}function ow(e){return ow=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ow(e)}function C7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tP(e,t)}function tP(e,t){return tP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},tP(e,t)}function b1(e,t,r){return t=dte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dte(e){var t=T7e(e,"string");return Zh(t)=="symbol"?t:t+""}function T7e(e,t){if(Zh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var j1=function(e){function t(){return j7e(this,t),N7e(this,t,arguments)}return C7e(t,e),w7e(t,[{key:"getTickValueCoord",value:function(n){var a=n.coordinate,i=this.props,o=i.angle,l=i.cx,c=i.cy;return Vr(l,c,a,o)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,a;switch(n){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var n=this.props,a=n.cx,i=n.cy,o=n.angle,l=n.ticks,c=u7e(l,function(u){return u.coordinate||0}),d=x7e(l,function(u){return u.coordinate||0});return{cx:a,cy:i,startAngle:o,endAngle:o,innerRadius:d.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,i=n.cy,o=n.angle,l=n.ticks,c=n.axisLine,d=fF(n,v7e),u=l.reduce(function(g,x){return[Math.min(g[0],x.coordinate),Math.max(g[1],x.coordinate)]},[1/0,-1/0]),f=Vr(a,i,u[0],o),h=Vr(a,i,u[1],o),m=bd(bd(bd({},yt(d,!1)),{},{fill:"none"},yt(c,!1)),{},{x1:f.x,y1:f.y,x2:h.x,y2:h.y});return O.createElement("line",vg({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var n=this,a=this.props,i=a.ticks,o=a.tick,l=a.angle,c=a.tickFormatter,d=a.stroke,u=fF(a,y7e),f=this.getTickTextAnchor(),h=yt(u,!1),m=yt(o,!1),g=i.map(function(x,v){var b=n.getTickValueCoord(x),y=bd(bd(bd(bd({textAnchor:f,transform:"rotate(".concat(90-l,", ").concat(b.x,", ").concat(b.y,")")},h),{},{stroke:"none",fill:d},m),{},{index:v},b),{},{payload:x});return O.createElement(xr,vg({className:ht("recharts-polar-radius-axis-tick",Zee(o)),key:"tick-".concat(x.coordinate)},Tu(n.props,x,v)),t.renderTickItem(o,y,c?c(x.value,v):x.value))});return O.createElement(xr,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var n=this.props,a=n.ticks,i=n.axisLine,o=n.tick;return!a||!a.length?null:O.createElement(xr,{className:ht("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),o&&this.renderTicks(),ns.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,a,i){var o;return O.isValidElement(n)?o=O.cloneElement(n,a):Lt(n)?o=n(a):o=O.createElement(_u,vg({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),o}}])}(p.PureComponent);b1(j1,"displayName","PolarRadiusAxis");b1(j1,"axisType","radiusAxis");b1(j1,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Xh(e){"@babel/helpers - typeof";return Xh=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},Xh(e)}function Pd(){return Pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pd.apply(this,arguments)}function mF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mF(Object(r),!0).forEach(function(n){w1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _7e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fte(n.key),n)}}function P7e(e,t,r){return t&&pF(e.prototype,t),r&&pF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E7e(e,t,r){return t=lw(t),O7e(e,ute()?Reflect.construct(t,r||[],lw(e).constructor):t.apply(e,r))}function O7e(e,t){if(t&&(Xh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A7e(e)}function A7e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ute(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ute=function(){return!!e})()}function lw(e){return lw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lw(e)}function D7e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rP(e,t)}function rP(e,t){return rP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},rP(e,t)}function w1(e,t,r){return t=fte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fte(e){var t=M7e(e,"string");return Xh(t)=="symbol"?t:t+""}function M7e(e,t){if(Xh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var I7e=Math.PI/180,gF=1e-5,N1=function(e){function t(){return _7e(this,t),E7e(this,t,arguments)}return D7e(t,e),P7e(t,[{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.cx,o=a.cy,l=a.radius,c=a.orientation,d=a.tickSize,u=d||8,f=Vr(i,o,l,n.coordinate),h=Vr(i,o,l+(c==="inner"?-1:1)*u,n.coordinate);return{x1:f.x,y1:f.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(n){var a=this.props.orientation,i=Math.cos(-n.coordinate*I7e),o;return i>gF?o=a==="outer"?"start":"end":i<-gF?o=a==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.cx,i=n.cy,o=n.radius,l=n.axisLine,c=n.axisLineType,d=jd(jd({},yt(this.props,!1)),{},{fill:"none"},yt(l,!1));if(c==="circle")return O.createElement(y1,Pd({className:"recharts-polar-angle-axis-line"},d,{cx:a,cy:i,r:o}));var u=this.props.ticks,f=u.map(function(h){return Vr(a,i,o,h.coordinate)});return O.createElement(QVe,Pd({className:"recharts-polar-angle-axis-line"},d,{points:f}))}},{key:"renderTicks",value:function(){var n=this,a=this.props,i=a.ticks,o=a.tick,l=a.tickLine,c=a.tickFormatter,d=a.stroke,u=yt(this.props,!1),f=yt(o,!1),h=jd(jd({},u),{},{fill:"none"},yt(l,!1)),m=i.map(function(g,x){var v=n.getTickLineCoord(g),b=n.getTickTextAnchor(g),y=jd(jd(jd({textAnchor:b},u),{},{stroke:"none",fill:d},f),{},{index:x,payload:g,x:v.x2,y:v.y2});return O.createElement(xr,Pd({className:ht("recharts-polar-angle-axis-tick",Zee(o)),key:"tick-".concat(g.coordinate)},Tu(n.props,g,x)),l&&O.createElement("line",Pd({className:"recharts-polar-angle-axis-tick-line"},h,v)),o&&t.renderTickItem(o,y,c?c(g.value,x):g.value))});return O.createElement(xr,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var n=this.props,a=n.ticks,i=n.radius,o=n.axisLine;return i<=0||!a||!a.length?null:O.createElement(xr,{className:ht("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,a,i){var o;return O.isValidElement(n)?o=O.cloneElement(n,a):Lt(n)?o=n(a):o=O.createElement(_u,Pd({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),o}}])}(p.PureComponent);w1(N1,"displayName","PolarAngleAxis");w1(N1,"axisType","angleAxis");w1(N1,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var R7e=vJ,$7e=R7e(Object.getPrototypeOf,Object),L7e=$7e,F7e=ql,B7e=L7e,U7e=Yl,z7e="[object Object]",W7e=Function.prototype,V7e=Object.prototype,hte=W7e.toString,H7e=V7e.hasOwnProperty,q7e=hte.call(Object);function Y7e(e){if(!U7e(e)||F7e(e)!=z7e)return!1;var t=B7e(e);if(t===null)return!0;var r=H7e.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&hte.call(r)==q7e}var G7e=Y7e;const K7e=ur(G7e);var Q7e=ql,Z7e=Yl,X7e="[object Boolean]";function J7e(e){return e===!0||e===!1||Z7e(e)&&Q7e(e)==X7e}var eHe=J7e;const tHe=ur(eHe);function qx(e){"@babel/helpers - typeof";return qx=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},qx(e)}function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cw.apply(this,arguments)}function rHe(e,t){return iHe(e)||aHe(e,t)||sHe(e,t)||nHe()}function nHe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 779In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sHe(e,t){if(e){if(typeof e=="string")return xF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xF(e,t)}}function xF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function aHe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function iHe(e){if(Array.isArray(e))return e}function vF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vF(Object(r),!0).forEach(function(n){oHe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oHe(e,t,r){return t=lHe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lHe(e){var t=cHe(e,"string");return qx(t)=="symbol"?t:t+""}function cHe(e,t){if(qx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bF=function(t,r,n,a,i){var o=n-a,l;return l="M ".concat(t,",").concat(r),l+="L ".concat(t+n,",").concat(r),l+="L ".concat(t+n-o/2,",").concat(r+i),l+="L ".concat(t+n-o/2-a,",").concat(r+i),l+="L ".concat(t,",").concat(r," Z"),l},dHe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},uHe=function(t){var r=yF(yF({},dHe),t),n=p.useRef(),a=p.useState(-1),i=rHe(a,2),o=i[0],l=i[1];p.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var j=n.current.getTotalLength();j&&l(j)}catch{}},[]);var c=r.x,d=r.y,u=r.upperWidth,f=r.lowerWidth,h=r.height,m=r.className,g=r.animationEasing,x=r.animationDuration,v=r.animationBegin,b=r.isUpdateAnimationActive;if(c!==+c||d!==+d||u!==+u||f!==+f||h!==+h||u===0&&f===0||h===0)return null;var y=ht("recharts-trapezoid",m);return b?O.createElement(zo,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:d},to:{upperWidth:u,lowerWidth:f,height:h,x:c,y:d},duration:x,animationEasing:g,isActive:b},function(j){var w=j.upperWidth,N=j.lowerWidth,S=j.height,k=j.x,T=j.y;return O.createElement(zo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:x,easing:g},O.createElement("path",cw({},yt(r,!0),{className:y,d:bF(k,T,w,N,S),ref:n})))}):O.createElement("g",null,O.createElement("path",cw({},yt(r,!0),{className:y,d:bF(c,d,u,f,h)})))},fHe=["option","shapeType","propTransformer","activeClassName","isActive"];function Yx(e){"@babel/helpers - typeof";return Yx=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},Yx(e)}function hHe(e,t){if(e==null)return{};var r=mHe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mHe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function jF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function dw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jF(Object(r),!0).forEach(function(n){pHe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pHe(e,t,r){return t=gHe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gHe(e){var t=xHe(e,"string");return Yx(t)=="symbol"?t:t+""}function xHe(e,t){if(Yx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vHe(e,t){return dw(dw({},t),e)}function yHe(e,t){return e==="symbols"}function wF(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return O.createElement($A,r);case"trapezoid":return O.createElement(uHe,r);case"sector":return O.createElement(ete,r);case"symbols":if(yHe(t))return O.createElement(rA,r);break;default:return null}}function bHe(e){return p.isValidElement(e)?e.props:e}function mte(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?vHe:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,l=e.isActive,c=hHe(e,fHe),d;if(p.isValidElement(t))d=p.cloneElement(t,dw(dw({},c),bHe(t)));else if(Lt(t))d=t(c);else if(K7e(t)&&!tHe(t)){var u=a(t,c);d=O.createElement(wF,{shapeType:r,elementProps:u})}else{var f=c;d=O.createElement(wF,{shapeType:r,elementProps:f})}return l?O.createElement(xr,{className:o},d):d}function S1(e,t){return t!=null&&"trapezoids"in e.props}function k1(e,t){return t!=null&&"sectors"in e.props}function Gx(e,t){return t!=null&&"points"in e.props}function jHe(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function wHe(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function NHe(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function SHe(e,t){var r;return S1(e,t)?r=jHe:k1(e,t)?r=wHe:Gx(e,t)&&(r=NHe),r}function kHe(e,t){var r;return S1(e,t)?r="trapezoids":k1(e,t)?r="sectors":Gx(e,t)&&(r="points"),r}function CHe(e,t){if(S1(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(k1(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Gx(e,t)?t.payload:{}}function THe(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=kHe(r,t),i=CHe(r,t),o=n.filter(function(c,d){var u=ey(i,c),f=r.props[a].filter(function(g){var x=SHe(r,t);return x(g,t)}),h=r.props[a].indexOf(f[f.length-1]),m=d===h;return u&&m}),l=n.indexOf(o[o.length-1]);return l}var Kb;function Jh(e){"@babel/helpers - typeof";return Jh=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},Jh(e)}function Tf(){return Tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tf.apply(this,arguments)}function NF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NF(Object(r),!0).forEach(function(n){si(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gte(n.key),n)}}function PHe(e,t,r){return t&&SF(e.prototype,t),r&&SF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function EHe(e,t,r){return t=uw(t),OHe(e,pte()?Reflect.construct(t,r||[],uw(e).constructor):t.apply(e,r))}function OHe(e,t){if(t&&(Jh(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AHe(e)}function AHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pte=function(){return!!e})()}function uw(e){return uw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},uw(e)}function DHe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nP(e,t)}function nP(e,t){return nP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},nP(e,t)}function si(e,t,r){return t=gte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gte(e){var t=MHe(e,"string");return Jh(t)=="symbol"?t:t+""}function MHe(e,t){if(Jh(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Jh(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kl=function(e){function t(r){var n;return _He(this,t),n=EHe(this,t,[r]),si(n,"pieRef",null),si(n,"sectorRefs",[]),si(n,"id",$m("recharts-pie-")),si(n,"handleAnimationEnd",function(){var a=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Lt(a)&&a()}),si(n,"handleAnimationStart",function(){var a=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Lt(a)&&a()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return DHe(t,e),PHe(t,[{key:"isActiveIndex",value:function(n){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(n)!==-1:n===a}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.label,l=i.labelLine,c=i.dataKey,d=i.valueKey,u=yt(this.props,!1),f=yt(o,!1),h=yt(l,!1),m=o&&o.offsetRadius||20,g=n.map(function(x,v){var b=(x.startAngle+x.endAngle)/2,y=Vr(x.cx,x.cy,x.outerRadius+m,b),j=Ur(Ur(Ur(Ur({},u),x),{},{stroke:"none"},f),{},{index:v,textAnchor:t.getTextAnchor(y.x,x.cx)},y),w=Ur(Ur(Ur(Ur({},u),x),{},{fill:"none",stroke:x.fill},h),{},{index:v,points:[Vr(x.cx,x.cy,x.outerRadius,b),y]}),N=c;return zt(c)&&zt(d)?N="value":zt(c)&&(N=d),O.createElement(xr,{key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(v)},l&&t.renderLabelLineItem(l,w,"line"),t.renderLabelItem(o,j,Kn(x,N)))});return O.createElement(xr,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(n){var a=this,i=this.props,o=i.activeShape,l=i.blendStroke,c=i.inactiveShape;return n.map(function(d,u){if((d==null?void 0:d.startAngle)===0&&(d==null?void 0:d.endAngle)===0&&n.length!==1)return null;var f=a.isActiveIndex(u),h=c&&a.hasActiveIndex()?c:null,m=f?o:h,g=Ur(Ur({},d),{},{stroke:l?d.fill:d.stroke,tabIndex:-1});return O.createElement(xr,Tf({ref:function(v){v&&!a.sectorRefs.includes(v)&&a.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},Tu(a.props,d,u),{key:"sector-".concat(d==null?void 0:d.startAngle,"-").concat(d==null?void 0:d.endAngle,"-").concat(d.midAngle,"-").concat(u)}),O.createElement(mte,Tf({option:m,isActive:f,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,a=this.props,i=a.sectors,o=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,d=a.animationEasing,u=a.animationId,f=this.state,h=f.prevSectors,m=f.prevIsAnimationActive;return O.createElement(zo,{begin:l,duration:c,isActive:o,easing:d,from:{t:0},to:{t:1},key:"pie-".concat(u,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var x=g.t,v=[],b=i&&i[0],y=b.startAngle;return i.forEach(function(j,w){var N=h&&h[w],S=w>0?Ba(j,"paddingAngle",0):0;if(N){var k=Oa(N.endAngle-N.startAngle,j.endAngle-j.startAngle),T=Ur(Ur({},j),{},{startAngle:y+S,endAngle:y+k(x)+S});v.push(T),y=T.endAngle}else{var C=j.endAngle,E=j.startAngle,P=Oa(0,C-E),_=P(x),I=Ur(Ur({},j),{},{startAngle:y+S,endAngle:y+_+S});v.push(I),y=I.endAngle}}),O.createElement(xr,null,n.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(n){var a=this;n.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var o=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[o].focus(),a.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[l].focus(),a.setState({sectorToFocus:l});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,a=n.sectors,i=n.isAnimationActive,o=this.state.prevSectors;return i&&a&&a.length&&(!o||!ey(o,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,a=this.props,i=a.hide,o=a.sectors,l=a.className,c=a.label,d=a.cx,u=a.cy,f=a.innerRadius,h=a.outerRadius,m=a.isAnimationActive,g=this.state.isAnimationFinished;if(i||!o||!o.length||!ze(d)||!ze(u)||!ze(f)||!ze(h))return null;var x=ht("recharts-pie",l);return O.createElement(xr,{tabIndex:this.props.rootTabIndex,className:x,ref:function(b){n.pieRef=b}},this.renderSectors(),c&&this.renderLabels(o),ns.renderCallByParent(this.props,null,!1),(!m||g)&&Tl.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return a.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:n.sectors!==a.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,a){return n>a?"start":n<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,a,i){if(O.isValidElement(n))return O.cloneElement(n,a);if(Lt(n))return n(a);var o=ht("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return O.createElement(rw,Tf({},a,{key:i,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(n,a,i){if(O.isValidElement(n))return O.cloneElement(n,a);var o=i;if(Lt(n)&&(o=n(a),O.isValidElement(o)))return o;var l=ht("recharts-pie-label-text",typeof n!="boolean"&&!Lt(n)?n.className:"");return O.createElement(_u,Tf({},a,{alignmentBaseline:"middle",className:l}),o)}}])}(p.PureComponent);Kb=Kl;si(Kl,"displayName","Pie");si(Kl,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Mo.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});si(Kl,"parseDeltaAngle",function(e,t){var r=Qs(t-e),n=Math.min(Math.abs(t-e),360);return r*n});si(Kl,"getRealPieData",function(e){var t=e.data,r=e.children,n=yt(e,!1),a=Ua(r,o1);return t&&t.length?t.map(function(i,o){return Ur(Ur(Ur({payload:i},n),i),a&&a[o]&&a[o].props)}):a&&a.length?a.map(function(i){return Ur(Ur({},n),i.props)}):[]});si(Kl,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,a=t.width,i=t.height,o=Qee(a,i),l=n+Zs(e.cx,a,a/2),c=r+Zs(e.cy,i,i/2),d=Zs(e.innerRadius,o,0),u=Zs(e.outerRadius,o,o*.8),f=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:l,cy:c,innerRadius:d,outerRadius:u,maxRadius:f}});si(Kl,"getComposedData",function(e){var t=e.item,r=e.offset,n=t.type.defaultProps!==void 0?Ur(Ur({},t.type.defaultProps),t.props):t.props,a=Kb.getRealPieData(n);if(!a||!a.length)return null;var i=n.cornerRadius,o=n.startAngle,l=n.endAngle,c=n.paddingAngle,d=n.dataKey,u=n.nameKey,f=n.valueKey,h=n.tooltipType,m=Math.abs(n.minAngle),g=Kb.parseCoordinateOfPie(n,r),x=Kb.parseDeltaAngle(o,l),v=Math.abs(x),b=d;zt(d)&&zt(f)?(Ui(!1,`Use "dataKey" to specify the value of pie,
780 the props "valueKey" will be deprecated in 1.1.0`),b="value"):zt(d)&&(Ui(!1,`Use "dataKey" to specify the value of pie, 781 the props "valueKey" will be deprecated in 1.1.0`),b=f);var y=a.filter(function(T){return Kn(T,b,0)!==0}).length,j=(v>=360?y:y-1)*c,w=v-y*m-j,N=a.reduce(function(T,C){var E=Kn(C,b,0);return T+(ze(E)?E:0)},0),S;if(N>0){var k;S=a.map(function(T,C){var E=Kn(T,b,0),P=Kn(T,u,C),_=(ze(E)?E:0)/N,I;C?I=k.endAngle+Qs(x)*c*(E!==0?1:0):I=o;var F=I+Qs(x)*((E!==0?m:0)+_*w),H=(I+F)/2,W=(g.innerRadius+g.outerRadius)/2,z=[{name:P,value:E,payload:T,dataKey:b,type:h}],R=Vr(g.cx,g.cy,W,H);return k=Ur(Ur(Ur({percent:_,cornerRadius:i,name:P,tooltipPayload:z,midAngle:H,middleRadius:W,tooltipPosition:R},T),g),{},{value:Kn(T,b),startAngle:I,endAngle:F,payload:T,paddingAngle:Qs(x)*c}),k})}return Ur(Ur({},g),{},{sectors:S,data:a})});var IHe=Math.ceil,RHe=Math.max;function $He(e,t,r,n){for(var a=-1,i=RHe(IHe((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var LHe=$He,FHe=$J,kF=1/0,BHe=17976931348623157e292;function UHe(e){if(!e)return e===0?e:0;if(e=FHe(e),e===kF||e===-kF){var t=e<0?-1:1;return t*BHe}return e===e?e:0}var xte=UHe,zHe=LHe,WHe=i1,$k=xte;function VHe(e){return function(t,r,n){return n&&typeof n!="number"&&WHe(t,r,n)&&(r=n=void 0),t=$k(t),r===void 0?(r=t,t=0):r=$k(r),n=n===void 0?t<r?1:-1:$k(n),zHe(t,r,n,e)}}var HHe=VHe,qHe=HHe,YHe=qHe(),GHe=YHe;const fw=ur(GHe);function Kx(e){"@babel/helpers - typeof";return Kx=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},Kx(e)}function CF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function TF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CF(Object(r),!0).forEach(function(n){vte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vte(e,t,r){return t=KHe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KHe(e){var t=QHe(e,"string");return Kx(t)=="symbol"?t:t+""}function QHe(e,t){if(Kx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZHe=["Webkit","Moz","O","ms"],XHe=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=ZHe.reduce(function(i,o){return TF(TF({},i),{},vte({},o+n,r))},{});return a[t]=r,a};function em(e){"@babel/helpers - typeof";return em=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},em(e)}function hw(){return hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hw.apply(this,arguments)}function _F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Lk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_F(Object(r),!0).forEach(function(n){Sa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_F(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,bte(n.key),n)}}function eqe(e,t,r){return t&&PF(e.prototype,t),r&&PF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tqe(e,t,r){return t=mw(t),rqe(e,yte()?Reflect.construct(t,r||[],mw(e).constructor):t.apply(e,r))}function rqe(e,t){if(t&&(em(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nqe(e)}
vendor: 120,155 bytes, lines 781-786
781function nqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yte=function(){return!!e})()}function mw(e){return mw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mw(e)}function sqe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sP(e,t)}function sP(e,t){return sP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},sP(e,t)}function Sa(e,t,r){return t=bte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bte(e){var t=aqe(e,"string");return em(t)=="symbol"?t:t+""}function aqe(e,t){if(em(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(em(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iqe=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,o=t.width,l=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,d=mg().domain(fw(0,c)).range([i,i+o-l]),u=d.domain().map(function(f){return d(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:d(n),endX:d(a),scale:d,scaleValues:u}},EF=function(t){return t.changedTouches&&!!t.changedTouches.length},tm=function(e){function t(r){var n;return JHe(this,t),n=tqe(this,t,[r]),Sa(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),Sa(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),Sa(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,l=a.startIndex;o==null||o({endIndex:i,startIndex:l})}),n.detachDragEndListener()}),Sa(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Sa(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Sa(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Sa(n,"handleSlideDragStart",function(a){var i=EF(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return sqe(t,e),eqe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,l=this.props,c=l.gap,d=l.data,u=d.length-1,f=Math.min(a,i),h=Math.max(a,i),m=t.getIndexInRange(o,f),g=t.getIndexInRange(o,h);return{startIndex:m-m%c,endIndex:g===u?u:g-g%c}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,l=a.dataKey,c=Kn(i[n],l,n);return Lt(o)?o(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,o=a.startX,l=a.endX,c=this.props,d=c.x,u=c.width,f=c.travellerWidth,h=c.startIndex,m=c.endIndex,g=c.onChange,x=n.pageX-i;x>0?x=Math.min(x,d+u-f-l,d+u-f-o):x<0&&(x=Math.max(x,d-o,d-l));var v=this.getIndex({startX:o+x,endX:l+x});(v.startIndex!==h||v.endIndex!==m)&&g&&g(v),this.setState({startX:o+x,endX:l+x,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=EF(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,l=a.endX,c=a.startX,d=this.state[o],u=this.props,f=u.x,h=u.width,m=u.travellerWidth,g=u.onChange,x=u.gap,v=u.data,b={startX:this.state.startX,endX:this.state.endX},y=n.pageX-i;y>0?y=Math.min(y,f+h-m-d):y<0&&(y=Math.max(y,f-d)),b[o]=d+y;var j=this.getIndex(b),w=j.startIndex,N=j.endIndex,S=function(){var T=v.length-1;return o==="startX"&&(l>c?w%x===0:N%x===0)||l<c&&N===T||o==="endX"&&(l>c?N%x===0:w%x===0)||l>c&&N===T};this.setState(Sa(Sa({},o,d+y),"brushMoveStartX",n.pageX),function(){g&&S()&&g(j)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,l=o.scaleValues,c=o.startX,d=o.endX,u=this.state[a],f=l.indexOf(u);if(f!==-1){var h=f+n;if(!(h===-1||h>=l.length)){var m=l[h];a==="startX"&&m>=d||a==="endX"&&m<=c||this.setState(Sa({},a,m),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,l=n.height,c=n.fill,d=n.stroke;return O.createElement("rect",{stroke:d,fill:c,x:a,y:i,width:o,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,l=n.height,c=n.data,d=n.children,u=n.padding,f=p.Children.only(d);return f?O.cloneElement(f,{x:a,y:i,width:o,height:l,margin:u,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,l=this,c=this.props,d=c.y,u=c.travellerWidth,f=c.height,h=c.traveller,m=c.ariaLabel,g=c.data,x=c.startIndex,v=c.endIndex,b=Math.max(n,this.props.x),y=Lk(Lk({},yt(this.props,!1)),{},{x:b,y:d,width:u,height:f}),j=m||"Min value: ".concat((i=g[x])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=g[v])===null||o===void 0?void 0:o.name);return O.createElement(xr,{tabIndex:0,role:"slider","aria-label":j,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(N){["ArrowLeft","ArrowRight"].includes(N.key)&&(N.preventDefault(),N.stopPropagation(),l.handleTravellerMoveKeyboard(N.key==="ArrowRight"?1:-1,a))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,y))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,l=i.height,c=i.stroke,d=i.travellerWidth,u=Math.min(n,a)+d,f=Math.max(Math.abs(a-n)-d,0);return O.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:u,y:o,width:f,height:l})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,l=n.height,c=n.travellerWidth,d=n.stroke,u=this.state,f=u.startX,h=u.endX,m=5,g={pointerEvents:"none",fill:d};return O.createElement(xr,{className:"recharts-brush-texts"},O.createElement(_u,hw({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-m,y:o+l/2},g),this.getTextOfTick(a)),O.createElement(_u,hw({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+c+m,y:o+l/2},g),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,l=n.x,c=n.y,d=n.width,u=n.height,f=n.alwaysShowText,h=this.state,m=h.startX,g=h.endX,x=h.isTextActive,v=h.isSlideMoving,b=h.isTravellerMoving,y=h.isTravellerFocused;if(!a||!a.length||!ze(l)||!ze(c)||!ze(d)||!ze(u)||d<=0||u<=0)return null;var j=ht("recharts-brush",i),w=O.Children.count(o)===1,N=XHe("userSelect","none");return O.createElement(xr,{className:j,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:N},this.renderBackground(),w&&this.renderPanorama(),this.renderSlide(m,g),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(g,"endX"),(x||v||b||y||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,l=n.height,c=n.stroke,d=Math.floor(i+l/2)-1;return O.createElement(O.Fragment,null,O.createElement("rect",{x:a,y:i,width:o,height:l,fill:c,stroke:"none"}),O.createElement("line",{x1:a+1,y1:d,x2:a+o-1,y2:d,fill:"none",stroke:"#fff"}),O.createElement("line",{x1:a+1,y1:d+2,x2:a+o-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return O.isValidElement(n)?i=O.cloneElement(n,a):Lt(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,l=n.x,c=n.travellerWidth,d=n.updateId,u=n.startIndex,f=n.endIndex;if(i!==a.prevData||d!==a.prevUpdateId)return Lk({prevData:i,prevTravellerWidth:c,prevUpdateId:d,prevX:l,prevWidth:o},i&&i.length?iqe({data:i,width:o,x:l,travellerWidth:c,startIndex:u,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||l!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([l,l+o-c]);var h=a.scale.domain().map(function(m){return a.scale(m)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:d,prevX:l,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,l=i-1;l-o>1;){var c=Math.floor((o+l)/2);n[c]>a?l=c:o=c}return a>=n[l]?l:o}}])}(p.PureComponent);Sa(tm,"displayName","Brush");Sa(tm,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var oqe=cA;function lqe(e,t){var r;return oqe(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var cqe=lqe,dqe=dJ,uqe=qo,fqe=cqe,hqe=wa,mqe=i1;function pqe(e,t,r){var n=hqe(e)?dqe:fqe;return r&&mqe(e,t,r)&&(t=void 0),n(e,uqe(t))}var gqe=pqe;const xqe=ur(gqe);var Ro=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},OF=AJ;function vqe(e,t,r){t=="__proto__"&&OF?OF(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var yqe=vqe,bqe=yqe,jqe=EJ,wqe=qo;function Nqe(e,t){var r={};return t=wqe(t),jqe(e,function(n,a,i){bqe(r,a,t(n,a,i))}),r}var Sqe=Nqe;const kqe=ur(Sqe);function Cqe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var Tqe=Cqe,_qe=cA;function Pqe(e,t){var r=!0;return _qe(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var Eqe=Pqe,Oqe=Tqe,Aqe=Eqe,Dqe=qo,Mqe=wa,Iqe=i1;function Rqe(e,t,r){var n=Mqe(e)?Oqe:Aqe;return r&&Iqe(e,t,r)&&(t=void 0),n(e,Dqe(t))}var $qe=Rqe;const jte=ur($qe);var Lqe=["x","y"];function Qx(e){"@babel/helpers - typeof";return Qx=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},Qx(e)}function aP(){return aP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},aP.apply(this,arguments)}function AF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ap(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AF(Object(r),!0).forEach(function(n){Fqe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fqe(e,t,r){return t=Bqe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bqe(e){var t=Uqe(e,"string");return Qx(t)=="symbol"?t:t+""}function Uqe(e,t){if(Qx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zqe(e,t){if(e==null)return{};var r=Wqe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Wqe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Vqe(e,t){var r=e.x,n=e.y,a=zqe(e,Lqe),i="".concat(r),o=parseInt(i,10),l="".concat(n),c=parseInt(l,10),d="".concat(t.height||a.height),u=parseInt(d,10),f="".concat(t.width||a.width),h=parseInt(f,10);return Ap(Ap(Ap(Ap(Ap({},t),a),o?{x:o}:{}),c?{y:c}:{}),{},{height:u,width:h,name:t.name,radius:t.radius})}function DF(e){return O.createElement(mte,aP({shapeType:"rectangle",propTransformer:Vqe,activeClassName:"recharts-active-bar"},e))}var Hqe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=typeof n=="number";return i?t(n,a):(i||Eu(),r)}},qqe=["value","background"],wte;function rm(e){"@babel/helpers - typeof";return rm=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},rm(e)}function Yqe(e,t){if(e==null)return{};var r=Gqe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gqe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pw.apply(this,arguments)}function MF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MF(Object(r),!0).forEach(function(n){Ec(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ste(n.key),n)}}function Qqe(e,t,r){return t&&IF(e.prototype,t),r&&IF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zqe(e,t,r){return t=gw(t),Xqe(e,Nte()?Reflect.construct(t,r||[],gw(e).constructor):t.apply(e,r))}function Xqe(e,t){if(t&&(rm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jqe(e)}function Jqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nte=function(){return!!e})()}function gw(e){return gw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gw(e)}function eYe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iP(e,t)}function iP(e,t){return iP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},iP(e,t)}function Ec(e,t,r){return t=Ste(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ste(e){var t=tYe(e,"string");return rm(t)=="symbol"?t:t+""}function tYe(e,t){if(rm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sd=function(e){function t(){var r;Kqe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Zqe(this,t,[].concat(a)),Ec(r,"state",{isAnimationFinished:!1}),Ec(r,"id",$m("recharts-bar-")),Ec(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Ec(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return eYe(t,e),Qqe(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,l=i.dataKey,c=i.activeIndex,d=i.activeBar,u=yt(this.props,!1);return n&&n.map(function(f,h){var m=h===c,g=m?d:o,x=Rn(Rn(Rn({},u),f),{},{isActive:m,option:g,index:h,dataKey:l,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return O.createElement(xr,pw({className:"recharts-bar-rectangle"},Tu(a.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value)}),O.createElement(DF,x))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,l=a.isAnimationActive,c=a.animationBegin,d=a.animationDuration,u=a.animationEasing,f=a.animationId,h=this.state.prevData;return O.createElement(zo,{begin:c,duration:d,isActive:l,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var g=m.t,x=i.map(function(v,b){var y=h&&h[b];if(y){var j=Oa(y.x,v.x),w=Oa(y.y,v.y),N=Oa(y.width,v.width),S=Oa(y.height,v.height);return Rn(Rn({},v),{},{x:j(g),y:w(g),width:N(g),height:S(g)})}if(o==="horizontal"){var k=Oa(0,v.height),T=k(g);return Rn(Rn({},v),{},{y:v.y+v.height-T,height:T})}var C=Oa(0,v.width),E=C(g);return Rn(Rn({},v),{},{width:E})});return O.createElement(xr,null,n.renderRectanglesStatically(x))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!ey(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,l=a.activeIndex,c=yt(this.props.background,!1);return i.map(function(d,u){d.value;var f=d.background,h=Yqe(d,qqe);if(!f)return null;var m=Rn(Rn(Rn(Rn(Rn({},h),{},{fill:"#eee"},f),c),Tu(n.props,d,u)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:u,className:"recharts-bar-background-rectangle"});return O.createElement(DF,pw({key:"background-bar-".concat(u),option:n.props.background,isActive:u===l},m))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,l=i.xAxis,c=i.yAxis,d=i.layout,u=i.children,f=Ua(u,ty);if(!f)return null;var h=d==="vertical"?o[0].height/2:o[0].width/2,m=function(v,b){var y=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:y,errorVal:Kn(v,b)}},g={clipPath:n?"url(#clipPath-".concat(a,")"):null};return O.createElement(xr,g,f.map(function(x){return O.cloneElement(x,{key:"error-bar-".concat(a,"-").concat(x.props.dataKey),data:o,xAxis:l,yAxis:c,layout:d,offset:h,dataPointFormatter:m})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,l=n.xAxis,c=n.yAxis,d=n.left,u=n.top,f=n.width,h=n.height,m=n.isAnimationActive,g=n.background,x=n.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,b=ht("recharts-bar",o),y=l&&l.allowDataOverflow,j=c&&c.allowDataOverflow,w=y||j,N=zt(x)?this.id:x;return O.createElement(xr,{className:b},y||j?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(N)},O.createElement("rect",{x:y?d:d-f/2,y:j?u:u-h/2,width:y?f:f*2,height:j?h:h*2}))):null,O.createElement(xr,{className:"recharts-bar-rectangles",clipPath:w?"url(#clipPath-".concat(N,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(w,N),(!m||v)&&Tl.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(p.PureComponent);wte=sd;Ec(sd,"displayName","Bar");Ec(sd,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Mo.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ec(sd,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,d=e.stackedData,u=e.dataStartIndex,f=e.displayedData,h=e.offset,m=Qze(n,r);if(!m)return null;var g=t.layout,x=r.type.defaultProps,v=x!==void 0?Rn(Rn({},x),r.props):r.props,b=v.dataKey,y=v.children,j=v.minPointSize,w=g==="horizontal"?o:i,N=d?w.scale.domain():null,S=n9e({numericAxis:w}),k=Ua(y,o1),T=f.map(function(C,E){var P,_,I,F,H,W;d?P=Zze(d[u+E],N):(P=Kn(C,b),Array.isArray(P)||(P=[S,P]));var z=Hqe(j,wte.defaultProps.minPointSize)(P[1],E);if(g==="horizontal"){var R,q=[o.scale(P[0]),o.scale(P[1])],V=q[0],se=q[1];_=S3({axis:i,ticks:l,bandSize:a,offset:m.offset,entry:C,index:E}),I=(R=se??V)!==null&&R!==void 0?R:void 0,F=m.size;var oe=V-se;if(H=Number.isNaN(oe)?0:oe,W={x:_,y:o.y,width:F,height:o.height},Math.abs(z)>0&&Math.abs(H)<Math.abs(z)){var _e=Qs(H||z)*(Math.abs(z)-Math.abs(H));I-=_e,H+=_e}}else{var U=[i.scale(P[0]),i.scale(P[1])],M=U[0],G=U[1];if(_=M,I=S3({axis:o,ticks:c,bandSize:a,offset:m.offset,entry:C,index:E}),F=G-M,H=m.size,W={x:i.x,y:I,width:i.width,height:H},Math.abs(z)>0&&Math.abs(F)<Math.abs(z)){var K=Qs(F||z)*(Math.abs(z)-Math.abs(F));F+=K}}return Rn(Rn(Rn({},C),{},{x:_,y:I,width:F,height:H,value:d?P:P[1],payload:C,background:W},k&&k[E]&&k[E].props),{},{tooltipPayload:[Gee(r,C)],tooltipPosition:{x:_+F/2,y:I+H/2}})});return Rn({data:T,layout:g},h)});function Zx(e){"@babel/helpers - typeof";return Zx=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},Zx(e)}function rYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kte(n.key),n)}}function nYe(e,t,r){return t&&RF(e.prototype,t),r&&RF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ki(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$F(Object(r),!0).forEach(function(n){C1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$F(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function C1(e,t,r){return t=kte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kte(e){var t=sYe(e,"string");return Zx(t)=="symbol"?t:t+""}function sYe(e,t){if(Zx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cte=function(t,r,n,a,i){var o=t.width,l=t.height,c=t.layout,d=t.children,u=Object.keys(r),f={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:l-n.bottom,bottomMirror:l-n.bottom},h=!!Ta(d,sd);return u.reduce(function(m,g){var x=r[g],v=x.orientation,b=x.domain,y=x.padding,j=y===void 0?{}:y,w=x.mirror,N=x.reversed,S="".concat(v).concat(w?"Mirror":""),k,T,C,E,P;if(x.type==="number"&&(x.padding==="gap"||x.padding==="no-gap")){var _=b[1]-b[0],I=1/0,F=x.categoricalDomain.sort();if(F.forEach(function(U,M){M>0&&(I=Math.min((U||0)-(F[M-1]||0),I))}),Number.isFinite(I)){var H=I/_,W=x.layout==="vertical"?n.height:n.width;if(x.padding==="gap"&&(k=H*W/2),x.padding==="no-gap"){var z=Zs(t.barCategoryGap,H*W),R=H*W/2;k=R-z-(R-z)/W*z}}}a==="xAxis"?T=[n.left+(j.left||0)+(k||0),n.left+n.width-(j.right||0)-(k||0)]:a==="yAxis"?T=c==="horizontal"?[n.top+n.height-(j.bottom||0),n.top+(j.top||0)]:[n.top+(j.top||0)+(k||0),n.top+n.height-(j.bottom||0)-(k||0)]:T=x.range,N&&(T=[T[1],T[0]]);var q=Vee(x,i,h),V=q.scale,se=q.realScaleType;V.domain(b).range(T),Hee(V);var oe=qee(V,ki(ki({},x),{},{realScaleType:se}));a==="xAxis"?(P=v==="top"&&!w||v==="bottom"&&w,C=n.left,E=f[S]-P*x.height):a==="yAxis"&&(P=v==="left"&&!w||v==="right"&&w,C=f[S]-P*x.width,E=n.top);var _e=ki(ki(ki({},x),oe),{},{realScaleType:se,x:C,y:E,scale:V,width:a==="xAxis"?n.width:x.width,height:a==="yAxis"?n.height:x.height});return _e.bandSize=Jj(_e,oe),!x.hide&&a==="xAxis"?f[S]+=(P?-1:1)*_e.height:x.hide||(f[S]+=(P?-1:1)*_e.width),ki(ki({},m),{},C1({},g,_e))},{})},Tte=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},aYe=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return Tte({x:r,y:n},{x:a,y:i})},_te=function(){function e(t){rYe(this,e),this.scale=t}return nYe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();C1(_te,"EPS",1e-4);var LA=function(t){var r=Object.keys(t).reduce(function(n,a){return ki(ki({},n),{},C1({},a,_te.create(t[a])))},{});return ki(ki({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,l=i.position;return kqe(a,function(c,d){return r[d].apply(c,{bandAware:o,position:l})})},isInRange:function(a){return jte(a,function(i,o){return r[o].isInRange(i)})}})};function iYe(e){return(e%180+180)%180}var oYe=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=iYe(a),o=i*Math.PI/180,l=Math.atan(n/r),c=o>l&&o<Math.PI-l?n/Math.sin(o):r/Math.cos(o);return Math.abs(c)},lYe=qo,cYe=Kv,dYe=s1;function uYe(e){return function(t,r,n){var a=Object(t);if(!cYe(t)){var i=lYe(r);t=dYe(t),r=function(l){return i(a[l],l,a)}}var o=e(t,r,n);return o>-1?a[i?t[o]:o]:void 0}}var fYe=uYe,hYe=xte;function mYe(e){var t=hYe(e),r=t%1;return t===t?r?t-r:t:0}var pYe=mYe,gYe=SJ,xYe=qo,vYe=pYe,yYe=Math.max;function bYe(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:vYe(r);return a<0&&(a=yYe(n+a,0)),gYe(e,xYe(t),a)}var jYe=bYe,wYe=fYe,NYe=jYe,SYe=wYe(NYe),kYe=SYe;const CYe=ur(kYe);var TYe=$Oe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),FA=p.createContext(void 0),BA=p.createContext(void 0),Pte=p.createContext(void 0),Ete=p.createContext({}),Ote=p.createContext(void 0),Ate=p.createContext(0),Dte=p.createContext(0),LF=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=t.clipPathId,l=t.children,c=t.width,d=t.height,u=TYe(i);return O.createElement(FA.Provider,{value:n},O.createElement(BA.Provider,{value:a},O.createElement(Ete.Provider,{value:i},O.createElement(Pte.Provider,{value:u},O.createElement(Ote.Provider,{value:o},O.createElement(Ate.Provider,{value:d},O.createElement(Dte.Provider,{value:c},l)))))))},_Ye=function(){return p.useContext(Ote)},Mte=function(t){var r=p.useContext(FA);r==null&&Eu();var n=r[t];return n==null&&Eu(),n},PYe=function(){var t=p.useContext(FA);return gc(t)},EYe=function(){var t=p.useContext(BA),r=CYe(t,function(n){return jte(n.domain,Number.isFinite)});return r||gc(t)},Ite=function(t){var r=p.useContext(BA);r==null&&Eu();var n=r[t];return n==null&&Eu(),n},OYe=function(){var t=p.useContext(Pte);return t},AYe=function(){return p.useContext(Ete)},UA=function(){return p.useContext(Dte)},zA=function(){return p.useContext(Ate)};function nm(e){"@babel/helpers - typeof";return nm=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},nm(e)}function DYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MYe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$te(n.key),n)}}function IYe(e,t,r){return t&&MYe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function RYe(e,t,r){return t=xw(t),$Ye(e,Rte()?Reflect.construct(t,r||[],xw(e).constructor):t.apply(e,r))}function $Ye(e,t){if(t&&(nm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LYe(e)}function LYe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rte=function(){return!!e})()}function xw(e){return xw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xw(e)}function FYe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oP(e,t)}function oP(e,t){return oP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},oP(e,t)}function FF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function BF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FF(Object(r),!0).forEach(function(n){WA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function WA(e,t,r){return t=$te(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $te(e){var t=BYe(e,"string");return nm(t)=="symbol"?t:t+""}function BYe(e,t){if(nm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(nm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UYe(e,t){return HYe(e)||VYe(e,t)||WYe(e,t)||zYe()}function zYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 782In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WYe(e,t){if(e){if(typeof e=="string")return UF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return UF(e,t)}}function UF(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function VYe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function HYe(e){if(Array.isArray(e))return e}function lP(){return lP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lP.apply(this,arguments)}var qYe=function(t,r){var n;return O.isValidElement(t)?n=O.cloneElement(t,r):Lt(t)?n=t(r):n=O.createElement("line",lP({},r,{className:"recharts-reference-line-line"})),n},YYe=function(t,r,n,a,i,o,l,c,d){var u=i.x,f=i.y,h=i.width,m=i.height;if(n){var g=d.y,x=t.y.apply(g,{position:o});if(Ro(d,"discard")&&!t.y.isInRange(x))return null;var v=[{x:u+h,y:x},{x:u,y:x}];return c==="left"?v.reverse():v}if(r){var b=d.x,y=t.x.apply(b,{position:o});if(Ro(d,"discard")&&!t.x.isInRange(y))return null;var j=[{x:y,y:f+m},{x:y,y:f}];return l==="top"?j.reverse():j}if(a){var w=d.segment,N=w.map(function(S){return t.apply(S,{position:o})});return Ro(d,"discard")&&xqe(N,function(S){return!t.isInRange(S)})?null:N}return null};function GYe(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,d=_Ye(),u=Mte(a),f=Ite(i),h=OYe();if(!d||!h)return null;Ui(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=LA({x:u.scale,y:f.scale}),g=Xn(t),x=Xn(r),v=n&&n.length===2,b=YYe(m,g,x,v,h,e.position,u.orientation,f.orientation,e);if(!b)return null;var y=UYe(b,2),j=y[0],w=j.x,N=j.y,S=y[1],k=S.x,T=S.y,C=Ro(e,"hidden")?"url(#".concat(d,")"):void 0,E=BF(BF({clipPath:C},yt(e,!0)),{},{x1:w,y1:N,x2:k,y2:T});return O.createElement(xr,{className:ht("recharts-reference-line",l)},qYe(o,E),ns.renderCallByParent(e,aYe({x1:w,y1:N,x2:k,y2:T})))}var VA=function(e){function t(){return DYe(this,t),RYe(this,t,arguments)}return FYe(t,e),IYe(t,[{key:"render",value:function(){return O.createElement(GYe,this.props)}}])}(O.Component);WA(VA,"displayName","ReferenceLine");WA(VA,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function cP(){return cP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cP.apply(this,arguments)}function sm(e){"@babel/helpers - typeof";return sm=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},sm(e)}function zF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function WF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zF(Object(r),!0).forEach(function(n){T1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KYe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QYe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Fte(n.key),n)}}function ZYe(e,t,r){return t&&QYe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XYe(e,t,r){return t=vw(t),JYe(e,Lte()?Reflect.construct(t,r||[],vw(e).constructor):t.apply(e,r))}function JYe(e,t){if(t&&(sm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eGe(e)}function eGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lte=function(){return!!e})()}function vw(e){return vw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vw(e)}function tGe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dP(e,t)}function dP(e,t){return dP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},dP(e,t)}function T1(e,t,r){return t=Fte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fte(e){var t=rGe(e,"string");return sm(t)=="symbol"?t:t+""}function rGe(e,t){if(sm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(sm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nGe=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=LA({x:a.scale,y:i.scale}),l=o.apply({x:r,y:n},{bandAware:!0});return Ro(t,"discard")&&!o.isInRange(l)?null:l},_1=function(e){function t(){return KYe(this,t),XYe(this,t,arguments)}return tGe(t,e),ZYe(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,l=n.alwaysShow,c=n.clipPathId,d=Xn(a),u=Xn(i);if(Ui(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!u)return null;var f=nGe(this.props);if(!f)return null;var h=f.x,m=f.y,g=this.props,x=g.shape,v=g.className,b=Ro(this.props,"hidden")?"url(#".concat(c,")"):void 0,y=WF(WF({clipPath:b},yt(this.props,!0)),{},{cx:h,cy:m});return O.createElement(xr,{className:ht("recharts-reference-dot",v)},t.renderDot(x,y),ns.renderCallByParent(this.props,{x:h-o,y:m-o,width:2*o,height:2*o}))}}])}(O.Component);T1(_1,"displayName","ReferenceDot");T1(_1,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});T1(_1,"renderDot",function(e,t){var r;return O.isValidElement(e)?r=O.cloneElement(e,t):Lt(e)?r=e(t):r=O.createElement(y1,cP({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function uP(){return uP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uP.apply(this,arguments)}function am(e){"@babel/helpers - typeof";return am=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},am(e)}function VF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function HF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VF(Object(r),!0).forEach(function(n){P1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aGe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ute(n.key),n)}}function iGe(e,t,r){return t&&aGe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oGe(e,t,r){return t=yw(t),lGe(e,Bte()?Reflect.construct(t,r||[],yw(e).constructor):t.apply(e,r))}function lGe(e,t){if(t&&(am(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cGe(e)}function cGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bte=function(){return!!e})()}function yw(e){return yw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yw(e)}function dGe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fP(e,t)}function fP(e,t){return fP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},fP(e,t)}function P1(e,t,r){return t=Ute(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ute(e){var t=uGe(e,"string");return am(t)=="symbol"?t:t+""}function uGe(e,t){if(am(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(am(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fGe=function(t,r,n,a,i){var o=i.x1,l=i.x2,c=i.y1,d=i.y2,u=i.xAxis,f=i.yAxis;if(!u||!f)return null;var h=LA({x:u.scale,y:f.scale}),m={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(c,{position:"start"}):h.y.rangeMin},g={x:r?h.x.apply(l,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(d,{position:"end"}):h.y.rangeMax};return Ro(i,"discard")&&(!h.isInRange(m)||!h.isInRange(g))?null:Tte(m,g)},E1=function(e){function t(){return sGe(this,t),oGe(this,t,arguments)}return dGe(t,e),iGe(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,l=n.y2,c=n.className,d=n.alwaysShow,u=n.clipPathId;Ui(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Xn(a),h=Xn(i),m=Xn(o),g=Xn(l),x=this.props.shape;if(!f&&!h&&!m&&!g&&!x)return null;var v=fGe(f,h,m,g,this.props);if(!v&&!x)return null;var b=Ro(this.props,"hidden")?"url(#".concat(u,")"):void 0;return O.createElement(xr,{className:ht("recharts-reference-area",c)},t.renderRect(x,HF(HF({clipPath:b},yt(this.props,!0)),v)),ns.renderCallByParent(this.props,v))}}])}(O.Component);P1(E1,"displayName","ReferenceArea");P1(E1,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});P1(E1,"renderRect",function(e,t){var r;return O.isValidElement(e)?r=O.cloneElement(e,t):Lt(e)?r=e(t):r=O.createElement($A,uP({},t,{className:"recharts-reference-area-rect"})),r});function zte(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function hGe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return oYe(n,r)}function mGe(e,t,r){var n=r==="width",a=e.x,i=e.y,o=e.width,l=e.height;return t===1?{start:n?a:i,end:n?a+o:i+l}:{start:n?a+o:i+l,end:n?a:i}}function bw(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function pGe(e,t){return zte(e,t+1)}function gGe(e,t,r,n,a){for(var i=(n||[]).slice(),o=t.start,l=t.end,c=0,d=1,u=o,f=function(){var g=n==null?void 0:n[c];if(g===void 0)return{v:zte(n,d)};var x=c,v,b=function(){return v===void 0&&(v=r(g,x)),v},y=g.coordinate,j=c===0||bw(e,y,b,u,l);j||(c=0,u=o,d+=1),j&&(u=y+e*(b()/2+a),c+=d)},h;d<=i.length;)if(h=f(),h)return h.v;return[]}function Xx(e){"@babel/helpers - typeof";return Xx=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},Xx(e)}function qF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ss(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qF(Object(r),!0).forEach(function(n){xGe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xGe(e,t,r){return t=vGe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vGe(e){var t=yGe(e,"string");return Xx(t)=="symbol"?t:t+""}function yGe(e,t){if(Xx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bGe(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,l=t.start,c=t.end,d=function(h){var m=i[h],g,x=function(){return g===void 0&&(g=r(m,h)),g};if(h===o-1){var v=e*(m.coordinate+e*x()/2-c);i[h]=m=Ss(Ss({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate})}else i[h]=m=Ss(Ss({},m),{},{tickCoord:m.coordinate});var b=bw(e,m.tickCoord,x,l,c);b&&(c=m.tickCoord-e*(x()/2+a),i[h]=Ss(Ss({},m),{},{isShow:!0}))},u=o-1;u>=0;u--)d(u);return i}function jGe(e,t,r,n,a,i){var o=(n||[]).slice(),l=o.length,c=t.start,d=t.end;if(i){var u=n[l-1],f=r(u,l-1),h=e*(u.coordinate+e*f/2-d);o[l-1]=u=Ss(Ss({},u),{},{tickCoord:h>0?u.coordinate-h*e:u.coordinate});var m=bw(e,u.tickCoord,function(){return f},c,d);m&&(d=u.tickCoord-e*(f/2+a),o[l-1]=Ss(Ss({},u),{},{isShow:!0}))}for(var g=i?l-1:l,x=function(y){var j=o[y],w,N=function(){return w===void 0&&(w=r(j,y)),w};if(y===0){var S=e*(j.coordinate-e*N()/2-c);o[y]=j=Ss(Ss({},j),{},{tickCoord:S<0?j.coordinate-S*e:j.coordinate})}else o[y]=j=Ss(Ss({},j),{},{tickCoord:j.coordinate});var k=bw(e,j.tickCoord,N,c,d);k&&(c=j.tickCoord+e*(N()/2+a),o[y]=Ss(Ss({},j),{},{isShow:!0}))},v=0;v<g;v++)x(v);return o}function HA(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,d=e.tickFormatter,u=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(ze(c)||Mo.isSsr)return pGe(a,typeof c=="number"&&ze(c)?c:0);var h=[],m=l==="top"||l==="bottom"?"width":"height",g=u&&m==="width"?hg(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},x=function(j,w){var N=Lt(d)?d(j.value,w):j.value;return m==="width"?hGe(hg(N,{fontSize:t,letterSpacing:r}),g,f):hg(N,{fontSize:t,letterSpacing:r})[m]},v=a.length>=2?Qs(a[1].coordinate-a[0].coordinate):1,b=mGe(i,v,m);return c==="equidistantPreserveStart"?gGe(v,b,x,a,o):(c==="preserveStart"||c==="preserveStartEnd"?h=jGe(v,b,x,a,o,c==="preserveStartEnd"):h=bGe(v,b,x,a,o),h.filter(function(y){return y.isShow}))}var wGe=["viewBox"],NGe=["viewBox"],SGe=["ticks"];function im(e){"@babel/helpers - typeof";return im=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},im(e)}function _f(){return _f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_f.apply(this,arguments)}function YF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YF(Object(r),!0).forEach(function(n){qA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fk(e,t){if(e==null)return{};var r=kGe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function kGe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function CGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vte(n.key),n)}}function TGe(e,t,r){return t&&GF(e.prototype,t),r&&GF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _Ge(e,t,r){return t=jw(t),PGe(e,Wte()?Reflect.construct(t,r||[],jw(e).constructor):t.apply(e,r))}function PGe(e,t){if(t&&(im(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return EGe(e)}function EGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wte=function(){return!!e})()}function jw(e){return jw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},jw(e)}function OGe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hP(e,t)}function hP(e,t){return hP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hP(e,t)}function qA(e,t,r){return t=Vte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vte(e){var t=AGe(e,"string");return im(t)=="symbol"?t:t+""}function AGe(e,t){if(im(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(im(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hm=function(e){function t(r){var n;return CGe(this,t),n=_Ge(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return OGe(t,e),TGe(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Fk(n,wGe),l=this.props,c=l.viewBox,d=Fk(l,NGe);return!Yf(i,c)||!Yf(o,d)||!Yf(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,l=a.width,c=a.height,d=a.orientation,u=a.tickSize,f=a.mirror,h=a.tickMargin,m,g,x,v,b,y,j=f?-1:1,w=n.tickSize||u,N=ze(n.tickCoord)?n.tickCoord:n.coordinate;switch(d){case"top":m=g=n.coordinate,v=o+ +!f*c,x=v-j*w,y=x-j*h,b=N;break;case"left":x=v=n.coordinate,g=i+ +!f*l,m=g-j*w,b=m-j*h,y=N;break;case"right":x=v=n.coordinate,g=i+ +f*l,m=g+j*w,b=m+j*h,y=N;break;default:m=g=n.coordinate,v=o+ +f*c,x=v+j*w,y=x+j*h,b=N;break}return{line:{x1:m,y1:x,x2:g,y2:v},tick:{x:b,y}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,l=n.height,c=n.orientation,d=n.mirror,u=n.axisLine,f=$s($s($s({},yt(this.props,!1)),yt(u,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!d||c==="bottom"&&d);f=$s($s({},f),{},{x1:a,y1:i+h*l,x2:a+o,y2:i+h*l})}else{var m=+(c==="left"&&!d||c==="right"&&d);f=$s($s({},f),{},{x1:a+m*o,y1:i,x2:a+m*o,y2:i+l})}return O.createElement("line",_f({},f,{className:ht("recharts-cartesian-axis-line",Ba(u,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,l=this.props,c=l.tickLine,d=l.stroke,u=l.tick,f=l.tickFormatter,h=l.unit,m=HA($s($s({},this.props),{},{ticks:n}),a,i),g=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),v=yt(this.props,!1),b=yt(u,!1),y=$s($s({},v),{},{fill:"none"},yt(c,!1)),j=m.map(function(w,N){var S=o.getTickLineCoord(w),k=S.line,T=S.tick,C=$s($s($s($s({textAnchor:g,verticalAnchor:x},v),{},{stroke:"none",fill:d},b),T),{},{index:N,payload:w,visibleTicksCount:m.length,tickFormatter:f});return O.createElement(xr,_f({className:"recharts-cartesian-axis-tick",key:"tick-".concat(w.value,"-").concat(w.coordinate,"-").concat(w.tickCoord)},Tu(o.props,w,N)),c&&O.createElement("line",_f({},y,k,{className:ht("recharts-cartesian-axis-tick-line",Ba(c,"className"))})),u&&t.renderTickItem(u,C,"".concat(Lt(f)?f(w.value,N):w.value).concat(h||"")))});return O.createElement("g",{className:"recharts-cartesian-axis-ticks"},j)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,l=a.height,c=a.ticksGenerator,d=a.className,u=a.hide;if(u)return null;var f=this.props,h=f.ticks,m=Fk(f,SGe),g=h;return Lt(c)&&(g=h&&h.length>0?c(this.props):c(m)),o<=0||l<=0||!g||!g.length?null:O.createElement(xr,{className:ht("recharts-cartesian-axis",d),ref:function(v){n.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),ns.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o;return O.isValidElement(n)?o=O.cloneElement(n,a):Lt(n)?o=n(a):o=O.createElement(_u,_f({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(p.Component);qA(Hm,"displayName","CartesianAxis");qA(Hm,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var DGe=["x1","y1","x2","y2","key"],MGe=["offset"];function Ou(e){"@babel/helpers - typeof";return Ou=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},Ou(e)}function KF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ts(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KF(Object(r),!0).forEach(function(n){IGe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IGe(e,t,r){return t=RGe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RGe(e){var t=$Ge(e,"string");return Ou(t)=="symbol"?t:t+""}function $Ge(e,t){if(Ou(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ou(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ud(){return Ud=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ud.apply(this,arguments)}function QF(e,t){if(e==null)return{};var r=LGe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function LGe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var FGe=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,o=t.width,l=t.height,c=t.ry;return O.createElement("rect",{x:a,y:i,ry:c,width:o,height:l,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function Hte(e,t){var r;if(O.isValidElement(e))r=O.cloneElement(e,t);else if(Lt(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,l=t.key,c=QF(t,DGe),d=yt(c,!1);d.offset;var u=QF(d,MGe);r=O.createElement("line",Ud({},u,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:l}))}return r}function BGe(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(l,c){var d=Ts(Ts({},e),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return Hte(a,d)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function UGe(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(l,c){var d=Ts(Ts({},e),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return Hte(a,d)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function zGe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,d=c===void 0?!0:c;if(!d||!t||!t.length)return null;var u=l.map(function(h){return Math.round(h+a-a)}).sort(function(h,m){return h-m});a!==u[0]&&u.unshift(0);var f=u.map(function(h,m){var g=!u[m+1],x=g?a+o-h:u[m+1]-h;if(x<=0)return null;var v=m%t.length;return O.createElement("rect",{key:"react-".concat(m),y:h,x:n,height:x,width:i,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function WGe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,l=e.width,c=e.height,d=e.verticalPoints;if(!r||!n||!n.length)return null;var u=d.map(function(h){return Math.round(h+i-i)}).sort(function(h,m){return h-m});i!==u[0]&&u.unshift(0);var f=u.map(function(h,m){var g=!u[m+1],x=g?i+l-h:u[m+1]-h;if(x<=0)return null;var v=m%n.length;return O.createElement("rect",{key:"react-".concat(m),x:h,y:o,width:x,height:c,stroke:"none",fill:n[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var VGe=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return Wee(HA(Ts(Ts(Ts({},Hm.defaultProps),n),{},{ticks:pl(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},HGe=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return Wee(HA(Ts(Ts(Ts({},Hm.defaultProps),n),{},{ticks:pl(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},tf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Qb(e){var t,r,n,a,i,o,l=UA(),c=zA(),d=AYe(),u=Ts(Ts({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:tf.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:tf.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:tf.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:tf.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:tf.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:tf.verticalFill,x:ze(e.x)?e.x:d.left,y:ze(e.y)?e.y:d.top,width:ze(e.width)?e.width:d.width,height:ze(e.height)?e.height:d.height}),f=u.x,h=u.y,m=u.width,g=u.height,x=u.syncWithTicks,v=u.horizontalValues,b=u.verticalValues,y=PYe(),j=EYe();if(!ze(m)||m<=0||!ze(g)||g<=0||!ze(f)||f!==+f||!ze(h)||h!==+h)return null;var w=u.verticalCoordinatesGenerator||VGe,N=u.horizontalCoordinatesGenerator||HGe,S=u.horizontalPoints,k=u.verticalPoints;if((!S||!S.length)&&Lt(N)){var T=v&&v.length,C=N({yAxis:j?Ts(Ts({},j),{},{ticks:T?v:j.ticks}):void 0,width:l,height:c,offset:d},T?!0:x);Ui(Array.isArray(C),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ou(C),"]")),Array.isArray(C)&&(S=C)}if((!k||!k.length)&&Lt(w)){var E=b&&b.length,P=w({xAxis:y?Ts(Ts({},y),{},{ticks:E?b:y.ticks}):void 0,width:l,height:c,offset:d},E?!0:x);Ui(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ou(P),"]")),Array.isArray(P)&&(k=P)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(FGe,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),O.createElement(BGe,Ud({},u,{offset:d,horizontalPoints:S,xAxis:y,yAxis:j})),O.createElement(UGe,Ud({},u,{offset:d,verticalPoints:k,xAxis:y,yAxis:j})),O.createElement(zGe,Ud({},u,{horizontalPoints:S})),O.createElement(WGe,Ud({},u,{verticalPoints:k})))}Qb.displayName="CartesianGrid";var qGe=["type","layout","connectNulls","ref"],YGe=["key"];function om(e){"@babel/helpers - typeof";return om=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},om(e)}function ZF(e,t){if(e==null)return{};var r=GGe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function GGe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function yg(){return yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yg.apply(this,arguments)}function XF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XF(Object(r),!0).forEach(function(n){Ci(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rf(e){return XGe(e)||ZGe(e)||QGe(e)||KGe()}function KGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 783In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QGe(e,t){if(e){if(typeof e=="string")return mP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mP(e,t)}}function ZGe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XGe(e){if(Array.isArray(e))return mP(e)}function mP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function JGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yte(n.key),n)}}function eKe(e,t,r){return t&&JF(e.prototype,t),r&&JF(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function tKe(e,t,r){return t=ww(t),rKe(e,qte()?Reflect.construct(t,r||[],ww(e).constructor):t.apply(e,r))}function rKe(e,t){if(t&&(om(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nKe(e)}function nKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qte=function(){return!!e})()}function ww(e){return ww=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ww(e)}function sKe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pP(e,t)}function pP(e,t){return pP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},pP(e,t)}function Ci(e,t,r){return t=Yte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yte(e){var t=aKe(e,"string");return om(t)=="symbol"?t:t+""}function aKe(e,t){if(om(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(om(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ry=function(e){function t(){var r;JGe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=tKe(this,t,[].concat(a)),Ci(r,"state",{isAnimationFinished:!0,totalLength:0}),Ci(r,"generateSimpleStrokeDasharray",function(o,l){return"".concat(l,"px ").concat(o-l,"px")}),Ci(r,"getStrokeDasharray",function(o,l,c){var d=c.reduce(function(b,y){return b+y});if(!d)return r.generateSimpleStrokeDasharray(l,o);for(var u=Math.floor(o/d),f=o%d,h=l-o,m=[],g=0,x=0;g<c.length;x+=c[g],++g)if(x+c[g]>f){m=[].concat(rf(c.slice(0,g)),[f-x]);break}var v=m.length%2===0?[0,h]:[h];return[].concat(rf(t.repeat(c,u)),rf(m),v).map(function(b){return"".concat(b,"px")}).join(", ")}),Ci(r,"id",$m("recharts-line-")),Ci(r,"pathRef",function(o){r.mainCurve=o}),Ci(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Ci(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return sKe(t,e),eKe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,l=i.xAxis,c=i.yAxis,d=i.layout,u=i.children,f=Ua(u,ty);if(!f)return null;var h=function(x,v){return{x:x.x,y:x.y,value:x.value,errorVal:Kn(x.payload,v)}},m={clipPath:n?"url(#clipPath-".concat(a,")"):null};return O.createElement(xr,m,f.map(function(g){return O.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:o,xAxis:l,yAxis:c,layout:d,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,d=l.points,u=l.dataKey,f=yt(this.props,!1),h=yt(c,!0),m=d.map(function(x,v){var b=Na(Na(Na({key:"dot-".concat(v),r:3},f),h),{},{value:x.value,dataKey:u,cx:x.x,cy:x.y,index:v,payload:x.payload});return t.renderDotItem(c,b)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return O.createElement(xr,yg({className:"recharts-line-dots",key:"dots"},g),m)}},{key:"renderCurveStatically",value:function(n,a,i,o){var l=this.props,c=l.type,d=l.layout,u=l.connectNulls;l.ref;var f=ZF(l,qGe),h=Na(Na(Na({},yt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:c,layout:d,connectNulls:u});return O.createElement(rw,yg({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,l=o.points,c=o.strokeDasharray,d=o.isAnimationActive,u=o.animationBegin,f=o.animationDuration,h=o.animationEasing,m=o.animationId,g=o.animateNewValues,x=o.width,v=o.height,b=this.state,y=b.prevPoints,j=b.totalLength;return O.createElement(zo,{begin:u,duration:f,isActive:d,easing:h,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var N=w.t;if(y){var S=y.length/l.length,k=l.map(function(_,I){var F=Math.floor(I*S);if(y[F]){var H=y[F],W=Oa(H.x,_.x),z=Oa(H.y,_.y);return Na(Na({},_),{},{x:W(N),y:z(N)})}if(g){var R=Oa(x*2,_.x),q=Oa(v/2,_.y);return Na(Na({},_),{},{x:R(N),y:q(N)})}return Na(Na({},_),{},{x:_.x,y:_.y})});return i.renderCurveStatically(k,n,a)}var T=Oa(0,j),C=T(N),E;if(c){var P="".concat(c).split(/[,\s]+/gim).map(function(_){return parseFloat(_)});E=i.getStrokeDasharray(C,j,P)}else E=i.generateSimpleStrokeDasharray(j,C);return i.renderCurveStatically(l,n,a,{strokeDasharray:E})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,l=i.isAnimationActive,c=this.state,d=c.prevPoints,u=c.totalLength;return l&&o&&o.length&&(!d&&u>0||!ey(d,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,l=a.points,c=a.className,d=a.xAxis,u=a.yAxis,f=a.top,h=a.left,m=a.width,g=a.height,x=a.isAnimationActive,v=a.id;if(i||!l||!l.length)return null;var b=this.state.isAnimationFinished,y=l.length===1,j=ht("recharts-line",c),w=d&&d.allowDataOverflow,N=u&&u.allowDataOverflow,S=w||N,k=zt(v)?this.id:v,T=(n=yt(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},C=T.r,E=C===void 0?3:C,P=T.strokeWidth,_=P===void 0?2:P,I=WAe(o)?o:{},F=I.clipDot,H=F===void 0?!0:F,W=E*2+_;return O.createElement(xr,{className:j},w||N?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(k)},O.createElement("rect",{x:w?h:h-m/2,y:N?f:f-g/2,width:w?m:m*2,height:N?g:g*2})),!H&&O.createElement("clipPath",{id:"clipPath-dots-".concat(k)},O.createElement("rect",{x:h-W/2,y:f-W/2,width:m+W,height:g+W}))):null,!y&&this.renderCurve(S,k),this.renderErrorBar(S,k),(y||o)&&this.renderDots(S,H,k),(!x||b)&&Tl.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(rf(n),[0]):n,o=[],l=0;l<a;++l)o=[].concat(rf(o),rf(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(O.isValidElement(n))i=O.cloneElement(n,a);else if(Lt(n))i=n(a);else{var o=a.key,l=ZF(a,YGe),c=ht("recharts-line-dot",typeof n!="boolean"?n.className:"");i=O.createElement(y1,yg({key:o},l,{className:c}))}return i}}])}(p.PureComponent);Ci(ry,"displayName","Line");Ci(ry,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Mo.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Ci(ry,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,l=e.bandSize,c=e.displayedData,d=e.offset,u=t.layout,f=c.map(function(h,m){var g=Kn(h,o);return u==="horizontal"?{x:N3({axis:r,ticks:a,bandSize:l,entry:h,index:m}),y:zt(g)?null:n.scale(g),value:g,payload:h}:{x:zt(g)?null:r.scale(g),y:N3({axis:n,ticks:i,bandSize:l,entry:h,index:m}),value:g,payload:h}});return Na({points:f,layout:u},d)});function lm(e){"@babel/helpers - typeof";return lm=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},lm(e)}function iKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oKe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qte(n.key),n)}}function lKe(e,t,r){return t&&oKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cKe(e,t,r){return t=Nw(t),dKe(e,Gte()?Reflect.construct(t,r||[],Nw(e).constructor):t.apply(e,r))}function dKe(e,t){if(t&&(lm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uKe(e)}function uKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gte=function(){return!!e})()}function Nw(e){return Nw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Nw(e)}function fKe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gP(e,t)}function gP(e,t){return gP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},gP(e,t)}function Kte(e,t,r){return t=Qte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qte(e){var t=hKe(e,"string");return lm(t)=="symbol"?t:t+""}function hKe(e,t){if(lm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(lm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xP(){return xP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xP.apply(this,arguments)}function mKe(e){var t=e.xAxisId,r=UA(),n=zA(),a=Mte(t);return a==null?null:O.createElement(Hm,xP({},a,{className:ht("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return pl(o,!0)}}))}var iu=function(e){function t(){return iKe(this,t),cKe(this,t,arguments)}return fKe(t,e),lKe(t,[{key:"render",value:function(){return O.createElement(mKe,this.props)}}])}(O.Component);Kte(iu,"displayName","XAxis");Kte(iu,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function cm(e){"@babel/helpers - typeof";return cm=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},cm(e)}function pKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gKe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Jte(n.key),n)}}function xKe(e,t,r){return t&&gKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vKe(e,t,r){return t=Sw(t),yKe(e,Zte()?Reflect.construct(t,r||[],Sw(e).constructor):t.apply(e,r))}function yKe(e,t){if(t&&(cm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bKe(e)}function bKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zte=function(){return!!e})()}function Sw(e){return Sw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sw(e)}function jKe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vP(e,t)}function vP(e,t){return vP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vP(e,t)}function Xte(e,t,r){return t=Jte(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jte(e){var t=wKe(e,"string");return cm(t)=="symbol"?t:t+""}function wKe(e,t){if(cm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(cm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yP(){return yP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yP.apply(this,arguments)}var NKe=function(t){var r=t.yAxisId,n=UA(),a=zA(),i=Ite(r);return i==null?null:O.createElement(Hm,yP({},i,{className:ht("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(l){return pl(l,!0)}}))},ou=function(e){function t(){return pKe(this,t),vKe(this,t,arguments)}return jKe(t,e),xKe(t,[{key:"render",value:function(){return O.createElement(NKe,this.props)}}])}(O.Component);Xte(ou,"displayName","YAxis");Xte(ou,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function e5(e){return TKe(e)||CKe(e)||kKe(e)||SKe()}function SKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 784In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kKe(e,t){if(e){if(typeof e=="string")return bP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bP(e,t)}}function CKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function TKe(e){if(Array.isArray(e))return bP(e)}function bP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var jP=function(t,r,n,a,i){var o=Ua(t,VA),l=Ua(t,_1),c=[].concat(e5(o),e5(l)),d=Ua(t,E1),u="".concat(a,"Id"),f=a[0],h=r;if(c.length&&(h=c.reduce(function(x,v){if(v.props[u]===n&&Ro(v.props,"extendDomain")&&ze(v.props[f])){var b=v.props[f];return[Math.min(x[0],b),Math.max(x[1],b)]}return x},h)),d.length){var m="".concat(f,"1"),g="".concat(f,"2");h=d.reduce(function(x,v){if(v.props[u]===n&&Ro(v.props,"extendDomain")&&ze(v.props[m])&&ze(v.props[g])){var b=v.props[m],y=v.props[g];return[Math.min(x[0],b,y),Math.max(x[1],b,y)]}return x},h)}return i&&i.length&&(h=i.reduce(function(x,v){return ze(v)?[Math.min(x[0],v),Math.max(x[1],v)]:x},h)),h},ere={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(c,d,u){this.fn=c,this.context=d,this.once=u||!1}function i(c,d,u,f,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new a(u,f||c,h),g=r?r+d:d;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],m]:c._events[g].push(m):(c._events[g]=m,c._eventsCount++),c}function o(c,d){--c._eventsCount===0?c._events=new n:delete c._events[d]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var d=[],u,f;if(this._eventsCount===0)return d;for(f in u=this._events)t.call(u,f)&&d.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(u)):d},l.prototype.listeners=function(d){var u=r?r+d:d,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,m=f.length,g=new Array(m);h<m;h++)g[h]=f[h].fn;return g},l.prototype.listenerCount=function(d){var u=r?r+d:d,f=this._events[u];return f?f.fn?1:f.length:0},l.prototype.emit=function(d,u,f,h,m,g){var x=r?r+d:d;if(!this._events[x])return!1;var v=this._events[x],b=arguments.length,y,j;if(v.fn){switch(v.once&&this.removeListener(d,v.fn,void 0,!0),b){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,f),!0;case 4:return v.fn.call(v.context,u,f,h),!0;case 5:return v.fn.call(v.context,u,f,h,m),!0;case 6:return v.fn.call(v.context,u,f,h,m,g),!0}for(j=1,y=new Array(b-1);j<b;j++)y[j-1]=arguments[j];v.fn.apply(v.context,y)}else{var w=v.length,N;for(j=0;j<w;j++)switch(v[j].once&&this.removeListener(d,v[j].fn,void 0,!0),b){case 1:v[j].fn.call(v[j].context);break;case 2:v[j].fn.call(v[j].context,u);break;case 3:v[j].fn.call(v[j].context,u,f);break;case 4:v[j].fn.call(v[j].context,u,f,h);break;default:if(!y)for(N=1,y=new Array(b-1);N<b;N++)y[N-1]=arguments[N];v[j].fn.apply(v[j].context,y)}}return!0},l.prototype.on=function(d,u,f){return i(this,d,u,f,!1)},l.prototype.once=function(d,u,f){return i(this,d,u,f,!0)},l.prototype.removeListener=function(d,u,f,h){var m=r?r+d:d;if(!this._events[m])return this;if(!u)return o(this,m),this;var g=this._events[m];if(g.fn)g.fn===u&&(!h||g.once)&&(!f||g.context===f)&&o(this,m);else{for(var x=0,v=[],b=g.length;x<b;x++)(g[x].fn!==u||h&&!g[x].once||f&&g[x].context!==f)&&v.push(g[x]);v.length?this._events[m]=v.length===1?v[0]:v:o(this,m)}return this},l.prototype.removeAllListeners=function(d){var u;return d?(u=r?r+d:d,this._events[u]&&o(this,u)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(ere);var _Ke=ere.exports;const PKe=ur(_Ke);var Bk=new PKe,Uk="recharts.syncMouseEvents";function Jx(e){"@babel/helpers - typeof";return Jx=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},Jx(e)}function EKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OKe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tre(n.key),n)}}function AKe(e,t,r){return t&&OKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zk(e,t,r){return t=tre(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tre(e){var t=DKe(e,"string");return Jx(t)=="symbol"?t:t+""}function DKe(e,t){if(Jx(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jx(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var MKe=function(){function e(){EKe(this,e),zk(this,"activeIndex",0),zk(this,"coordinateList",[]),zk(this,"layout","horizontal")}return AKe(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,l=o===void 0?null:o,c=r.layout,d=c===void 0?null:c,u=r.offset,f=u===void 0?null:u,h=r.mouseHandlerCallback,m=h===void 0?null:h;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=d??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,l=a.height,c=this.coordinateList[this.activeIndex].coordinate,d=((r=window)===null||r===void 0?void 0:r.scrollX)||0,u=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+c+d,h=o+this.offset.top+l/2+u;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function IKe(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&ze(n)&&ze(a))return!0}return!1}function RKe(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function rre(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=Vr(t,r,n,a),l=Vr(t,r,n,i);return{points:[o,l],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function $Ke(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,d=t.innerRadius,u=t.outerRadius,f=t.angle,h=Vr(l,c,d,f),m=Vr(l,c,u,f);n=h.x,a=h.y,i=m.x,o=m.y}else return rre(t);return[{x:n,y:a},{x:i,y:o}]}function ev(e){"@babel/helpers - typeof";return ev=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},ev(e)}function t5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function db(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t5(Object(r),!0).forEach(function(n){LKe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LKe(e,t,r){return t=FKe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FKe(e){var t=BKe(e,"string");return ev(t)=="symbol"?t:t+""}function BKe(e,t){if(ev(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ev(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UKe(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,d=e.activeTooltipIndex,u=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,m=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!m||!i||!o||h!=="ScatterChart"&&a!=="axis")return null;var g,x=rw;if(h==="ScatterChart")g=o,x=a7e;else if(h==="BarChart")g=RKe(f,o,c,u),x=$A;else if(f==="radial"){var v=rre(o),b=v.cx,y=v.cy,j=v.radius,w=v.startAngle,N=v.endAngle;g={cx:b,cy:y,startAngle:w,endAngle:N,innerRadius:j,outerRadius:j},x=ete}else g={points:$Ke(f,o,c)},x=rw;var S=db(db(db(db({stroke:"#ccc",pointerEvents:"none"},c),g),yt(m,!1)),{},{payload:l,payloadIndex:d,className:ht("recharts-tooltip-cursor",m.className)});return p.isValidElement(m)?p.cloneElement(m,S):p.createElement(x,S)}var zKe=["item"],WKe=["children","className","width","height","style","compact","title","desc"];function dm(e){"@babel/helpers - typeof";return dm=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},dm(e)}function Pf(){return Pf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pf.apply(this,arguments)}function r5(e,t){return qKe(e)||HKe(e,t)||sre(e,t)||VKe()}function VKe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 785In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HKe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,l=[],c=!0,d=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,a=u}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(d)throw a}}return l}}function qKe(e){if(Array.isArray(e))return e}function n5(e,t){if(e==null)return{};var r=YKe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function YKe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function GKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KKe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,are(n.key),n)}}function QKe(e,t,r){return t&&KKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZKe(e,t,r){return t=kw(t),XKe(e,nre()?Reflect.construct(t,r||[],kw(e).constructor):t.apply(e,r))}function XKe(e,t){if(t&&(dm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JKe(e)}function JKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nre(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nre=function(){return!!e})()}function kw(e){return kw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kw(e)}function eQe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wP(e,t)}function wP(e,t){return wP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},wP(e,t)}function um(e){return nQe(e)||rQe(e)||sre(e)||tQe()}function tQe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 786In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sre(e,t){if(e){if(typeof e=="string")return NP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return NP(e,t)}}function rQe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nQe(e){if(Array.isArray(e))return NP(e)}function NP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s5(Object(r),!0).forEach(function(n){Dt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dt(e,t,r){return t=are(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function are(e){var t=sQe(e,"string");return dm(t)=="symbol"?t:t+""}function sQe(e,t){if(dm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aQe={xAxis:["bottom","top"],yAxis:["left","right"]},iQe={width:"100%",height:"100%"},ire={x:0,y:0};function ub(e){return e}var oQe=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},lQe=function(t,r,n,a){var i=r.find(function(u){return u&&u.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,l=a.radius;return ve(ve(ve({},a),Vr(a.cx,a.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,d=a.angle;return ve(ve(ve({},a),Vr(a.cx,a.cy,c,d)),{},{angle:d,radius:c})}return ire},O1=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(l,c){var d=c.props.data;return d&&d.length?[].concat(um(l),um(d)):l},[]);return o.length>0?o:t&&t.length&&ze(a)&&ze(i)?t.slice(a,i+1):[]};function ore(e){return e==="number"?[0,"auto"]:void 0}var SP=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,l=O1(r,t);return n<0||!i||!i.length||n>=l.length?null:i.reduce(function(c,d){var u,f=(u=d.props.data)!==null&&u!==void 0?u:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var m=f===void 0?l:f;h=kj(m,o.dataKey,a)}else h=f&&f[n]||l[n];return h?[].concat(um(c),[Gee(d,h)]):c},[])},a5=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=oQe(i,n),l=t.orderedTooltipTicks,c=t.tooltipAxis,d=t.tooltipTicks,u=Vze(o,l,d,c);if(u>=0&&d){var f=d[u]&&d[u].value,h=SP(t,r,u,f),m=lQe(n,l,u,i);return{activeTooltipIndex:u,activeLabel:f,activePayload:h,activeCoordinate:m}}return null},cQe=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,u=t.layout,f=t.children,h=t.stackOffset,m=zee(u,i);return n.reduce(function(g,x){var v,b=x.type.defaultProps!==void 0?ve(ve({},x.type.defaultProps),x.props):x.props,y=b.type,j=b.dataKey,w=b.allowDataOverflow,N=b.allowDuplicatedCategory,S=b.scale,k=b.ticks,T=b.includeHidden,C=b[o];if(g[C])return g;var E=O1(t.data,{graphicalItems:a.filter(function(oe){var _e,U=o in oe.props?oe.props[o]:(_e=oe.type.defaultProps)===null||_e===void 0?void 0:_e[o];return U===C}),dataStartIndex:c,dataEndIndex:d}),P=E.length,_,I,F;IKe(b.domain,w,y)&&(_=L_(b.domain,null,w),m&&(y==="number"||S!=="auto")&&(F=pg(E,j,"category")));var H=ore(y);if(!_||_.length===0){var W,z=(W=b.domain)!==null&&W!==void 0?W:H;if(j){if(_=pg(E,j,y),y==="category"&&m){var R=MAe(_);N&&R?(I=_,_=fw(0,P)):N||(_=T3(z,_,x).reduce(function(oe,_e){return oe.indexOf(_e)>=0?oe:[].concat(um(oe),[_e])},[]))}else if(y==="category")N?_=_.filter(function(oe){return oe!==""&&!zt(oe)}):_=T3(z,_,x).reduce(function(oe,_e){return oe.indexOf(_e)>=0||_e===""||zt(_e)?oe:[].concat(um(oe),[_e])},[]);else if(y==="number"){var q=Kze(E,a.filter(function(oe){var _e,U,M=o in oe.props?oe.props[o]:(_e=oe.type.defaultProps)===null||_e===void 0?void 0:_e[o],G="hide"in oe.props?oe.props.hide:(U=oe.type.defaultProps)===null||U===void 0?void 0:U.hide;return M===C&&(T||!G)}),j,i,u);q&&(_=q)}m&&(y==="number"||S!=="auto")&&(F=pg(E,j,"category"))}else m?_=fw(0,P):l&&l[C]&&l[C].hasStack&&y==="number"?_=h==="expand"?[0,1]:Yee(l[C].stackGroups,c,d):_=Uee(E,a.filter(function(oe){var _e=o in oe.props?oe.props[o]:oe.type.defaultProps[o],U="hide"in oe.props?oe.props.hide:oe.type.defaultProps.hide;return _e===C&&(T||!U)}),y,u,!0);if(y==="number")_=jP(f,_,C,i,k),z&&(_=L_(z,_,w));else if(y==="category"&&z){var V=z,se=_.every(function(oe){return V.indexOf(oe)>=0});se&&(_=V)}}return ve(ve({},g),{},Dt({},C,ve(ve({},b),{},{axisType:i,domain:_,categoricalDomain:F,duplicateDomain:I,originalDomain:(v=b.domain)!==null&&v!==void 0?v:H,isCategorical:m,layout:u})))},{})},dQe=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,u=t.layout,f=t.children,h=O1(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:d}),m=h.length,g=zee(u,i),x=-1;return n.reduce(function(v,b){var y=b.type.defaultProps!==void 0?ve(ve({},b.type.defaultProps),b.props):b.props,j=y[o],w=ore("number");if(!v[j]){x++;var N;return g?N=fw(0,m):l&&l[j]&&l[j].hasStack?(N=Yee(l[j].stackGroups,c,d),N=jP(f,N,j,i)):(N=L_(w,Uee(h,n.filter(function(S){var k,T,C=o in S.props?S.props[o]:(k=S.type.defaultProps)===null||k===void 0?void 0:k[o],E="hide"in S.props?S.props.hide:(T=S.type.defaultProps)===null||T===void 0?void 0:T.hide;return C===j&&!E}),"number",u),a.defaultProps.allowDataOverflow),N=jP(f,N,j,i)),ve(ve({},v),{},Dt({},j,ve(ve({axisType:i},a.defaultProps),{},{hide:!0,orientation:Ba(aQe,"".concat(i,".").concat(x%2),null),domain:N,originalDomain:w,isCategorical:g,layout:u})))}return v},{})},uQe=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,d=r.dataEndIndex,u=t.children,f="".concat(a,"Id"),h=Ua(u,i),m={};return h&&h.length?m=cQe(t,{axes:h,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:d}):o&&o.length&&(m=dQe(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:d})),m},fQe=function(t){var r=gc(t),n=pl(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:dA(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Jj(r,n)}},i5=function(t){var r=t.children,n=t.defaultShowTooltip,a=Ta(r,tm),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},hQe=function(t){return!t||!t.length?!1:t.some(function(r){var n=kl(r&&r.type);return n&&n.indexOf("Bar")>=0})},o5=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},mQe=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,l=t.yAxisMap,c=l===void 0?{}:l,d=n.width,u=n.height,f=n.children,h=n.margin||{},m=Ta(f,tm),g=Ta(f,Gf),x=Object.keys(c).reduce(function(N,S){var k=c[S],T=k.orientation;return!k.mirror&&!k.hide?ve(ve({},N),{},Dt({},T,N[T]+k.width)):N},{left:h.left||0,right:h.right||0}),v=Object.keys(o).reduce(function(N,S){var k=o[S],T=k.orientation;return!k.mirror&&!k.hide?ve(ve({},N),{},Dt({},T,Ba(N,"".concat(T))+k.height)):N},{top:h.top||0,bottom:h.bottom||0}),b=ve(ve({},v),x),y=b.bottom;m&&(b.bottom+=m.props.height||tm.defaultProps.height),g&&r&&(b=Yze(b,a,n,r));var j=d-b.left-b.right,w=u-b.top-b.bottom;return ve(ve({brushBottom:y},b),{},{width:Math.max(j,0),height:Math.max(w,0)})},pQe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},YA=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,d=t.legendContent,u=t.formatAxisMap,f=t.defaultProps,h=function(b,y){var j=y.graphicalItems,w=y.stackGroups,N=y.offset,S=y.updateId,k=y.dataStartIndex,T=y.dataEndIndex,C=b.barSize,E=b.layout,P=b.barGap,_=b.barCategoryGap,I=b.maxBarSize,F=o5(E),H=F.numericAxisName,W=F.cateAxisName,z=hQe(j),R=[];return j.forEach(function(q,V){var se=O1(b.data,{graphicalItems:[q],dataStartIndex:k,dataEndIndex:T}),oe=q.type.defaultProps!==void 0?ve(ve({},q.type.defaultProps),q.props):q.props,_e=oe.dataKey,U=oe.maxBarSize,M=oe["".concat(H,"Id")],G=oe["".concat(W,"Id")],K={},je=c.reduce(function(Le,L){var he=y["".concat(L.axisType,"Map")],Me=oe["".concat(L.axisType,"Id")];he&&he[Me]||L.axisType==="zAxis"||Eu();var Ne=he[Me];return ve(ve({},Le),{},Dt(Dt({},L.axisType,Ne),"".concat(L.axisType,"Ticks"),pl(Ne)))},K),ae=je[W],de=je["".concat(W,"Ticks")],Ce=w&&w[M]&&w[M].hasStack&&s9e(q,w[M].stackGroups),B=kl(q.type).indexOf("Bar")>=0,me=Jj(ae,de),ne=[],Be=z&&Hze({barSize:C,stackGroups:w,totalSize:pQe(je,W)});if(B){var lt,ct,Y=zt(U)?I:U,J=(lt=(ct=Jj(ae,de,!0))!==null&&ct!==void 0?ct:Y)!==null&<!==void 0?lt:0;ne=qze({barGap:P,barCategoryGap:_,bandSize:J!==me?J:me,sizeList:Be[G],maxBarSize:Y}),J!==me&&(ne=ne.map(function(Le){return ve(ve({},Le),{},{position:ve(ve({},Le.position),{},{offset:Le.position.offset-J/2})})}))}var le=q&&q.type&&q.type.getComposedData;le&&R.push({props:ve(ve({},le(ve(ve({},je),{},{displayedData:se,props:b,dataKey:_e,item:q,bandSize:me,barPosition:ne,offset:N,stackedData:Ce,layout:E,dataStartIndex:k,dataEndIndex:T}))),{},Dt(Dt(Dt({key:q.key||"item-".concat(V)},H,je[H]),W,je[W]),"animationId",S)),childIndex:qAe(q,b.children),item:q})}),R},m=function(b,y){var j=b.props,w=b.dataStartIndex,N=b.dataEndIndex,S=b.updateId;if(!b$({props:j}))return null;var k=j.children,T=j.layout,C=j.stackOffset,E=j.data,P=j.reverseStackOrder,_=o5(T),I=_.numericAxisName,F=_.cateAxisName,H=Ua(k,n),W=r9e(E,H,"".concat(I,"Id"),"".concat(F,"Id"),C,P),z=c.reduce(function(oe,_e){var U="".concat(_e.axisType,"Map");return ve(ve({},oe),{},Dt({},U,uQe(j,ve(ve({},_e),{},{graphicalItems:H,stackGroups:_e.axisType===I&&W,dataStartIndex:w,dataEndIndex:N}))))},{}),R=mQe(ve(ve({},z),{},{props:j,graphicalItems:H}),y==null?void 0:y.legendBBox);Object.keys(z).forEach(function(oe){z[oe]=u(j,z[oe],R,oe.replace("Map",""),r)});var q=z["".concat(F,"Map")],V=fQe(q),se=h(j,ve(ve({},z),{},{dataStartIndex:w,dataEndIndex:N,updateId:S,graphicalItems:H,stackGroups:W,offset:R}));return ve(ve({formattedGraphicalItems:se,graphicalItems:H,offset:R,stackGroups:W},V),z)},g=function(v){function b(y){var j,w,N;return GKe(this,b),N=ZKe(this,b,[y]),Dt(N,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Dt(N,"accessibilityManager",new MKe),Dt(N,"handleLegendBBoxUpdate",function(S){if(S){var k=N.state,T=k.dataStartIndex,C=k.dataEndIndex,E=k.updateId;N.setState(ve({legendBBox:S},m({props:N.props,dataStartIndex:T,dataEndIndex:C,updateId:E},ve(ve({},N.state),{},{legendBBox:S}))))}}),Dt(N,"handleReceiveSyncEvent",function(S,k,T){if(N.props.syncId===S){if(T===N.eventEmitterSymbol&&typeof N.props.syncMethod!="function")return;N.applySyncEvent(k)}}),Dt(N,"handleBrushChange",function(S){var k=S.startIndex,T=S.endIndex;if(k!==N.state.dataStartIndex||T!==N.state.dataEndIndex){var C=N.state.updateId;N.setState(function(){return ve({dataStartIndex:k,dataEndIndex:T},m({props:N.props,dataStartIndex:k,dataEndIndex:T,updateId:C},N.state))}),N.triggerSyncEvent({dataStartIndex:k,dataEndIndex:T})}}),Dt(N,"handleMouseEnter",function(S){var k=N.getMouseInfo(S);if(k){var T=ve(ve({},k),{},{isTooltipActive:!0});N.setState(T),N.triggerSyncEvent(T);var C=N.props.onMouseEnter;Lt(C)&&C(T,S)}}),Dt(N,"triggeredAfterMouseMove",function(S){var k=N.getMouseInfo(S),T=k?ve(ve({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};N.setState(T),N.triggerSyncEvent(T);var C=N.props.onMouseMove;Lt(C)&&C(T,S)}),Dt(N,"handleItemMouseEnter",function(S){N.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),Dt(N,"handleItemMouseLeave",function(){N.setState(function(){return{isTooltipActive:!1}})}),Dt(N,"handleMouseMove",function(S){S.persist(),N.throttleTriggeredAfterMouseMove(S)}),Dt(N,"handleMouseLeave",function(S){N.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};N.setState(k),N.triggerSyncEvent(k);var T=N.props.onMouseLeave;Lt(T)&&T(k,S)}),Dt(N,"handleOuterEvent",function(S){var k=HAe(S),T=Ba(N.props,"".concat(k));if(k&&Lt(T)){var C,E;/.*touch.*/i.test(k)?E=N.getMouseInfo(S.changedTouches[0]):E=N.getMouseInfo(S),T((C=E)!==null&&C!==void 0?C:{},S)}}),Dt(N,"handleClick",function(S){var k=N.getMouseInfo(S);if(k){var T=ve(ve({},k),{},{isTooltipActive:!0});N.setState(T),N.triggerSyncEvent(T);var C=N.props.onClick;Lt(C)&&C(T,S)}}),Dt(N,"handleMouseDown",function(S){var k=N.props.onMouseDown;if(Lt(k)){var T=N.getMouseInfo(S);k(T,S)}}),Dt(N,"handleMouseUp",function(S){var k=N.props.onMouseUp;if(Lt(k)){var T=N.getMouseInfo(S);k(T,S)}}),Dt(N,"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&N.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),Dt(N,"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&N.handleMouseDown(S.changedTouches[0])}),Dt(N,"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&N.handleMouseUp(S.changedTouches[0])}),Dt(N,"triggerSyncEvent",function(S){N.props.syncId!==void 0&&Bk.emit(Uk,N.props.syncId,S,N.eventEmitterSymbol)}),Dt(N,"applySyncEvent",function(S){var k=N.props,T=k.layout,C=k.syncMethod,E=N.state.updateId,P=S.dataStartIndex,_=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)N.setState(ve({dataStartIndex:P,dataEndIndex:_},m({props:N.props,dataStartIndex:P,dataEndIndex:_,updateId:E},N.state)));else if(S.activeTooltipIndex!==void 0){var I=S.chartX,F=S.chartY,H=S.activeTooltipIndex,W=N.state,z=W.offset,R=W.tooltipTicks;if(!z)return;if(typeof C=="function")H=C(R,S);else if(C==="value"){H=-1;for(var q=0;q<R.length;q++)if(R[q].value===S.activeLabel){H=q;break}}var V=ve(ve({},z),{},{x:z.left,y:z.top}),se=Math.min(I,V.x+V.width),oe=Math.min(F,V.y+V.height),_e=R[H]&&R[H].value,U=SP(N.state,N.props.data,H),M=R[H]?{x:T==="horizontal"?R[H].coordinate:se,y:T==="horizontal"?oe:R[H].coordinate}:ire;N.setState(ve(ve({},S),{},{activeLabel:_e,activeCoordinate:M,activePayload:U,activeTooltipIndex:H}))}else N.setState(S)}),Dt(N,"renderCursor",function(S){var k,T=N.state,C=T.isTooltipActive,E=T.activeCoordinate,P=T.activePayload,_=T.offset,I=T.activeTooltipIndex,F=T.tooltipAxisBandSize,H=N.getTooltipEventType(),W=(k=S.props.active)!==null&&k!==void 0?k:C,z=N.props.layout,R=S.key||"_recharts-cursor";return O.createElement(UKe,{key:R,activeCoordinate:E,activePayload:P,activeTooltipIndex:I,chartName:r,element:S,isActive:W,layout:z,offset:_,tooltipAxisBandSize:F,tooltipEventType:H})}),Dt(N,"renderPolarAxis",function(S,k,T){var C=Ba(S,"type.axisType"),E=Ba(N.state,"".concat(C,"Map")),P=S.type.defaultProps,_=P!==void 0?ve(ve({},P),S.props):S.props,I=E&&E[_["".concat(C,"Id")]];return p.cloneElement(S,ve(ve({},I),{},{className:ht(C,I.className),key:S.key||"".concat(k,"-").concat(T),ticks:pl(I,!0)}))}),Dt(N,"renderPolarGrid",function(S){var k=S.props,T=k.radialLines,C=k.polarAngles,E=k.polarRadius,P=N.state,_=P.radiusAxisMap,I=P.angleAxisMap,F=gc(_),H=gc(I),W=H.cx,z=H.cy,R=H.innerRadius,q=H.outerRadius;return p.cloneElement(S,{polarAngles:Array.isArray(C)?C:pl(H,!0).map(function(V){return V.coordinate}),polarRadius:Array.isArray(E)?E:pl(F,!0).map(function(V){return V.coordinate}),cx:W,cy:z,innerRadius:R,outerRadius:q,key:S.key||"polar-grid",radialLines:T})}),Dt(N,"renderLegend",function(){var S=N.state.formattedGraphicalItems,k=N.props,T=k.children,C=k.width,E=k.height,P=N.props.margin||{},_=C-(P.left||0)-(P.right||0),I=Fee({children:T,formattedGraphicalItems:S,legendWidth:_,legendContent:d});if(!I)return null;var F=I.item,H=n5(I,zKe);return p.cloneElement(F,ve(ve({},H),{},{chartWidth:C,chartHeight:E,margin:P,onBBoxUpdate:N.handleLegendBBoxUpdate}))}),Dt(N,"renderTooltip",function(){var S,k=N.props,T=k.children,C=k.accessibilityLayer,E=Ta(T,_a);if(!E)return null;var P=N.state,_=P.isTooltipActive,I=P.activeCoordinate,F=P.activePayload,H=P.activeLabel,W=P.offset,z=(S=E.props.active)!==null&&S!==void 0?S:_;return p.cloneElement(E,{viewBox:ve(ve({},W),{},{x:W.left,y:W.top}),active:z,label:H,payload:z?F:[],coordinate:I,accessibilityLayer:C})}),Dt(N,"renderBrush",function(S){var k=N.props,T=k.margin,C=k.data,E=N.state,P=E.offset,_=E.dataStartIndex,I=E.dataEndIndex,F=E.updateId;return p.cloneElement(S,{key:S.key||"_recharts-brush",onChange:ib(N.handleBrushChange,S.props.onChange),data:C,x:ze(S.props.x)?S.props.x:P.left,y:ze(S.props.y)?S.props.y:P.top+P.height+P.brushBottom-(T.bottom||0),width:ze(S.props.width)?S.props.width:P.width,startIndex:_,endIndex:I,updateId:"brush-".concat(F)})}),Dt(N,"renderReferenceElement",function(S,k,T){if(!S)return null;var C=N,E=C.clipPathId,P=N.state,_=P.xAxisMap,I=P.yAxisMap,F=P.offset,H=S.type.defaultProps||{},W=S.props,z=W.xAxisId,R=z===void 0?H.xAxisId:z,q=W.yAxisId,V=q===void 0?H.yAxisId:q;return p.cloneElement(S,{key:S.key||"".concat(k,"-").concat(T),xAxis:_[R],yAxis:I[V],viewBox:{x:F.left,y:F.top,width:F.width,height:F.height},clipPathId:E})}),Dt(N,"renderActivePoints",function(S){var k=S.item,T=S.activePoint,C=S.basePoint,E=S.childIndex,P=S.isRange,_=[],I=k.props.key,F=k.item.type.defaultProps!==void 0?ve(ve({},k.item.type.defaultProps),k.item.props):k.item.props,H=F.activeDot,W=F.dataKey,z=ve(ve({index:E,dataKey:W,cx:T.x,cy:T.y,r:4,fill:RA(k.item),strokeWidth:2,stroke:"#fff",payload:T.payload,value:T.value},yt(H,!1)),Cj(H));return _.push(b.renderActiveDot(H,z,"".concat(I,"-activePoint-").concat(E))),C?_.push(b.renderActiveDot(H,ve(ve({},z),{},{cx:C.x,cy:C.y}),"".concat(I,"-basePoint-").concat(E))):P&&_.push(null),_}),Dt(N,"renderGraphicChild",function(S,k,T){var C=N.filterFormatItem(S,k,T);if(!C)return null;var E=N.getTooltipEventType(),P=N.state,_=P.isTooltipActive,I=P.tooltipAxis,F=P.activeTooltipIndex,H=P.activeLabel,W=N.props.children,z=Ta(W,_a),R=C.props,q=R.points,V=R.isRange,se=R.baseLine,oe=C.item.type.defaultProps!==void 0?ve(ve({},C.item.type.defaultProps),C.item.props):C.item.props,_e=oe.activeDot,U=oe.hide,M=oe.activeBar,G=oe.activeShape,K=!!(!U&&_&&z&&(_e||M||G)),je={};E!=="axis"&&z&&z.props.trigger==="click"?je={onClick:ib(N.handleItemMouseEnter,S.props.onClick)}:E!=="axis"&&(je={onMouseLeave:ib(N.handleItemMouseLeave,S.props.onMouseLeave),onMouseEnter:ib(N.handleItemMouseEnter,S.props.onMouseEnter)});var ae=p.cloneElement(S,ve(ve({},C.props),je));function de(L){return typeof I.dataKey=="function"?I.dataKey(L.payload):null}if(K)if(F>=0){var Ce,B;if(I.dataKey&&!I.allowDuplicatedCategory){var me=typeof I.dataKey=="function"?de:"payload.".concat(I.dataKey.toString());Ce=kj(q,me,H),B=V&&se&&kj(se,me,H)}else Ce=q==null?void 0:q[F],B=V&&se&&se[F];if(G||M){var ne=S.props.activeIndex!==void 0?S.props.activeIndex:F;return[p.cloneElement(S,ve(ve(ve({},C.props),je),{},{activeIndex:ne})),null,null]}if(!zt(Ce))return[ae].concat(um(N.renderActivePoints({item:C,activePoint:Ce,basePoint:B,childIndex:F,isRange:V})))}else{var Be,lt=(Be=N.getItemByXY(N.state.activeCoordinate))!==null&&Be!==void 0?Be:{graphicalItem:ae},ct=lt.graphicalItem,Y=ct.item,J=Y===void 0?S:Y,le=ct.childIndex,Le=ve(ve(ve({},C.props),je),{},{activeIndex:le});return[p.cloneElement(J,Le),null,null]}return V?[ae,null,null]:[ae,null]}),Dt(N,"renderCustomized",function(S,k,T){return p.cloneElement(S,ve(ve({key:"recharts-customized-".concat(T)},N.props),N.state))}),Dt(N,"renderMap",{CartesianGrid:{handler:ub,once:!0},ReferenceArea:{handler:N.renderReferenceElement},ReferenceLine:{handler:ub},ReferenceDot:{handler:N.renderReferenceElement},XAxis:{handler:ub},YAxis:{handler:ub},Brush:{handler:N.renderBrush,once:!0},Bar:{handler:N.renderGraphicChild},Line:{handler:N.renderGraphicChild},Area:{handler:N.renderGraphicChild},Radar:{handler:N.renderGraphicChild},RadialBar:{handler:N.renderGraphicChild},Scatter:{handler:N.renderGraphicChild},Pie:{handler:N.renderGraphicChild},Funnel:{handler:N.renderGraphicChild},Tooltip:{handler:N.renderCursor,once:!0},PolarGrid:{handler:N.renderPolarGrid,once:!0},PolarAngleAxis:{handler:N.renderPolarAxis},PolarRadiusAxis:{handler:N.renderPolarAxis},Customized:{handler:N.renderCustomized}}),N.clipPathId="".concat((j=y.id)!==null&&j!==void 0?j:$m("recharts"),"-clip"),N.throttleTriggeredAfterMouseMove=LJ(N.triggeredAfterMouseMove,(w=y.throttleDelay)!==null&&w!==void 0?w:1e3/60),N.state={},N}return eQe(b,v),QKe(b,[{key:"componentDidMount",value:function(){var j,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var j=this.props,w=j.children,N=j.data,S=j.height,k=j.layout,T=Ta(w,_a);if(T){var C=T.props.defaultIndex;if(!(typeof C!="number"||C<0||C>this.state.tooltipTicks.length-1)){var E=this.state.tooltipTicks[C]&&this.state.tooltipTicks[C].value,P=SP(this.state,N,C,E),_=this.state.tooltipTicks[C].coordinate,I=(this.state.offset.top+S)/2,F=k==="horizontal",H=F?{x:_,y:I}:{y:_,x:I},W=this.state.formattedGraphicalItems.find(function(R){var q=R.item;return q.type.name==="Scatter"});W&&(H=ve(ve({},H),W.props.points[C].tooltipPosition),P=W.props.points[C].tooltipPayload);var z={activeTooltipIndex:C,isTooltipActive:!0,activeLabel:E,activePayload:P,activeCoordinate:H};this.setState(z),this.renderCursor(T),this.accessibilityManager.setIndex(C)}}}},{key:"getSnapshotBeforeUpdate",value:function(j,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==j.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==j.margin){var N,S;this.accessibilityManager.setDetails({offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(j){JT([Ta(j.children,_a)],[Ta(this.props.children,_a)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var j=Ta(this.props.children,_a);if(j&&typeof j.props.shared=="boolean"){var w=j.props.shared?"axis":"item";return l.indexOf(w)>=0?w:i}return i}},{key:"getMouseInfo",value:function(j){if(!this.container)return null;var w=this.container,N=w.getBoundingClientRect(),S=v6e(N),k={chartX:Math.round(j.pageX-S.left),chartY:Math.round(j.pageY-S.top)},T=N.width/w.offsetWidth||1,C=this.inRange(k.chartX,k.chartY,T);if(!C)return null;var E=this.state,P=E.xAxisMap,_=E.yAxisMap,I=this.getTooltipEventType();if(I!=="axis"&&P&&_){var F=gc(P).scale,H=gc(_).scale,W=F&&F.invert?F.invert(k.chartX):null,z=H&&H.invert?H.invert(k.chartY):null;return ve(ve({},k),{},{xValue:W,yValue:z})}var R=a5(this.state,this.props.data,this.props.layout,C);return R?ve(ve({},k),R):null}},{key:"inRange",value:function(j,w){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,k=j/N,T=w/N;if(S==="horizontal"||S==="vertical"){var C=this.state.offset,E=k>=C.left&&k<=C.left+C.width&&T>=C.top&&T<=C.top+C.height;return E?{x:k,y:T}:null}var P=this.state,_=P.angleAxisMap,I=P.radiusAxisMap;if(_&&I){var F=gc(_);return E3({x:k,y:T},F)}return null}},{key:"parseEventsOfWrapper",value:function(){var j=this.props.children,w=this.getTooltipEventType(),N=Ta(j,_a),S={};N&&w==="axis"&&(N.props.trigger==="click"?S={onClick:this.handleClick}:S={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var k=Cj(this.props,this.handleOuterEvent);return ve(ve({},k),S)}},{key:"addListener",value:function(){Bk.on(Uk,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Bk.removeListener(Uk,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(j,w,N){for(var S=this.state.formattedGraphicalItems,k=0,T=S.length;k<T;k++){var C=S[k];if(C.item===j||C.props.key===j.key||w===kl(C.item.type)&&N===C.childIndex)return C}return null}},{key:"renderClipPath",value:function(){var j=this.clipPathId,w=this.state.offset,N=w.left,S=w.top,k=w.height,T=w.width;return O.createElement("defs",null,O.createElement("clipPath",{id:j},O.createElement("rect",{x:N,y:S,height:k,width:T})))}},{key:"getXScales",value:function(){var j=this.state.xAxisMap;return j?Object.entries(j).reduce(function(w,N){var S=r5(N,2),k=S[0],T=S[1];return ve(ve({},w),{},Dt({},k,T.scale))},{}):null}},{key:"getYScales",value:function(){var j=this.state.yAxisMap;return j?Object.entries(j).reduce(function(w,N){var S=r5(N,2),k=S[0],T=S[1];return ve(ve({},w),{},Dt({},k,T.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(j){var w;return(w=this.state.xAxisMap)===null||w===void 0||(w=w[j])===null||w===void 0?void 0:w.scale}},{key:"getYScaleByAxisId",value:function(j){var w;return(w=this.state.yAxisMap)===null||w===void 0||(w=w[j])===null||w===void 0?void 0:w.scale}},{key:"getItemByXY",value:function(j){var w=this.state,N=w.formattedGraphicalItems,S=w.activeItem;if(N&&N.length)for(var k=0,T=N.length;k<T;k++){var C=N[k],E=C.props,P=C.item,_=P.type.defaultProps!==void 0?ve(ve({},P.type.defaultProps),P.props):P.props,I=kl(P.type);if(I==="Bar"){var F=(E.data||[]).find(function(R){return FVe(j,R)});if(F)return{graphicalItem:C,payload:F}}else if(I==="RadialBar"){var H=(E.data||[]).find(function(R){return E3(j,R)});if(H)return{graphicalItem:C,payload:H}}else if(S1(C,S)||k1(C,S)||Gx(C,S)){var W=THe({graphicalItem:C,activeTooltipItem:S,itemData:_.data}),z=_.activeIndex===void 0?W:_.activeIndex;return{graphicalItem:ve(ve({},C),{},{childIndex:z}),payload:Gx(C,S)?_.data[W]:C.props.data[W]}}}return null}},{key:"render",value:function(){var j=this;if(!b$(this))return null;
786var w=this.props,N=w.children,S=w.className,k=w.width,T=w.height,C=w.style,E=w.compact,P=w.title,_=w.desc,I=n5(w,WKe),F=yt(I,!1);if(E)return O.createElement(LF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.createElement(t_,Pf({},F,{width:k,height:T,title:P,desc:_}),this.renderClipPath(),w$(N,this.renderMap)));if(this.props.accessibilityLayer){var H,W;F.tabIndex=(H=this.props.tabIndex)!==null&&H!==void 0?H:0,F.role=(W=this.props.role)!==null&&W!==void 0?W:"application",F.onKeyDown=function(R){j.accessibilityManager.keyboardEvent(R)},F.onFocus=function(){j.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return O.createElement(LF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},O.createElement("div",Pf({className:ht("recharts-wrapper",S),style:ve({position:"relative",cursor:"default",width:k,height:T},C)},z,{ref:function(q){j.container=q}}),O.createElement(t_,Pf({},F,{width:k,height:T,title:P,desc:_,style:iQe}),this.renderClipPath(),w$(N,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(p.Component);Dt(g,"displayName",r),Dt(g,"defaultProps",ve({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),Dt(g,"getDerivedStateFromProps",function(v,b){var y=v.dataKey,j=v.data,w=v.children,N=v.width,S=v.height,k=v.layout,T=v.stackOffset,C=v.margin,E=b.dataStartIndex,P=b.dataEndIndex;if(b.updateId===void 0){var _=i5(v);return ve(ve(ve({},_),{},{updateId:0},m(ve(ve({props:v},_),{},{updateId:0}),b)),{},{prevDataKey:y,prevData:j,prevWidth:N,prevHeight:S,prevLayout:k,prevStackOffset:T,prevMargin:C,prevChildren:w})}if(y!==b.prevDataKey||j!==b.prevData||N!==b.prevWidth||S!==b.prevHeight||k!==b.prevLayout||T!==b.prevStackOffset||!Yf(C,b.prevMargin)){var I=i5(v),F={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},H=ve(ve({},a5(b,j,k)),{},{updateId:b.updateId+1}),W=ve(ve(ve({},I),F),H);return ve(ve(ve({},W),m(ve({props:v},W),b)),{},{prevDataKey:y,prevData:j,prevWidth:N,prevHeight:S,prevLayout:k,prevStackOffset:T,prevMargin:C,prevChildren:w})}if(!JT(w,b.prevChildren)){var z,R,q,V,se=Ta(w,tm),oe=se&&(z=(R=se.props)===null||R===void 0?void 0:R.startIndex)!==null&&z!==void 0?z:E,_e=se&&(q=(V=se.props)===null||V===void 0?void 0:V.endIndex)!==null&&q!==void 0?q:P,U=oe!==E||_e!==P,M=!zt(j),G=M&&!U?b.updateId:b.updateId+1;return ve(ve({updateId:G},m(ve(ve({props:v},b),{},{updateId:G,dataStartIndex:oe,dataEndIndex:_e}),b)),{},{prevChildren:w,dataStartIndex:oe,dataEndIndex:_e})}return null}),Dt(g,"renderActiveDot",function(v,b,y){var j;return p.isValidElement(v)?j=p.cloneElement(v,b):Lt(v)?j=v(b):j=O.createElement(y1,b),O.createElement(xr,{className:"recharts-active-dot",key:y},j)});var x=p.forwardRef(function(b,y){return O.createElement(g,Pf({},b,{ref:y}))});return x.displayName=g.displayName,x},gQe=YA({chartName:"LineChart",GraphicalChild:ry,axisComponents:[{axisType:"xAxis",AxisComp:iu},{axisType:"yAxis",AxisComp:ou}],formatAxisMap:Cte}),l5=YA({chartName:"BarChart",GraphicalChild:sd,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:iu},{axisType:"yAxis",AxisComp:ou}],formatAxisMap:Cte}),xQe=YA({chartName:"PieChart",GraphicalChild:Kl,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:N1},{axisType:"radiusAxis",AxisComp:j1}],formatAxisMap:m9e,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const fb=["#6366f1","#8b5cf6","#a78bfa","#c4b5fd","#ddd6fe","#ede9fe"];function vQe(){const[e,t]=p.useState(!1),{data:r,isLoading:n}=ut({queryKey:["/api/analytics/overview"]}),a=()=>{t(!0)},i=r?r.summary.thisWeekBookings-r.summary.prevWeekBookings:0,o=r!=null&&r.summary.prevWeekBookings?Math.round(i/r.summary.prevWeekBookings*100):0;return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-50 dark:bg-slate-900",children:[s.jsx(tr,{onCreateEvent:a}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:a}),s.jsx("main",{className:"flex-1 overflow-y-auto bg-white dark:bg-slate-800 p-6",children:s.jsxs("div",{className:"max-w-7xl mx-auto
786space-y-6",children:[s.jsx("h1",{className:"text-2xl font-bold text-neutral-900 dark:text-slate-100",children:"Analytics"}),n?s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[...Array(4)].map((l,c)=>s.jsx(X,{children:s.jsx(te,{className:"p-6",children:s.jsx("div",{className:"h-20 bg-neutral-100 dark:bg-slate-700 rounded animate-pulse"})})},c))}):r?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsx(X,{children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400",children:"Total Bookings"}),s.jsx("p",{className:"text-3xl font-bold text-neutral-900 dark:text-slate-100",children:r.summary.totalBookings})]}),s.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center",children:s.jsx(Gt,{className:"h-6 w-6 text-primary"})})]})})}),s.jsx(X,{children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400",children:"Confirmed"}),s.jsx("p",{className:"text-3xl font-bold text-green-600",children:r.summary.totalConfirmed})]}),s.jsx("div",{className:"w-12 h-12 rounded-full bg-green-100 dark:bg-green-900/20 flex items-center justify-center",children:s.jsx(tT,{className:"h-6 w-6 text-green-600"})})]})})}),s.jsx(X,{children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400",children:"Cancelled"}),s.jsx("p",{className:"text-3xl font-bold text-red-500",children:r.summary.totalCancelled})]}),s.jsx("div",{className:"w-12 h-12 rounded-full bg-red-100 dark:bg-red-900/20 flex items-center justify-center",children:s.jsx(gI,{className:"h-6 w-6 text-red-500"})})]})})}),s.jsx(X,{children:s.jsx(te,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-neutral-500 dark:text-slate-400",children:"This Week"}),s.jsx("p",{className:"text-3xl font-bold text-neutral-900 dark:text-slate-100",children:r.summary.thisWeekBookings}),s.jsxs("div",{className:"flex items-center mt-1",children:[i>0?s.jsx(tT,{className:"h-3 w-3 text-green-500 mr-1"}):i<0?s.jsx(gI,{className:"h-3 w-3 text-red-500 mr-1"}):s.jsx(jW,{className:"h-3 w-3 text-neutral-400 mr-1"}),s.jsxs("span",{className:`text-xs ${i>0?"text-green-500":i<0?"text-red-500":"text-neutral-400"}`,children:[i>0?"+":"",o,"% vs last week"]})]})]}),s.jsx("div",{className:"w-12 h-12 rounded-full bg-blue-100 dark:bg-blue-900/20 flex items-center justify-center",children:s.jsx(qc,{className:"h-6 w-6 text-blue-600"})})]})})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsx(fe,{className:"text-lg",children:"Bookings Over Time (30 days)"})}),s.jsx(te,{children:s.jsx("div",{className:"h-64",children:s.jsx(tb,{width:"100%",height:"100%",children:s.jsxs(gQe,{data:r.bookingsOverTime,children:[s.jsx(Qb,{strokeDasharray:"3 3",className:"opacity-30"}),s.jsx(iu,{dataKey:"date",tick:{fontSize:11},tickFormatter:l=>{const c=new Date(l);return`${c.getMonth()+1}/${c.getDate()}`},interval:4}),s.jsx(ou,{tick:{fontSize:11},allowDecimals:!1}),s.jsx(_a,{labelFormatter:l=>new Date(l).toLocaleDateString(),contentStyle:{borderRadius:"8px",fontSize:"13px"}}),s.jsx(ry,{type:"monotone",dataKey:"count",stroke:"#6366f1",strokeWidth:2,dot:!1,name:"Bookings"})]})})})})]}),s.jsxs(X,{children:[s.jsx(ue,{children:s.jsx(fe,{className:"text-lg",children:"Bookings by Day of Week"})}),s.jsx(te,{children:s.jsx("div",{className:"h-64",children:s.jsx(tb,{width:"100%",height:"100%",children:s.jsxs(l5,{data:r.popularDays,children:[s.jsx(Qb,{strokeDasharray:"3 3",className:"opacity-30"}),s.jsx(iu,{dataKey:"day",tick:{fontSize:11}
786,tickFormatter:l=>l.substring(0,3)}),s.jsx(ou,{tick:{fontSize:11},allowDecimals:!1}),s.jsx(_a,{contentStyle:{borderRadius:"8px",fontSize:"13px"}}),s.jsx(sd,{dataKey:"count",fill:"#6366f1",radius:[4,4,0,0],name:"Bookings"})]})})})})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs(fe,{className:"text-lg flex items-center gap-2",children:[s.jsx(dr,{className:"h-5 w-5"}),"Popular Booking Hours"]})}),s.jsx(te,{children:s.jsx("div",{className:"h-64",children:s.jsx(tb,{width:"100%",height:"100%",children:s.jsxs(l5,{data:r.popularHours.filter(l=>l.hour>=6&&l.hour<=22),children:[s.jsx(Qb,{strokeDasharray:"3 3",className:"opacity-30"}),s.jsx(iu,{dataKey:"hour",tick:{fontSize:11},tickFormatter:l=>l===0?"12am":l<12?`${l}am`:l===12?"12pm":`${l-12}pm`}),s.jsx(ou,{tick:{fontSize:11},allowDecimals:!1}),s.jsx(_a,{labelFormatter:l=>{const c=Number(l);return c===0?"12:00 AM":c<12?`${c}:00 AM`:c===12?"12:00 PM":`${c-12}:00 PM`},contentStyle:{borderRadius:"8px",fontSize:"13px"}}),s.jsx(sd,{dataKey:"count",fill:"#8b5cf6",radius:[4,4,0,0],name:"Bookings"})]})})})})]}),s.jsxs(X,{children:[s.jsx(ue,{children:s.jsx(fe,{className:"text-lg",children:"Top Event Types"})}),s.jsx(te,{children:r.topEventTypes.length===0?s.jsx("p",{className:"text-neutral-500 dark:text-slate-400 text-center py-8",children:"No booking data yet"}):s.jsxs("div",{className:"h-64 flex items-center",children:[s.jsx("div",{className:"w-1/2",children:s.jsx(tb,{width:"100%",height:200,children:s.jsxs(xQe,{children:[s.jsx(Kl,{data:r.topEventTypes.slice(0,6),cx:"50%",cy:"50%",innerRadius:40,outerRadius:80,dataKey:"count",nameKey:"title",children:r.topEventTypes.slice(0,6).map((l,c)=>s.jsx(o1,{fill:fb[c%fb.length]},`cell-${c}`))}),s.jsx(_a,{contentStyle:{borderRadius:"8px",fontSize:"13px"}})]})})}),s.jsx("div",{className:"w-1/2 space-y-2",children:r.topEventTypes.slice(0,6).map((l,c)=>s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0",style:{backgroundColor:fb[c%fb.length]}}),s.jsx("span",{className:"truncate text-neutral-700 dark:text-slate-300",children:l.title}),s.jsx("span",{className:"ml-auto font-medium text-neutral-900 dark:text-slate-100",children:l.count})]},l.title))})]})})]})]}),r.teamLeaderboard.length>0&&s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs(fe,{className:"text-lg flex items-center gap-2",children:[s.jsx(ir,{className:"h-5 w-5"}),"Team Leaderboard"]})}),s.jsx(te,{children:s.jsx("div",{className:"space-y-3",children:r.teamLeaderboard.map((l,c)=>s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-neutral-500 dark:text-slate-400 w-6 text-center",children:c+1}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-neutral-900 dark:text-slate-100",children:l.name}),s.jsxs("span",{className:"text-sm text-neutral-500 dark:text-slate-400",children:[l.bookingCount," bookings"]})]}),s.jsx("div",{className:"w-full bg-neutral-100 dark:bg-slate-700 rounded-full h-2",children:s.jsx("div",{className:"bg-primary h-2 rounded-full transition-all",style:{width:`${l.bookingCount/r.teamLeaderboard[0].bookingCount*100}%`}})})]})]},l.userId))})})]})]}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx(qc,{className:"h-12 w-12 text-neutral-300 mx-auto mb-4"}),s.jsx("p",{className:"text-neutral-500 dark:text-slate-400",children:"No analytics data available yet. Start creating booking links and receiving bookings."})]})]})})]}),s.jsx(Ds,{onCreateEventClick:a}),s.jsx(Mn,{isOpen:e,onClose:()=>t(!1)}),s.jsx(hi,{})]})}const yQe=512;function Dp(e,t=typeof window>"u"?"":window.location.search){if(!t)return"";let r;try{r=new URLSearchParams(t).get(e)}catch{return""}if(!r)return"";const n=r.trim();return!n||n.length>yQe||/[{}]/.test(n)?"":n}function hb({slug:e,userPath:t}){var he,Me,Ne,Re,or,Jr;const{toast:r}=Qt(),[n,a]=Nn(),{data:i,userTimeZone:o}=eO(),[l,c]=p.useState(o),[d,u]=p.useState(null),[f,h]=p.useState(new Date),[m,g]=p.useState("select");p.useEffect(()=>{d!=null&&d.ownerTimezone?c(d.ownerTimezone):o&&c(o)},[o,d]);const[x,v]=p.useState(!0),[b,y]=p.useState(!1),[j,w]=p.useState(null),[N,S]=p.useState(void 0),[k,T]=p.useState([]),[C,E]=p.useState(null),[P,_]=p.useState(()=>Dp("name")),[I,F]=p.useState(()=>Dp("email")),[H,W]=p.useState(()=>Dp("phone")),[z,R]=p.useState(""),[q]=p.useState(()=>
786Dp("external_id")||Dp("utm_content")),[V,se]=p.useState({}),[oe,_e]=p.useState(!1),[U,M]=p.useState(!1),[G,K]=p.useState(""),[je,ae]=p.useState(4),[de,Ce]=p.useState(null);p.useEffect(()=>{async function be(){try{let it=t?`/api/public/${t}/booking/${e}`:`/api/public/booking/${e}`;const vt=await fetch(it);if(vt.status===307){const Un=await vt.json();if(Un.redirectUrl){window.history.replaceState(null,"",Un.redirectUrl);const vs=Un.redirectUrl.match(/\/([^\/]+)\/booking\//);if(vs&&vs[1]){const oa=`/api/public/${vs[1]}/booking/${e}`,en=await fetch(oa);if(!en.ok)throw new Error("Booking link not found or inactive");const ys=await en.json();u(ys);return}}}if(!vt.ok)throw new Error("Booking link not found or inactive");const In=await vt.json();u(In)}catch{w("This booking link could not be found or is no longer active.")}finally{v(!1)}}be()},[e,t]),p.useEffect(()=>{if(!N||!d)return;async function be(){y(!0);try{const it=l||"UTC",In=ij(N||new Date,it),Un=J4(Hs(In),it),vs=J4(V2(In),it);let ia=t?`/api/public/${t}/booking/${e}/availability`:`/api/public/booking/${e}/availability`;const oa=new URLSearchParams({startDate:Un.toISOString(),endDate:vs.toISOString(),timezone:l||"UTC"}),en=await fetch(`${ia}?${oa.toString()}`);if(en.status===307){const Go=await en.json();if(Go.redirectUrl){const Ql=Go.redirectUrl.match(/\/([^\/]+)\/booking\//);if(Ql&&Ql[1]){const vd=Ql[1],Xi=window.location.pathname.replace(`/${t}/`,`/${vd}/`);window.history.replaceState(null,"",Xi);const Ko=`/api/public/${vd}/booking/${e}/availability`,qm=await fetch(`${Ko}?${oa.toString()}`);if(!qm.ok)throw new Error("Failed to load available time slots after redirection");const ny=(await qm.json()).map(Ym=>({start:wf(Ym.start),end:wf(Ym.end)}));T(ny),E(null);return}}}if(!en.ok)throw new Error("Failed to load available time slots");const Yo=(await en.json()).map(Go=>({start:wf(Go.start),end:wf(Go.end)}));T(Yo),E(null)}catch{r({title:"Error",description:"Failed to load available time slots. Please try again.",variant:"destructive"}),T([])}finally{y(!1)}}be()},[N,d,e,l,r]);const B=be=>{if(!d)return!1;const it=be.getDay().toString();return d.availableDays.includes(it)},me=be=>sf(be.start,l,"h:mm a"),ne=async()=>{var it;if(!C||!d)return;if(!P.trim()){r({title:"Name required",description:"Please enter your name",variant:"destructive"});return}if(!I.trim()||!I.includes("@")){r({title:"Valid email required",description:"Please enter a valid email address",variant:"destructive"});return}const be=(d==null?void 0:d.customQuestions)||[];for(const vt of be)if(vt.required&&(!V[vt.id]||typeof V[vt.id]=="string"&&!V[vt.id].trim())){r({title:"Required field",description:`Please fill in "${vt.label}"`,variant:"destructive"});return}_e(!0);try{let vt=null;if(d.requirePayment&&d.price)try{const en=await fetch("/api/public/booking-payment/create-payment-intent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bookingLinkId:d.id,bookingLinkSlug:e})});if(!en.ok){const Yo=await en.json();throw new Error(Yo.message||"Payment setup failed")}vt=((it=(await en.json()).clientSecret)==null?void 0:it.split("_secret_")[0])||null}catch(en){r({title:"Payment Error",description:en.message,variant:"destructive"}),_e(!1);return}const In=Object.entries(V).filter(([en,ys])=>ys!==""&&ys!==void 0&&ys!==null).map(([en,ys])=>({questionId:parseInt(en),value:ys})),Un={name:P,email:I,notes:z,...q&&{externalId:q},startTime:C.start.toISOString(),endTime:C.end.toISOString(),timezone:l,customAnswers:In,...vt&&{paymentIntentId:vt,paymentStatus:"pending",paymentAmount:d.price,paymentCurrency:d.currency||"usd"},...G&&je>1&&{recurring:{frequency:G,count:je}}},vs=t?`/api/public/${t}/booking/${e}`:`/api/public/booking/${e}`,ia=await fetch(vs,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Un)});if(ia.status===307){const en=await ia.json();if(en.redirectUrl){const ys=en.redirectUrl.match(/\/([^\/]+)\/booking\//);if(ys&&ys[1]){const Yo=ys[1],Ql=window.location.pathname.replace(`/${t}/`,`/${Yo}/`);window.history.replaceState(null,"",Ql);const vd=`/api/public/${Yo}/booking/${e}`,Zl=await fetch(vd,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Un)});if(!Zl.ok){const Ko=await Zl.json();throw new Error(Ko.message||"Failed to create booking after redirection")}const Xi=await Zl.json();Ce(Xi),M(!0),Xi.redirectUrl&&setTimeout(()=>{window.location.href=Xi.redirectUrl},3e3),r({title:Xi.isPending?"Booking Request Submitted":"Booking Confirmed",description:Xi.isPending?"Your booking request has been submitted and is awaiting confirmation from the host.":"Your booking has been successfully scheduled."});return}}}if(!ia.ok){const en=await ia.json();throw new Error(en.message||"Failed to create booking")}const oa=await ia.json();Ce(oa),M(!0),oa.redirectUrl&&!oa.isPending&&setTimeout(()=>{window.location.href=oa.redirectUrl},3e3),r({title:oa.isPending?"Booking Request Submitted":"Booking Confirmed",description:oa.isPending?"Your booking request has been submitted and is awaiting confirmation from the host.":"Your booking has been successfully scheduled."})}catch(vt){r({title:"Booking Failed",description:vt.message||"Something went wrong. Please try again.",variant:"destructive"})}finally{_e(!1)}},Be=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],lt=()=>{const be=Ps(f),it=Av(f),vt=Kve({start:be,end:it}),In=zye(be);return[...Array(In).fill(null),...vt]},ct=()=>{h(a0e(f,1))},Y=()=>{h(Wa(f,1))},J=()=>{C&&g("contact")},le=()=>{g("select")};if(x)return s.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-50",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary mx-auto"}),s.jsx("p",{className:"mt-4 text-gray-600",children:"Loading booking information..."})]})});if(j)return s.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-50",children:s.jsx(X,{className:"w-full max-w-md mx-4",children:s.jsx(te,{className:"pt-6",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("svg",{className:"w-8 h-8 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),s.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Booking Unavailable"}),s.jsx("p",{className:"text-gray-600 mb-6",children:j}),s.jsx(D,{variant:"outline",onClick:()=>a("/"),children:"Return to Home"})]})})})});if(U){const be=(d==null?void 0:d.brandColor)||void 0,it=(de==null?void 0:de.confirmationMessage)||(d==null?void 0:d.confirmationMessage),vt=(de==null?void 0:de.confirmationCta)||(d==null?void 0:d.confirmationCta),In=de==null?void 0:de.redirectUrl;return s.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-50",children:s.jsx(X,{className:"w-full max-w-md mx-4",children:s.jsx(te,{className:"pt-6",children:s.jsxs("div",{className:"text-center",children:[(d==null?void 0:d.brandLogo)&&s.jsx("img",{src:d.brandLogo,alt:"Logo",className:"h-10 mx-auto mb-4 object-contain"}),s.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4",style:{backgroundColor:de!=null&&de.isPending?be?`${be}20`:"#fef3c7":be?`${be}20`:"#dcfce7"},children:de!=null&&de.isPending?s.jsx(dr,{className:"w-8 h-8",style:{color:be||"#d97706"}}):s.jsx(un,{className:"w-8 h-8",style:{color:be||"#16a34a"}}
786)}),s.jsx("h2",{className:"text-xl font-semibold mb-2",children:de!=null&&de.isPending?"Booking Request Submitted":"Booking Confirmed!"}),s.jsx("p",{className:"text-gray-600 mb-4",children:de!=null&&de.isPending?"Your booking request has been submitted. The host will review and confirm your booking shortly.":it||"Your meeting has been scheduled successfully."}),In&&s.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"Redirecting you in a few seconds..."}),s.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 text-left mb-6",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{className:"text-sm text-gray-500",children:"Meeting"}),s.jsx("p",{className:"font-medium",children:d==null?void 0:d.title})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{className:"text-sm text-gray-500",children:"Date & Time"}),s.jsx("p",{className:"font-medium",children:C&&sf(C.start,l,"EEEE, MMMM d, yyyy")}),s.jsx("p",{className:"text-sm",children:C&&`${sf(C.start,l,"h:mm a")} - ${sf(C.end,l,"h:mm a")}`})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500",children:"With"}),s.jsx("p",{className:"font-medium",children:d!=null&&d.isTeamBooking?d.teamName:d==null?void 0:d.ownerName}),(d==null?void 0:d.isCollective)&&(((he=d==null?void 0:d.collectiveMemberIds)==null?void 0:he.length)??0)>0&&s.jsxs("p",{className:"text-xs text-gray-400 mt-1",children:["Team meeting with ",(((Me=d.collectiveMemberIds)==null?void 0:Me.length)||0)+((Ne=d.rotatingMemberIds)!=null&&Ne.length?1:0)," attendees"]})]}),(de==null?void 0:de.meetingUrl)&&s.jsxs("div",{className:"mt-3",children:[s.jsx("p",{className:"text-sm text-gray-500",children:"Meeting Link"}),s.jsx("a",{href:de.meetingUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-medium text-blue-600 hover:underline break-all",children:de.meetingUrl})]}),(de==null?void 0:de.paymentStatus)==="paid"&&s.jsxs("div",{className:"mt-3",children:[s.jsx("p",{className:"text-sm text-gray-500",children:"Payment"}),s.jsx("p",{className:"text-sm font-medium text-green-600",children:"Payment confirmed"})]})]}),s.jsxs("div",{className:"flex gap-3 justify-center flex-wrap",children:[vt&&s.jsx(D,{style:be?{backgroundColor:be}:void 0,onClick:()=>window.open(vt.url,"_blank"),children:vt.label}),s.jsx(D,{variant:"outline",onClick:()=>a("/"),children:"Return to Home"}),!(d!=null&&d.isOneOff)&&s.jsx(D,{variant:"outline",onClick:()=>window.location.reload(),children:"Book Another Time"})]}),!(d!=null&&d.removeBranding)&&s.jsx("p",{className:"text-xs text-gray-400 mt-6",children:"Powered by SmartScheduler"})]})})})})}const Le=(d==null?void 0:d.brandColor)||void 0,L=Le?{"--brand-color":Le}:{};return s.jsxs("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",style:L,children:[((Re=d==null?void 0:d.outOfOffice)==null?void 0:Re.isOutOfOffice)&&s.jsx("div",{className:"w-full max-w-6xl mb-4",children:s.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 flex items-start gap-3",children:[s.jsx(C0,{className:"w-5 h-5 text-amber-500 mt-0.5 flex-shrink-0"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-amber-800",children:d.outOfOffice.message}),d.outOfOffice.redirectSlug&&s.jsxs("p",{className:"text-sm text-amber-700 mt-1",children:["You can book with"," ",d.outOfOffice.redirectUserName||"a teammate"," ","instead:"," ",s.jsx("a",{href:`/${t}/booking/${d.outOfOffice.redirectSlug}`,className:"underline font-medium",children:"Book here"})]})]})]})}),s.jsxs(X,{className:"w-full max-w-6xl shadow-lg",children:[s.jsx(te,{className:"p-0",children:m==="select"?s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:[s.jsxs("div",{className:"p-6 lg:p-8 border-b md:border-b-0 md:border-r bg-gray-50/50",children:[(d==null?void 0:d.brandLogo)&&s.jsx("div",{className:"mb-4",children:s.jsx("img",{src:d.brandLogo,alt:"Logo",className:"h-8 object-contain"})}),s.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[s.jsx("div",{className:"w-14 h-14 rounded-full overflow-hidden border-2 border-primary/30 flex-shrink-0",children:d!=null&&d.ownerProfilePicture?s.jsx("img",{src:d.ownerProfilePicture,alt:d.ownerName||"Meeting host",className:"h-full w-full object-cover"}):d!=null&&d.ownerName?s.jsx("div",{className:"h-full w-full flex items-center justify-center text-white font-bold text-xl",style:{backgroundColor:(d==null?void 0:d.ownerAvatarColor)||"#0d9488"},children:d.ownerName.charAt(0)}):s.jsx("div",{className:"bg-gray-200 h-full w-full flex items-center justify-center",children:s.jsx(yl,{className:"w-7 h-7 text-gray-400"})})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-gray-900",children:d!=null&&d.isTeamBooking?d.teamName:d==null?void 0:d.ownerName}),s.jsxs("div",{className:"flex items-center text-primary text-sm",children:[s.jsx(dr,{className:"w-4 h-4 mr-1"}),d==null?void 0:d.duration," Minutes Meeting"]}),((d==null?void 0:d.maxSeats)??0)>0&&s.jsxs("div",{className:"flex items-center text-gray-500 text-sm mt-0.5",children:[s.jsx(yl,{className:"w-3.5 h-3.5 mr-1"}),"Group event (",d==null?void 0:d.maxSeats," seats per slot)"]}),(d==null?void 0:d.requiresConfirmation)&&s.jsx("div",{className:"flex items-center text-amber-600 text-sm mt-0.5",children:"Requires host confirmation"})]})]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-3",children:d==null?void 0:d.title}),(d==null?void 0:d.description)&&s.jsxs("div",{className:"flex items-start text-gray-600 text-sm mb-6",children:[s.jsx(bW,{className:"w-4 h-4 mr-2 mt
786-0.5 flex-shrink-0"}),s.jsx("p",{children:d.description})]}),(d==null?void 0:d.meetingType)&&d.meetingType!=="in-person"&&s.jsxs("div",{className:"flex items-center text-gray-600 text-sm mb-2",children:[s.jsx(ma,{className:"w-4 h-4 mr-2 flex-shrink-0"}),s.jsxs("span",{children:[d.meetingType==="zoom"&&"Zoom Meeting",d.meetingType==="google-meet"&&"Google Meet",d.meetingType==="custom"&&"Video Conference"]})]}),(d==null?void 0:d.meetingType)==="in-person"&&(d==null?void 0:d.location)&&s.jsxs("div",{className:"flex items-center text-gray-600 text-sm mb-2",children:[s.jsx(Oo,{className:"w-4 h-4 mr-2 flex-shrink-0"}),s.jsx("span",{children:d.location})]}),(d==null?void 0:d.meetingType)==="custom"&&(d==null?void 0:d.meetingUrl)&&s.jsxs("div",{className:"flex items-center text-gray-600 text-sm mb-2",children:[s.jsx(Ra,{className:"w-4 h-4 mr-2 flex-shrink-0"}),s.jsx("a",{href:d.meetingUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline truncate",children:d.meetingUrl})]}),s.jsx("div",{className:"mt-6 pt-4 border-t",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Yc,{className:"w-4 h-4 text-primary"}),i&&i.length>0?s.jsxs(Xe,{value:l,onValueChange:be=>c(be),children:[s.jsx(Qe,{className:"flex-1 border-none shadow-none p-0 h-auto text-sm",children:s.jsx(Je,{placeholder:"Select time zone"})}),s.jsx(Ze,{children:i.map(be=>s.jsx(Z,{value:be.id,children:be.name},be.id))})]}):s.jsx("span",{className:"text-sm text-gray-600",children:l})]})})]}),s.jsxs("div",{className:"p-6 lg:p-8 border-b lg:border-b-0 lg:border-r",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(Gt,{className:"w-5 h-5 text-primary"}),s.jsx("h3",{className:"font-semibold text-gray-700",children:"Select a Date"})]}),s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h4",{className:"text-lg font-semibold text-primary",children:pt(f,"MMMM yyyy")}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx("button",{onClick:ct,className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:s.jsx(as,{className:"w-5 h-5 text-gray-600"})}),s.jsx("button",{onClick:Y,className:"p-2 hover:bg-gray-100 rounded-full transition-colors",children:s.jsx(Wi,{className:"w-5 h-5 text-gray-600"})})]})]}),s.jsx("div",{className:"grid grid-cols-7 mb-2",children:Be.map(be=>s.jsx("div",{className:"text-center text-sm font-medium text-gray-500 py-2",children:be},be))}),s.jsx("div",{className:"grid grid-cols-7 gap-1",children:lt().map((be,it)=>{if(!be)return s.jsx("div",{className:"aspect-square"},`empty-${it}`);const vt=B(be)&&!wu(be,Hs(new Date)),In=N&&Zn(be,N),Un=wu(be,Hs(new Date));return s.jsx("button",{onClick:()=>vt&&S(be),disabled:!vt,className:` 787 aspect-square flex items-center justify-center text-sm font-medium rounded-full 788 transition-colors 789 ${In?"bg-primary text-white":vt?"text-primary hover:bg-primary/10 border border-primary":Un?"text-gray-300 cursor-not-allowed":"text-gray-400 cursor-not-allowed"} 790 `,children:pt(be,"d")},be.toISOString())})})]}),s.jsxs("div",{className:"p-6 lg:p-8 flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(dr,{className:"w-5 h-5 text-primary"}),s.jsx("h3",{className:"font-semibold text-gray-700",children:"Select a Time"})]}),N?s.jsxs(s.Fragment,{children:[s.jsx("h4",{className:"text-lg font-semibold text-primary mb-4",children:pt(N,"EEEE, MMMM do")}),s.jsx("div",{className:"flex-1 overflow-y-auto max-h-[320px] space-y-2 mb-6",children:b?s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-primary"})}):k.length>0?k.map((be,it)=>s.jsx("button",{onClick:()=>E(be),className:` 791 w-full py-3 px-4 rounded-lg border text-center transition-colors font-medium 792 ${C&&C.start.toISOString()===be.start.toISOString()?"border-primary bg-primary/5 text-primary":"border-gray-200 hover:border-primary hover:text-primary"} 793 `,children:me(be)},it)):s.jsxs("div",{className:"text-center py-12 text-gray-500",children:[s.jsx(Gt,{className:"w-10 h-10 mx-auto mb-3 text-gray-300"}),s.jsx("p",{className:"font-medium",children:"No available times"}),s.jsx("p",{className:"text-sm",children:"Please select another date"})]})}),s.jsxs(D,{className:"w-full",size:"lg",disabled:!C,onClick:J,children:["Continue",s.jsx(Wi,{className:"w-4 h-4 ml-2"})]})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Gt,{className:"w-12 h-12 mx-auto mb-3 text-gray-300"}),s.jsx("p",{className:"font-medium",children:"Select a date"}),s.jsx("p",{className:"text-sm",children:"to view available times"})]})})]})]}):s.jsxs("div",{className:"p-6 lg:p-8 max-w-lg mx-auto",children:[s.jsxs("button",{onClick:le,className:"flex items-center gap-2 text-gray-600 hover:text-gray-900 mb-6 transition-colors",children:[s.jsx(voe,{className:"w-4 h-4"}),s.jsx("span",{children:"Back to calendar"})]}),s.jsxs("div",{className:"bg-primary/5 rounded-lg p-4 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-full overflow-hidden flex-shrink-0",children:d!=null&&d.ownerProfilePicture?s.jsx("img",{src:d.ownerProfilePicture,alt:d.ownerName||"Meeting host",className:"h-full w-full object-cover"}):d!=null&&d.ownerName?s.jsx("div",{className:"h-full w-full flex items-center justify-center text-white font-bold",style:{backgroundColor:(d==null?void 0:d.ownerAvatarColor)||"#0d9488"},children:d.ownerName.charAt(0)}):s.jsx("div",{className:"bg-gray-200 h-full w-full flex items-center justify-center",children:s.jsx(yl,{className:"w-5 h-5 text-gray-400"})})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-gray-900",children:d==null?void 0:d.title}),s.jsxs("p",{className:"text-sm text-gray-600",children:["with ",d!=null&&d.isTeamBooking?d.teamName:d==null?void 0:d.ownerName]})]})]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-700 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Gt,{className:"w-4 h-4 text-primary"}),C&&sf(C.start,l,"EEE, MMM d")]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(dr,{className:"w-4 h-4 text-primary"}),C&&me(C)]}),s.jsxs("div",{className:"text-gray-500",children:[d==null?void 0:d.duration," min"]}),(d==null?void 0:d.meetingType)&&d.meetingType!=="in-person"&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(ma,{className:"w-4 h-4 text-primary"}),d.meetingType==="zoom"&&"Zoom",d.meetingType==="google-meet"&&"Google Meet",d.meetingType==="custom"&&"Video"]}),(d==null?void 0:d.meetingType)==="in-person"&&(d==null?void 0:d.location)&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Oo,{className:"w-4 h-4 text-primary"}),s.jsx("span",{className:"truncate max-w-[150px]",children:d.location})]})]})]}),s.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-6",children:"Enter your details"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"name",className:"text-gray-700",children:"Full Name *"}),s.jsx(ie,{id:"name",value:P,onChange:be=>_(be.target.value),placeholder:"Your name",className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"email",className:"text-gray-700",children:"Email Address *"}),s.jsx(ie,{id:"email",type:"email",value:I,onChange:be=>F(be.target.value),placeholder:"[email protected]",className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"phone",className:"text-gray-700",children:"Phone Number (optional)"}),s.jsx(ie,{id:"phone",type:"tel",value:H,onChange:be=>W(be.target.value),placeholder:"(123) 456-7890",className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(ee,{htmlFor:"notes",className:"text-gray-700",children:"Additional Notes (optional)"}),s.jsx(Es,{id:"notes",value:z,onChange:be=>R(be.target.value),placeholder:"Add any additional information...",rows:3,className:"mt-1"})]}),(d==null?void 0:d.allowRecurring)&&s.jsxs("div",{className:"border rounded-lg p-3 bg-gray-50",children:[s.jsxs(ee,{className:"text-gray-700 flex items-center gap-1 mb-2",children:[s.jsx(RE,{className:"w-3.5 h-3.5"}),"Repeat this booking"]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsxs("select",{value:G,onChange:be=>K(be.target.value),className:"w-full border rounded-md px-3 py-2 text-sm",children:[s.jsx("option",{value:"",children:"Don't repeat"}),(((or=d==null?void 0:d.recurringOptions)==null?void 0:or.frequencies)||["weekly"]).map(be=>s.jsx("option",{value:be,children:be==="daily"?"Daily":be==="weekly"?"Weekly":be==="biweekly"?"Every 2 weeks":"Monthly"},be))]}),G&&s.jsx("select",{value:je,onChange:be=>ae(parseInt(be.target.value)),className:"w-full border rounded-md px-3 py-2 text-sm",children:Array.from({length:Math.min(((Jr=d==null?void 0:d.recurringOptions)==null?void 0:Jr.maxOccurrences)||12,52)-1},(be,it)=>it+2).map(be=>s.jsxs("option",{value:be,children:[be," times"]},be))})]})]}),(d==null?void 0:d.customQuestions)&&d.customQuestions.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Oi,{className:"my-2"}),d.customQuestions.map(be=>s.jsxs("div",{children:[s.jsxs(ee,{className:"text-gray-700",children:[be.label,be.required?" *":" (optional)"]}),be.type==="text"&&s.jsx(ie,{value:V[be.id]||"",onChange:it=>
793se(vt=>({...vt,[be.id]:it.target.value})),placeholder:`Enter ${be.label.toLowerCase()}`,className:"mt-1"}),be.type==="textarea"&&s.jsx(Es,{value:V[be.id]||"",onChange:it=>se(vt=>({...vt,[be.id]:it.target.value})),placeholder:`Enter ${be.label.toLowerCase()}`,rows:3,className:"mt-1"}),be.type==="phone"&&s.jsx(ie,{type:"tel",value:V[be.id]||"",onChange:it=>se(vt=>({...vt,[be.id]:it.target.value})),placeholder:"(123) 456-7890",className:"mt-1"}),be.type==="dropdown"&&s.jsxs(Xe,{value:V[be.id]||"",onValueChange:it=>se(vt=>({...vt,[be.id]:it})),children:[s.jsx(Qe,{className:"mt-1",children:s.jsx(Je,{placeholder:`Select ${be.label.toLowerCase()}`})}),s.jsx(Ze,{children:be.options.map(it=>s.jsx(Z,{value:it,children:it},it))})]}),be.type==="radio"&&s.jsx($O,{value:V[be.id]||"",onValueChange:it=>se(vt=>({...vt,[be.id]:it})),className:"mt-2 space-y-2",children:be.options.map(it=>s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Nj,{value:it,id:`q${be.id}-${it}`}),s.jsx(ee,{htmlFor:`q${be.id}-${it}`,className:"font-normal",children:it})]},it))}),be.type==="checkbox"&&s.jsx("div",{className:"mt-2 space-y-2",children:be.options.map(it=>{const vt=V[be.id]||[];return s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Gn,{id:`q${be.id}-${it}`,checked:vt.includes(it),onCheckedChange:In=>{const Un=In?[...vt,it]:vt.filter(vs=>vs!==it);se(vs=>({...vs,[be.id]:Un}))}}),s.jsx(ee,{htmlFor:`q${be.id}-${it}`,className:"font-normal",children:it})]},it)})})]},be.id))]})]}),(d==null?void 0:d.requirePayment)&&(d==null?void 0:d.price)&&s.jsxs("div",{className:"mt-4 p-3 bg-blue-50 rounded-lg border border-blue-200",children:[s.jsxs("p",{className:"text-sm font-medium text-blue-800",children:["Payment required: ",(d.price/100).toFixed(2)," ",(d.currency||"USD").toUpperCase()]}),s.jsx("p",{className:"text-xs text-blue-600 mt-1",children:"Payment will be processed via Stripe when you confirm"})]}),s.jsx(D,{className:"w-full mt-6",size:"lg",onClick:ne,disabled:oe||!P||!I,children:oe?"Scheduling...":d!=null&&d.requirePayment?"Confirm & Pay":"Schedule Meeting"})]})}),!(d!=null&&d.removeBranding)&&s.jsx(ta,{className:"justify-center py-3 border-t",children:s.jsx("p",{className:"text-xs text-gray-400",children:"Powered by SmartScheduler"})})]})]})}function bQe({slug:e}){const{toast:t}=Qt(),[r,n]=p.useState(null),[a,i]=p.useState(!0),[o,l]=p.useState(null),[c,d]=p.useState(""),[u,f]=p.useState(""),[h,m]=p.useState({}),[g,x]=p.useState(!1),[v,b]=p.useState(!1);p.useEffect(()=>{async function C(){try{const E=await fetch(`/api/public/poll/${e}`);if(!E.ok)throw new Error("Poll not found");const P=await E.json();n(P);const _={};P.options.forEach(I=>{_[I.id]="no"}),m(_)}catch{l("This poll could not be found.")}finally{i(!1)}}C()},[e]);const y=C=>{m(E=>{const P=E[C],_=P==="yes"?"if_needed":P==="if_needed"?"no":"yes";return{...E,[C]:_}})},j=async()=>{if(!c.trim()||!u.trim()){t({title:"Required",description:"Please enter your name and email.",variant:"destructive"});return}const C=Object.entries(h).filter(([E,P])=>P!=="no").map(([E,P])=>({optionId:parseInt(E),vote:P}));if(C.length===0){t({title:"No votes",description:"Please select at least one time option.",variant:"destructive"});return}x(!0);try{const E=await fetch(`/api/public/poll/${e}/vote`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({voterName:c,voterEmail:u,votes:C})});if(!E.ok){const _=await E.json();throw new Error(_.message||"Failed to submit votes")}b(!0),t({title:"Votes Submitted",description:"Your availability has been recorded."});const P=await fetch(`/api/public/poll/${e}`);P.ok&&n(await P.json())}catch(E){t({title:"Error",description:E.message,variant:"destructive"})}finally{x(!1)}},w=C=>{switch(C){case"yes":return"bg-green-500 text-white border-green-500";case"if_needed":return"bg-yellow-400 text-white border-yellow-400";default:return"bg-white text-gray-600 border-gray-200 hover:border-gray-400"}},N=C=>{switch(C){case"yes":return"Yes";case"if_needed":return"If needed";default:return"No"}};if(a)return s.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-50",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary"})});if(o||!r)return s.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-50",children:s.jsx(X,{className:"w-full max-w-md mx-4",children:s.jsxs(te,{className:"pt-6 text-center",children:[s.jsx(jh,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),s.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Poll Not Found"}),s.jsx("p",{className:"text-gray-600",children:o})]})})});const S=r.status!=="open",k=r.deadline?new Date(r.deadline)<new Date:!1,T=!S&&!k;return s.jsx("div",{className:"min-h-screen bg-gray-50 py-8 px-4",children:s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsx(X,{className:"mb-6",children:s.jsxs(te,{className:"pt-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(jh,{className:"w-6 h-6 text-primary"}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold",children:r.title}),s.jsxs("p",{className:"text-sm text-gray-500",children:["by ",r.ownerName]})]}),s.jsx("span",{className:`ml-auto text-xs px-2 py-0.5 rounded-full font-medium ${S?"bg-gray-100 text-gray-600":"bg-green-100 text-green-700"}`,children:r.status})]}),r.description&&s.jsx("p",{className:"text-gray-600 mb-3",children:r.description}),s.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-gray-500",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(dr,{className:"w-4 h-4"}),r.duration," min"]}),r.location&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Oo,{className:"w-4 h-4"}),r.location]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(ir,{className:"w-4 h-4"}),r.uniqueVoters," voter",r.uniqueVoters!==1?"s":""]})]})]})}),s.jsx("div",{className:"space-y-3 mb-6",children:r.options.map(C=>{const E=wf(C.startTime),P=r.selectedOptionId===C.id;return s.jsx(X,{className:P?"ring-2 ring-primary":"",children:s.jsxs(te,{className:"py-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"font-semibold",children:pt(E,"EEEE, MMMM d, yyyy")}),s.jsxs("p",{className:"text-sm text-gray-600",children:[pt(E,"h:mm a")," - ",pt(wf(C.endTime),"h:mm a")]}),P&&s.jsxs("span",{className:"text-xs text-primary font-medium flex items-center gap-1 mt-1",children:[s.jsx(un,{className:"w-3 h-3"})," Selected time"]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"text-center",children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"inline-block w-3 h-3 rounded-full bg-green-500"}),s.jsx("span",{className:"text-sm font-medium",children:C.yesCount})]})}),C.ifNeededCount>0&&s.jsx("div",{className:"text-center",children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"inline-block w-3 h-3 rounded-full bg-yellow-400"}),s.jsx("span",{className:"text-sm font-medium",children:C.ifNeededCount})]})}),T&&!v&&s.jsx("button",{onClick:()=>y(C.id),className:`px-3 py-1.5 rounded-full border text-sm font-medium transition-colors ${w(h[C.id]||"no")}`,children:N(h[C.id]||"no")})]})]}),C.voters.length>0&&s.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:C.voters.map((_,I)=>s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${_.vote==="yes"?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-700"}`,children:_.name},I))})]})},C.id)})}),T&&!v&&s.jsxs(X,{children:[s.jsxs(te,{className:"pt-6 space-y-4",children:[s.jsx("h3",{className:"font-semibold",children:"Your Information"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Name *"}),s.jsx(ie,{value:c,onChange:C=>d(C.target.value),placeholder:"Your name"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Email *"}),s.jsx(ie,{type:"email",value:u,onChange:C=>f(C.target.value),placeholder:"[email protected]"})]})]}),s.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"inline-block w-3 h-3 rounded-full bg-green-500"})," Yes"]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"inline-block w-3 h-3 rounded-full bg-yellow-400"})," If needed"]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"inline-block w-3 h-3 rounded-full bg-gray-200"})," No"]}),s.jsx("span",{className:"text-gray-400",children:"Click time options to cycle through votes"})]})]}),s.jsx(ta,{children:s.jsx(D,{className:"w-full",onClick:j,disabled:g,children:g?"Submitting...":"Submit Votes"})})]}),v&&s.jsx(X,{children:s.jsxs(te,{className:"pt-6 text-center",children:[s.jsx(un,{className:"w-12 h-12 text-green-500 mx-auto mb-3"}),s.jsx("h3",{className:"font-semibold text-lg mb-1",children:"Votes Submitted!"}
793),s.jsx("p",{className:"text-gray-600",children:"Thank you for voting. The organizer will select the best time."}),s.jsx(D,{variant:"outline",className:"mt-4",onClick:()=>{b(!1)},children:"Update My Votes"})]})}),S&&s.jsx(X,{children:s.jsx(te,{className:"pt-6 text-center",children:s.jsx("p",{className:"text-gray-600",children:"This poll is closed and no longer accepting votes."})})})]})})}function jQe({slug:e}){const[t,r]=p.useState(null),[n,a]=p.useState(!0),[i,o]=p.useState(null),[l,c]=p.useState({}),[d,u]=p.useState(""),[f,h]=p.useState(""),[m,g]=p.useState(!1),[x,v]=p.useState(null);p.useEffect(()=>{fetch(`/api/public/routing/form/${e}`).then(j=>{if(!j.ok)throw new Error("Form not found");return j.json()}).then(j=>{r(j),a(!1)}).catch(j=>{o(j.message),a(!1)})},[e]);const b=async()=>{if(t){for(const j of t.questions)if(j.isRequired&&!l[String(j.id)]){o(`Please answer: "${j.label}"`);return}g(!0),o(null);try{const j=await fetch(`/api/public/routing/form/${e}/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answers:l,email:d,name:f})});if(!j.ok)throw new Error("Submission failed");const w=await j.json();v(w),w.action==="route_to_url"&&w.url&&setTimeout(()=>{window.location.href=w.url},2e3)}catch(j){o(j.message)}finally{g(!1)}}},y=(j,w)=>{c(N=>({...N,[String(j)]:w}))};return n?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-50",children:s.jsx("p",{className:"text-neutral-500",children:"Loading form..."})}):i&&!t?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-50",children:s.jsx(X,{className:"max-w-md w-full mx-4",children:s.jsxs(te,{className:"pt-6 text-center",children:[s.jsx(yh,{className:"h-12 w-12 text-neutral-300 mx-auto mb-4"}),s.jsx("h2",{className:"text-lg font-semibold text-neutral-600",children:"Form Not Found"}),s.jsx("p",{className:"text-neutral-500 mt-2",children:"This routing form doesn't exist or has been deactivated."})]})})}):x?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-neutral-50",children:s.jsx(X,{className:"max-w-md w-full mx-4",children:s.jsxs(te,{className:"pt-6 text-center",children:[x.action==="route_to_booking"&&s.jsxs(s.Fragment,{children:[s.jsx(Gt,{className:"h-12 w-12 text-primary mx-auto mb-4"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Schedule Your Meeting"}),s.jsxs("p",{className:"text-neutral-500 mt-2 mb-4",children:["Based on your answers, we've matched you with: ",s.jsx("strong",{children:x.bookingLinkTitle}),x.ownerName&&` with ${x.ownerName}`]}),s.jsx(D,{asChild:!0,children:s.jsxs("a",{href:`/booking/${x.bookingLinkSlug}`,children:[s.jsx(Gw,{className:"h-4 w-4 mr-2"})," Book Now"]})})]}),x.action==="route_to_url"&&s.jsxs(s.Fragment,{children:[s.jsx(Zr,{className:"h-12 w-12 text-primary mx-auto mb-4"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Redirecting..."}),s.jsx("p",{className:"text-neutral-500 mt-2 mb-4",children:"You'll be redirected shortly. If not, click below."}),s.jsx(D,{asChild:!0,children:s.jsxs("a",{href:x.url,target:"_blank",rel:"noopener noreferrer",children:[s.jsx(Zr,{className:"h-4 w-4 mr-2"}
793)," Go Now"]})})]}),x.action==="show_message"&&s.jsxs(s.Fragment,{children:[s.jsx(Xd,{className:"h-12 w-12 text-primary mx-auto mb-4"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Thank You"}),s.jsx("p",{className:"text-neutral-600 mt-2",children:x.message})]})]})})}):t?s.jsx("div",{className:"min-h-screen bg-neutral-50 py-8 px-4",children:s.jsx("div",{className:"max-w-lg mx-auto",children:s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:t.title}),t.description&&s.jsx(ye,{children:t.description}),s.jsxs("p",{className:"text-xs text-neutral-400 mt-1",children:["by ",t.ownerName]})]}),s.jsx(te,{children:s.jsxs("div",{className:"space-y-5",children:[t.questions.sort((j,w)=>j.orderIndex-w.orderIndex).map(j=>s.jsxs("div",{children:[s.jsxs(ee,{className:"text-sm font-medium",children:[j.label,j.isRequired&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),j.type==="text"&&s.jsx(ie,{className:"mt-1",placeholder:"Type your answer...",value:l[String(j.id)]||"",onChange:w=>y(j.id,w.target.value)}),j.type==="select"&&s.jsxs(Xe,{value:l[String(j.id)]||"",onValueChange:w=>y(j.id,w),children:[s.jsx(Qe,{className:"mt-1",children:s.jsx(Je,{placeholder:"Select an option"})}),s.jsx(Ze,{children:(j.options||[]).map(w=>s.jsx(Z,{value:w,children:w},w))})]}),j.type==="radio"&&s.jsx("div",{className:"mt-2 space-y-2",children:(j.options||[]).map(w=>s.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[s.jsx("input",{type:"radio",name:`q-${j.id}`,value:w,checked:l[String(j.id)]===w,onChange:()=>y(j.id,w),className:"accent-primary"}),s.jsx("span",{className:"text-sm",children:w})]},w))}),j.type==="checkbox"&&s.jsx("div",{className:"mt-2 space-y-2",children:(j.options||[]).map(w=>{const S=(l[String(j.id)]||"").split(",").filter(Boolean),k=S.includes(w);return s.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:k,onChange:()=>{const T=k?S.filter(C=>C!==w):[...S,w];y(j.id,T.join(","))},className:"accent-primary"}),s.jsx("span",{className:"text-sm",children:w})]},w)})})]},j.id)),s.jsxs("div",{className:"border-t pt-4 space-y-3",children:[s.jsxs("div",{children:[s.jsx(ee,{className:"text-sm",children:"Your Name (optional)"}),s.jsx(ie,{className:"mt-1",placeholder:"John Doe",value:f,onChange:j=>h(j.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{className:"text-sm",children:"Your Email (optional)"}),s.jsx(ie,{className:"mt-1",placeholder:"[email protected]",value:d,onChange:j=>u(j.target.value)})]})]}),i&&s.jsx("p",{className:"text-sm text-red-500",children:i}),s.jsx(D,{className:"w-full",onClick:b,disabled:m,children:m?"Submitting...":"Submit"})]})})]})})}):null}function wQe({userPath:e}){const[t,r]=p.useState(null),{data:n=[],isLoading:a,error:i}=ut({queryKey:[`/api/public/${e}/booking-links`],queryFn:async()=>{const u=await fetch(`/api/public/${e}/booking-links`);if(u.status===307){const{redirectUrl:h}=await u.json();if(h)return window.location.replace(h),[]}if(!u.ok)throw new Error("Failed to fetch booking links");const f=await u.json();return f.user&&r(f.user),f.bookingLinks||[]}}),o=u=>{if(u>=60){const f=Math.floor(u/60),h=u%60;return h>0?`${f} hr ${h} min`:`${f} hr`}return`${u} min`},l=u=>{var x;if(!u.availability||typeof u.availability!="object")return"Weekdays, 9:00 AM - 5:00 PM";const f=u.availability,h={0:"Sun",1:"Mon",2:"Tue",3:"Wed",4:"Thu",5:"Fri",6:"Sat"},m=((x=f.days)==null?void 0:x.map(v=>h[v]||v).join(", "))||"Weekdays",g=f.hours?`${f.hours.start} - ${f.hours.end}`:"9:00 AM - 5:00 PM";return`${m}, ${g}`},c=u=>u.meetingType==="zoom"?s.jsx(ma,{className:"h-4 w-4"}):u.meetingType==="custom"?s.jsx(Zr,{className:"h-4 w-4"}):s.jsx(Oo,{className:"h-4 w-4"}),d=u=>u.meetingType==="zoom"?"Zoom Meeting":u.meetingType==="custom"?"Custom Meeting URL":u.location?u.location:"In-person meeting";return a?s.jsx("div",{className:"min-h-screen bg-neutral-50 dark:bg-slate-900 flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}
793),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:"Loading..."})]})}):i||!t?s.jsx("div",{className:"min-h-screen bg-neutral-50 dark:bg-slate-900 flex items-center justify-center",children:s.jsxs("div",{className:"text-center max-w-md px-4",children:[s.jsx("h1",{className:"text-2xl font-bold text-neutral-900 dark:text-slate-100 mb-2",children:"User Not Found"}),s.jsxs("p",{className:"text-neutral-600 dark:text-slate-400 mb-6",children:[`We couldn't find a user with the path "`,e,'". Please check the URL and try again.']}),s.jsx(D,{onClick:()=>window.location.href="/",children:"Go to Homepage"})]})}):n.length===0?s.jsx("div",{className:"min-h-screen bg-neutral-50 dark:bg-slate-900",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-16",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx(yu,{className:"h-24 w-24 mx-auto mb-4",children:t.profilePicture?s.jsx(ix,{src:t.profilePicture,alt:t.displayName||t.username}):s.jsx(bu,{style:{backgroundColor:t.avatarColor||"#3f51b5"},className:"text-white text-2xl",children:T0(t.displayName||t.username)})}),s.jsx("h1",{className:"text-3xl font-bold text-neutral-900 dark:text-slate-100 mb-2",children:t.displayName||t.username}
793),t.bio&&s.jsx("p",{className:"text-neutral-600 dark:text-slate-400 max-w-2xl mx-auto",children:t.bio})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 rounded-full bg-neutral-200 dark:bg-slate-700 flex items-center justify-center mx-auto mb-4",children:s.jsx(Gt,{className:"h-8 w-8 text-neutral-400 dark:text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-slate-100 mb-2",children:"No Available Event Types"}),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:"This user hasn't set up any booking links yet."})]})]})}):s.jsx("div",{className:"min-h-screen bg-neutral-50 dark:bg-slate-900",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-16",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx(yu,{className:"h-24 w-24 mx-auto mb-4",children:t.profilePicture?s.jsx(ix,{src:t.profilePicture,alt:t.displayName||t.username}):s.jsx(bu,{style:{backgroundColor:t.avatarColor||"#3f51b5"},className:"text-white text-2xl",children:T0(t.displayName||t.username)})}),s.jsx("h1",{className:"text-3xl font-bold text-neutral-900 dark:text-slate-100 mb-2",children:t.displayName||t.username}
793),t.bio&&s.jsx("p",{className:"text-neutral-600 dark:text-slate-400 max-w-2xl mx-auto",children:t.bio})]}),s.jsxs("div",{className:"mb-8",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-slate-100 mb-6",children:"Select a meeting type"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:n.map(u=>s.jsxs(X,{className:"hover:shadow-lg transition-shadow cursor-pointer group",onClick:()=>{window.location.href=`/${e}/booking/${u.slug}`},children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center justify-between",children:[s.jsx("span",{children:u.title}),s.jsx(Zr,{className:"h-4 w-4 opacity-0 group-hover:opacity-100 transition-opacity"})]}),u.description&&s.jsx(ye,{className:"line-clamp-2",children:u.description})]}),s.jsxs(te,{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center text-sm text-neutral-600 dark:text-slate-400",children:[s.jsx(dr,{className:"h-4 w-4 mr-2"}),s.jsx("span",{children:o(u.duration)})]}),s.jsxs("div",{className:"flex items-center text-sm text-neutral-600 dar
793k:text-slate-400",children:[c(u),s.jsx("span",{className:"ml-2",children:d(u)})]}),s.jsxs("div",{className:"flex items-center text-sm text-neutral-600 dark:text-slate-400",children:[s.jsx(Gt,{className:"h-4 w-4 mr-2"}),s.jsx("span",{className:"text-xs",children:l(u)})]})]})]},u.id))})]}),s.jsx("div",{className:"text-center text-sm text-neutral-500 dark:text-slate-500 pt-8 border-t border-neutral-200 dark:border-slate-700",children:s.jsxs("p",{children:["Powered by"," ",s.jsx("a",{href:"/",className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",children:"SmartScheduler"})]})})]})})}function c5({teamSlug:e,orgSlug:t}){const[r,n]=p.useState(null),[a,i]=p.useState(null),o=t?`/api/public/org/${t}/${e}/booking-links`:`/api/public/team/${e}/booking-links`,{data:l=[],isLoading:c,error:d}=ut({queryKey:[o],queryFn:async()=>{const x=await fetch(o);if(!x.ok)throw new Error("Failed to fetch booking links");const v=await x.json();return v.team&&n(v.team),v.organization&&i(v.organization),v.bookingLinks||[]}}),u=x=>{if(x>=60){const v=Math.floor(x/60),b=x%60;return b>0?`${v} hr ${b} min`:`${v} hr`}return`${x} min`},f=x=>{var w;if(!x.availability||typeof x.availability!="object")return"Weekdays, 9:00 AM - 5:00 PM";const v=x.availability,b={0:"Sun",1:"Mon",2:"Tue",3:"Wed",4:"Thu",5:"Fri",6:"Sat"},y=((w=v.days)==null?void 0:w.map(N=>b[N]||N).join(", "))||"Weekdays",j=v.hours?`${v.hours.start} - ${v.hours.end}`:"9:00 AM - 5:00 PM";return`${y}, ${j}`},h=x=>x.meetingType==="zoom"?s.jsx(ma,{className:"h-4 w-4"}):x.meetingType==="custom"?s.jsx(Zr,{className:"h-4 w-4"}):s.jsx(Oo,{className:"h-4 w-4"}),m=x=>x.meetingType==="zoom"?"Zoom Meeting":x.meetingType==="custom"?"Custom Meeting URL":x.location?x.location:"In-person meeting",g=x=>t?`/${t}/${e}/booking/${x.slug}`:`/team/${e}/booking/${x.slug}`;return c?s.jsx("div",{className:"min-h-screen bg-neutral-50 dark:bg-slate-900 flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}
793),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:"Loading..."})]})}):d||!r?s.jsx("div",{className:"min-h-screen bg-neutral-50 dark:bg-slate-900 flex items-center justify-center",children:s.jsxs("div",{className:"text-center max-w-md px-4",children:[s.jsx("h1",{className:"text-2xl font-bold text-neutral-900 dark:text-slate-100 mb-2",children:"Team Not Found"}),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400 mb-6",children:"We couldn't find a team at this address. Please check the URL and try again."}),s.jsx(D,{onClick:()=>window.location.href="/",children:"Go to Homepage"})]})}):l.length===0?s.jsx("div",{className:"min-h-screen bg-neutral-50 dark:bg-slate-900",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-16",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("div",{className:"h-24 w-24 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4",children:s.jsx(ir,{className:"h-12 w-12 text-primary"})}),s.jsx("h1",{className:"text-3xl font-bold text-neutral-900 dark:text-slate-100 mb-2",children:r.name}),a&&s.jsx("p",{className:"text-lg text-neutral-500 dark:text-slate-400 mb-1",children:a.name}
793),r.description&&s.jsx("p",{className:"text-neutral-600 dark:text-slate-400 max-w-2xl mx-auto mt-2",children:r.description})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 rounded-full bg-neutral-200 dark:bg-slate-700 flex items-center justify-center mx-auto mb-4",children:s.jsx(Gt,{className:"h-8 w-8 text-neutral-400 dark:text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-slate-100 mb-2",children:"No Available Event Types"}),s.jsx("p",{className:"text-neutral-600 dark:text-slate-400",children:"This team hasn't set up any booking links yet."})]})]})}):s.jsx("div",{className:"min-h-screen bg-neutral-50 dark:bg-slate-900",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-16",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("div",{className:"h-24 w-24 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4",children:s.jsx(ir,{className:"h-12 w-12 text-primary"})}),s.jsx("h1",{className:"text-3xl font-bold text-neutral-900 dark:text-slate-100 mb-2",children:r.name}),a&&s.jsx("p",{className:"text-lg text-neutral-500 dark:text-slate-400 mb-1",children:a.name}
793),r.description&&s.jsx("p",{className:"text-neutral-600 dark:text-slate-400 max-w-2xl mx-auto mt-2",children:r.description})]}),s.jsxs("div",{className:"mb-8",children:[s.jsx("h2",{className:"text-xl font-semibold text-neutral-900 dark:text-slate-100 mb-6",children:"Select a meeting type"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:l.map(x=>s.jsxs(X,{className:"hover:shadow-lg transition-shadow cursor-pointer group",onClick:()=>{window.location.href=g(x)},children:[s.jsxs(ue,{className:"pb-3",children:[s.jsxs(fe,{className:"flex items-center justify-between",children:[s.jsx("span",{children:x.title}),s.jsx(Zr,{className:"h-4 w-4 opacity-0 group-hover:opacity-100 transition-opacity"})]}),x.description&&s.jsx(ye,{className:"line-clamp-2",children:x.description})]}),s.jsxs(te,{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center text-sm text-neutral-600 dark:text-slate-400",children:[s.jsx(dr,{className:"h-4 w-4 mr-2"}),s.jsx("span",{children:u(x.duration)})]}),s.jsxs("div",{className:"flex items-center text-sm text-neutral-600 dar
793k:text-slate-400",children:[h(x),s.jsx("span",{className:"ml-2",children:m(x)})]}),s.jsxs("div",{className:"flex items-center text-sm text-neutral-600 dark:text-slate-400",children:[s.jsx(Gt,{className:"h-4 w-4 mr-2"}),s.jsx("span",{className:"text-xs",children:f(x)})]})]})]},x.id))})]}),s.jsx("div",{className:"text-center text-sm text-neutral-500 dark:text-slate-500 pt-8 border-t border-neutral-200 dark:border-slate-700",children:s.jsxs("p",{children:["Powered by"," ",s.jsx("a",{href:"/",className:"text-primary hover:underline",target:"_blank",rel:"noopener noreferrer",children:"SmartScheduler"})]})})]})})}function NQe(){const[e,t]=p.useState(!1),[r,n]=p.useState(!1),{toast:a}=Qt(),[i,o]=p.useState(""),[l,c]=p.useState(""),[d,u]=p.useState(30),[f,h]=p.useState(""),[m,g]=p.useState(null),[x,v]=p.useState([{date:null,time:null},{date:null,time:null}]),{data:b=[],isLoading:y}=ut({queryKey:["/api/meeting-polls"]}),j=dt({mutationFn:async()=>{const _=x.filter(F=>F.date&&F.time).map(F=>{const H=F.date,W=F.time,z=new Date(H);z.setHours(W.getHours(),W.getMinutes(),0,0);const R=new Date(z);return R.setMinutes(R.getMinutes()+d),{startTime:z.toISOString(),endTime:R.toISOString()}});if(_.length<2)throw new Error("At least 2 time options are required");return(await Ue("POST","/api/meeting-polls",{title:i,description:l||void 0,duration:d,location:f||void 0,deadline:(m==null?void 0:m.toISOString())||void 0,options:_})).json()},onSuccess:()=>{a({title:"Poll Created",description:"Share the link to collect votes."}),t(!1),S(),Wt.invalidateQueries({queryKey:["/api/meeting-polls"]})},onError:_=>{a({title:"Error",description:_.message,variant:"destructive"})}}),w=dt({mutationFn:async _=>(await Ue("DELETE",`/api/meeting-polls/${_}`,null)).json(),onSuccess:()=>{a({title:"Deleted",description:"Meeting poll deleted."}),Wt.invalidateQueries({queryKey:["/api/meeting-polls"]})}}),N=dt({mutationFn:async({id:_,selectedOptionId:I})=>(await Ue("PUT",`/api/meeting-polls/${_}`,{status:"closed",...I&&{selectedOptionId:I}})).json(),onSuccess:()=>{a({title:"Poll Closed",description:"The poll has been closed."}),Wt.invalidateQueries({queryKey:["/api/meeting-polls"]})}}),S=()=>{o(""),c(""),u(30),h(""),g(null),v([{date:null,time:null},{date:null,time:null}])},k=()=>{v([...x,{date:null,time:null}])},T=_=>{x.length<=2||v(x.filter((I,F)=>F!==_))},C=(_,I,F)=>{const H=[...x];H[_]={...H[_],[I]:F},v(H)},E=_=>{const I=`${window.location.origin}/poll/${_}`;navigator.clipboard.writeText(I),a({title:"Copied",description:"Poll link copied to clipboard."})},P=_=>{switch(_){case"open":return"bg-green-100 text-green-700";case"closed":return"bg-gray-100 text-gray-700";case"scheduled":return"bg-blue-100 text-blue-700";default:return"bg-gray-100 text-gray-700"}};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:()=>n(!0)}),s.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-white",children:[s.jsxs("div",{className:"border-b border-neutral-300 p-4 flex items-center justify-between bg-white",children:[s.jsxs("h1",{className:"text-xl font-semibold text-neutral-700 flex items-center gap-2",children:[s.jsx(jh,{className:"h-5 w-5"}),"Meeting Polls"]}),s.jsxs(D,{onClick:()=>t(!0),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Create Poll"]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:y?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-neutral-500",children:"Loading polls..."})}):b.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[s.jsx(jh,{className:"h-16 w-16 text-neutral-400 mb-2"}),s.jsx("h2",{className:"text-lg font-medium text-neutral-600 mb-1",children:"No meeting polls yet"}),s.jsx("p",{className:"text-neutral-500 mb-4",children:"Create a poll to let participants vote on their preferred meeting times"}),s.jsxs(D,{onClick:()=>t(!0),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Create Poll"]})]}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:b.map(_=>s.jsxs(X,{children:[s.jsx(ue,{className:"p-4 pb-2",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx(fe,{className:"text-base",children:_.title}),_.description&&s.jsx(ye,{className:"line-clamp-2 mt-1",children:_.description})]}),s.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full font-medium ${P(_.status)}`,children:_.status})]})}),s.jsxs(te,{className:"p-4 pt-2 space-y-2",children:[s.jsxs("div",{className:"flex items-center text-sm text-neutral-600",children:[s.jsx(dr,{className:"h-4 w-4 mr-2"}),_.duration," minutes"]}),s.jsxs("div",{className:"flex items-center text-sm text-neutral-600",children:[s.jsx(qc,{className:"h-4 w-4 mr-2"}
793),_.optionCount," options"]}),s.jsxs("div",{className:"flex items-center text-sm text-neutral-600",children:[s.jsx(ir,{className:"h-4 w-4 mr-2"}),_.uniqueVoters," voter",_.uniqueVoters!==1?"s":""," (",_.voteCount," votes)"]}),_.deadline&&s.jsxs("div",{className:"flex items-center text-sm text-neutral-600",children:[s.jsx(Gt,{className:"h-4 w-4 mr-2"}),"Deadline: ",pt(new Date(_.deadline),"MMM d, yyyy")]})]}),s.jsxs(ta,{className:"p-4 pt-0 flex justify-between gap-2",children:[s.jsxs(D,{variant:"outline",size:"sm",onClick:()=>E(_.slug),children:[s.jsx(ea,{className:"h-4 w-4 mr-1"}),"Copy Link"]}),s.jsxs("div",{className:"flex gap-2",children:[_.status==="open"&&s.jsxs(D,{variant:"outline",size:"sm",onClick:()=>N.mutate({id:_.id}),children:[s.jsx(xl,{className:"h-4 w-4 mr-1"}),"Close"]}),s.jsx(D,{variant:"outline",size:"sm",className:"text-red-600 hover:text-red-700 hover:bg-red-50",onClick:()=>w.mutate(_.id),children:s.jsx(Pr,{className:"h-4 w-4 mr-1"})})]})]})]},_.id))})})]})]}),s.jsx(Ds,{onCreateEventClick:()=>n(!0)}),s.jsx(Ot,{open:e,onOpenChange:t,children:s.jsxs(kt,{className:"sm:max-w-[600px]",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Create Meeting Poll"}),s.jsx($t,{children:"Propose time options and share the link so participants can vote."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Poll Title *"}),s.jsx(ie,{value:i,onChange:_=>o(_.target.value),placeholder:"e.g., Team standup reschedule"})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Description"}),s.jsx(Es,{value:l,onChange:_=>c(_.target.value),placeholder:"What is this meeting about?",rows:2})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Duration"}),s.jsxs(Xe,{value:d.toString(),onValueChange:_=>u(parseInt(_)),children:[s.jsx(Qe,{children:s.jsx(Je,{})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"15",children:"15 min"}),s.jsx(Z,{value:"30",children:"30 min"}),s.jsx(Z,{value:"45",children:"45 min"}),s.jsx(Z,{value:"60",children:"60 min"}),s.jsx(Z,{value:"90",children:"90 min"})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Voting Deadline"}),s.jsx(ru,{selected:m,onChange:_=>g(_),dateFormat:"MMM d, yyyy",placeholderText:"Optional",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",minDate:new Date})]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Location"}),s.jsx(ie,{value:f,onChange:_=>h(_.target.value),placeholder:"Zoom, office, etc."})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx(ee,{children:"Time Options (at least 2) *"}),s.jsxs(D,{type:"button",variant:"outline",size:"sm",onClick:k,children:[s.jsx(Sr,{className:"h-3 w-3 mr-1"}),"Add Option"]})]}),s.jsx("div",{className:"space-y-2",children:x.map((_,I)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-muted-foreground w-5",children:[I+1,"."]}),s.jsx(ru,{selected:_.date,onChange:F=>C(I,"date",F),dateFormat:"MMM d, yyyy",placeholderText:"Date",className:"flex-1 rounded-md border border-input bg-background px-3 py-2 text-sm",minDate:new Date}),s.jsx(ru,{selected:_.time,onChange:F=>C(I,"time",F),showTimeSelect:!0,showTimeSelectOnly:!0,timeIntervals:15,timeFormat:"h:mm aa",dateFormat:"h:mm aa",placeholderText:"Time",className:"w-28 rounded-md border border-input bg-background px-3 py-2 text-sm"}),x.length>2&&s.jsx(D,{type:"button",variant:"ghost",size:"sm",onClick:()=>T(I),className:"text-red-500 hover:text-red-700 px-2",children:s.jsx(Pr,{className:"h-3 w-3"})})]},I))})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>{t(!1),S()},children:"Cancel"}),s.jsx(D,{onClick:()=>j.mutate(),disabled:j.isPending||!i,children:j.isPending?"Creating...":"Create Poll"})]})]})}),s.jsx(Mn,{isOpen:r,onClose:()=>n(!1)})]})}function SQe(){const[e,t]=p.useState(!1),[r,n]=p.useState(null),[a,i]=p.useState(null),[o,l]=p.useState(!1),{toast:c}=Qt(),[d,u]=p.useState(""),[f,h]=p.useState(""),[m,g]=p.useState(""),[x,v]=p.useState(""),[b,y]=p.useState("text"),[j,w]=p.useState(""),[N,S]=p.useState(!0),[k,T]=p.useState(null),[C,E]=p.useState("equals"),[P,_]=p.useState(""),[I,F]=p.useState("route_to_booking"),[H,W]=p.useState(null),[z,R]=p.useState(""),[q,V]=p.useState(""),[se,oe]=p.useState(0),{data:_e=[],isLoading:U}=ut({queryKey:["/api/routing-forms"]}),{data:M=[]}=ut({queryKey:["/api/booking-links"]}),{data:G=[]}=ut({queryKey:["/api/routing-forms",a,"submissions"],queryFn:async()=>a?(await fetch(`/api/routing-forms/${a}/submissions`,{credentials:"include"})).json():[],enabled:!!a}),K=dt({mutationFn:async()=>(await Ue("POST","/api/routing-forms",{title:d,slug:f||d.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),description:m||void 0})).json(),onSuccess:()=>{c({title:"Form Created",description:"Your routing form has been created."}),t(!1),ne(),Wt.invalidateQueries({queryKey:["/api/routing-forms"]})},onError:L=>{c({title:"Error",description:L.message,variant:"destructive"})}}),je=dt({mutationFn:async L=>{await Ue("DELETE",`/api/routing-forms/${L}`,null)},onSuccess:()=>{c({title:"Deleted",description:"Routing form deleted."}),Wt.invalidateQueries({queryKey:["/api/routing-forms"]})}}),ae=dt({mutationFn:async({id:L,isActive:he})=>(await Ue("PUT",`/api/routing-forms/${L}`,{isActive:he})).json(),onSuccess:()=>{Wt.invalidateQueries({queryKey:["/api/routing-forms"]})}}),de=dt({mutationFn:async()=>
793{if(!r)return;const L=b==="select"||b==="radio"||b==="checkbox"?j.split(",").map(Me=>Me.trim()).filter(Boolean):[];return(await Ue("POST",`/api/routing-forms/${r.id}/questions`,{label:x,type:b,options:L,isRequired:N,orderIndex:r.questions.length})).json()},onSuccess:()=>{c({title:"Question Added"}),v(""),w(""),lt()},onError:L=>{c({title:"Error",description:L.message,variant:"destructive"})}}),Ce=dt({mutationFn:async L=>{await Ue("DELETE",`/api/routing-forms/questions/${L}`,null)},onSuccess:()=>{c({title:"Question Removed"}),lt()}}),B=dt({mutationFn:async()=>!r||!k?void 0:(await Ue("POST",`/api/routing-forms/${r.id}/rules`,{questionId:k,operator:C,value:P,action:I,targetBookingLinkId:I==="route_to_booking"?H:null,targetUrl:I==="route_to_url"?z:null,targetMessage:I==="show_message"?q:null,priority:se})).json(),onSuccess:()=>{c({title:"Rule Added"}),Be(),lt()},onError:L=>{c({title:"Error",description:L.message,variant:"destructive"})}}),me=dt({mutationFn:async L=>{await Ue("DELETE",`/api/routing-forms/rules/${L}`,null)},onSuccess:()=>{c({title:"Rule Removed"}),lt()}}),ne=()=>{u(""),h(""),g("")},Be=()=>{T(null),E("equals"),_(""),F("route_to_booking"),W(null),R(""),V(""),oe(0)},lt=async()=>{if(r)try{const he=await(await fetch(`/api/routing-forms/${r.id}`,{credentials:"include"})).json();n(he)}catch{}},ct=async L=>{try{const Me=await(await fetch(`/api/routing-forms/${L.id}`,{credentials:"include"})).json();n(Me)}catch{c({title:"Error",description:"Could not load form details",variant:"destructive"})}},Y=L=>{const he=`${window.location.origin}/route/${L}`;navigator.clipboard.writeText(he),c({title:"Copied",description:"Routing form link copied to clipboard."})},J=L=>{switch(L){case"equals":return"equals";case"not_equals":return"does not equal";case"contains":return"contains";case"starts_with":return"starts with";default:return L}},le=L=>{switch(L){case"route_to_booking":return"Route to booking link";case"route_to_url":return"Redirect to URL";case"show_message":return"Show message";default:return L}},Le=L=>{switch(L){case"route_to_booking":return s.jsx(Ra,{className:"h-3 w-3"});case"route_to_url":return s.jsx(Zr,{className:"h-3 w-3"});case"show_message":return s.jsx(Xd,{className:"h-3 w-3"});default:return null}};return p.useEffect(()=>{d&&!f&&h(d.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""))},[d]),s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:()=>l(!0)}),s.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-white",children:[s.jsxs("div",{className:"border-b border-neutral-300 p-4 flex items-center justify-between bg-white",children:[s.jsxs("h1",{className:"text-xl font-semibold text-neutral-700 flex items-center gap-2",children:[s.jsx(yh,{className:"h-5 w-5"}),"Routing Forms"]}),s.jsxs(D,{onClick:()=>t(!0),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Create Routing Form"]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:U?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-neutral-500",children:"Loading routing forms..."})}):_e.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[s.jsx(yh,{className:"h-12 w-12 text-neutral-300 mb-4"}),s.jsx("h2",{className:"text-lg font-semibold text-neutral-600",children:"No Routing Forms"}),s.jsx("p",{className:"text-neutral-500 mt-2 max-w-md",children:"Create routing forms with conditional logic to direct visitors to the right booking page based on their answers."}),s.jsxs(D,{className:"mt-4",onClick:()=>t(!0),children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"})," Create Your First Routing Form"]})]}):s.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:_e.map(L=>s.jsxs(X,{className:"hover:shadow-md transition-shadow",children:[s.jsx(ue,{className:"pb-3",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx(fe,{className:"text-lg truncate",children:L.title}),s.jsxs(ye,{className:"text-sm mt-1 truncate",children:["/",L.slug]})]}),s.jsx(pe,{className:L.isActive?"bg-green-100 text-green-700":"bg-gray-100 text-gray-700",children:L.isActive?"Active":"Inactive"})]})}),s.jsxs(te,{children:[L.description&&s.jsx("p",{className:"text-sm text-neutral-500 mb-3 line-clamp-2",children:L.description}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsxs(D,{size:"sm",variant:"outline",onClick:()=>ct(L),children:[s.jsx(ym,{className:"h-3 w-3 mr-1"})," Configure"]}),s.jsxs(D,{size:"sm",variant:"outline",onClick:()=>Y(L.slug),children:[s.jsx(ea,{className:"h-3 w-3 mr-1"})," Copy Link"]}),s.jsxs(D,{size:"sm",variant:"outline",onClick:()=>i(L.id),children:[s.jsx(qc,{className:"h-3 w-3 mr-1"})," Submissions"]}),s.jsx(D,{size:"sm",variant:"outline",onClick:()=>ae.mutate({id:L.id,isActive:!L.isActive}),children:L.isActive?"Disable":"Enable"}),s.jsx(D,{size:"sm",variant:"destructive",onClick:()=>je.mutate(L.id),children:s.jsx(Pr,{className:"h-3 w-3"})})]})]})]},L.id))})})]}),s.jsx(Ds,{onCreateEventClick:()=>l(!0)})]}),o&&s.jsx(Mn,{isOpen:o,onClose:()=>l(!1)}),s.jsx(Ot,{open:e,onOpenChange:t,children:s.jsxs(kt,{className:"max-w-md",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Create Routing Form"}),s.jsx($t,{children:"A routing form asks visitors questions and directs them to the right booking page."})]}),s.jsxs("div",{className:"space-y-4 py-4",children:[s.jsxs("div",{children:[s.jsx(ee,{children:"Title"}),s.jsx(ie,{placeholder:"e.g., Sales Inquiry",value:d,onChange:L=>u(L.target.value)})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"URL Slug"}),s.jsx(ie,{placeholder:"e.g., sales-inquiry",value:f,onChange:L=>h(L.target.value)}),s.jsxs("p",{className:"text-xs text-neutral-500 mt-1",children:["Public URL: ",window.location.origin,"/route/",f||"your-slug"]})]}),s.jsxs("div",{children:[s.jsx(ee,{children:"Description (optional)"}),s.jsx(Es,{placeholder:"Help visitors understand what this form is for...",value:m,onChange:L=>g(L.target.value)})]})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsx(D,{onClick:()=>K.mutate(),disabled:!d||K.isPending,children:K.isPending?"Creating...":"Create Form"})]})]})}),s.jsx(Ot,{open:!!r,onOpenChange:L=>{L||n(null)},children:s.jsx(kt,{className:"max-w-3xl max-h-[85vh] overflow-y-auto",children:r&&s.jsxs(s.Fragment,{children:[s.jsxs(Ct,{children:[s.jsxs(Tt,{children:["Configure: ",r.title]}),s.jsx($t,{children:"Add questions and routing rules. Rules are evaluated top-to-bottom by priority."})]}),s.jsxs("div",{className:"space-y-6 py-4",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"text-sm font-semibold text-neutral-700 mb-3 flex items-center gap-2",children:[s.jsx(ME,{className:"h-4 w-4"})," Questions (",r.questions.length,")"]}),r.questions.length>0&&s.jsx("div",{className:"space-y-2 mb-4",children:r.questions.sort((L,he)=>
793(L.orderIndex||0)-(he.orderIndex||0)).map((L,he)=>s.jsxs("div",{className:"flex items-center gap-3 p-3 border rounded-lg bg-neutral-50",children:[s.jsxs("span",{className:"text-xs font-mono text-neutral-400 w-6",children:["Q",he+1]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:L.label}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx(pe,{variant:"outline",className:"text-xs",children:L.type}),L.isRequired&&s.jsx(pe,{variant:"outline",className:"text-xs text-red-500",children:"Required"}),L.type!=="text"&&Array.isArray(L.options)&&L.options.length>0&&s.jsx("span",{className:"text-xs text-neutral-400",children:L.options.join(", ")})]})]}),s.jsx(D,{size:"sm",variant:"ghost",onClick:()=>Ce.mutate(L.id),children:s.jsx(Pr,{className:"h-3 w-3 text-red-500"})})]},L.id))}),s.jsxs("div",{className:"border rounded-lg p-3 space-y-3 bg-white",children:[s.jsx("p",{className:"text-xs font-medium text-neutral-500 uppercase",children:"Add Question"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"Question Label"}),s.jsx(ie,{placeholder:"e.g., What type of meeting?",value:x,onChange:L=>v(L.target.value),className:"text-sm"})]}),s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"Type"}),s.jsxs(Xe,{value:b,onValueChange:y,children:[s.jsx(Qe,{className:"text-sm",children:s.jsx(Je,{})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"text",children:"Text"}),s.jsx(Z,{value:"select",children:"Dropdown"}),s.jsx(Z,{value:"radio",children:"Radio Buttons"}),s.jsx(Z,{value:"checkbox",children:"Checkboxes"})]})]})]})]}),(b==="select"||b==="radio"||b==="checkbox")&&s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"Options (comma-separated)"}),s.jsx(ie,{placeholder:"e.g., Sales, Support, Demo, Other",value:j,onChange:L=>w(L.target.value),className:"text-sm"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gr,{checked:N,onCheckedChange:S,id:"q-required"}),s.jsx(ee,{htmlFor:"q-required",className:"text-xs",children:"Required"})]}),s.jsxs(D,{size:"sm",onClick:()=>de.mutate(),disabled:!x||de.isPending,children:[s.jsx(Sr,{className:"h-3 w-3 mr-1"})," Add Question"]})]})]})]}),s.jsxs("div",{children:[s.jsxs("h3",{className:"text-sm font-semibold text-neutral-700 mb-3 flex items-center gap-2",children:[s.jsx(Gw,{className:"h-4 w-4"})," Routing Rules (",r.rules.length,")"]}),r.rules.length>0&&s.jsx("div",{className:"space-y-2 mb-4",children:r.rules.sort((L,he)=>(he.priority||0)-(L.priority||0)).map(L=>{const he=r.questions.find(Ne=>Ne.id===L.questionId),Me=M.find(Ne=>Ne.id===L.targetBookingLinkId);return s.jsxs("div",{className:"flex items-start gap-3 p-3 border rounded-lg bg-neutral-50",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1 text-sm flex-wrap",children:[s.jsx("span",{className:"font-medium",children:"If"}),s.jsx(pe,{variant:"outline",className:"text-xs",children:(he==null?void 0:he.label)||`Q#${L.questionId}`}),s.jsx("span",{className:"text-neutral-500",children:J(L.operator)}),s.jsx(pe,{className:"text-xs",children:L.value})]}),s.jsxs("div",{className:"flex items-center gap-1 mt-1 text-xs text-neutral-500",children:[Le(L.action),s.jsx("span",{children:le(L.action)}),L.action==="route_to_booking"&&Me&&s.jsx(pe,{variant:"outline",className:"text-xs ml-1",children:Me.title}),L.action==="route_to_url"&&L.targetUrl&&s.jsx("span",{className:"ml-1 truncate max-w-[200px]",children:L.targetUrl}),L.action==="show_message"&&L.targetMessage&&s.jsxs("span",{className:"ml-1 truncate max-w-[200px] italic",children:['"',L.targetMessage,'"']}),L.priority?s.jsxs(pe,{variant:"outline",className:"text-xs ml-auto",children:["Priority: ",L.priority]}):null]})]}),s.jsx(D,{size:"sm",variant:"ghost",onClick:()=>me.mutate(L.id),children:s.jsx(Pr,{className:"h-3 w-3 text-red-500"})})]},L.id)})}),r.questions.length>0?s.jsxs("div",{className:"border rounded-lg p-3 space-y-3 bg-white",children:[s.jsx("p",{className:"text-xs font-medium text-neutral-500 uppercase",children:"Add Routing Rule"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"When question"}),s.jsxs(Xe,{value:k?String(k):"",onValueChange:L=>T(parseInt(L)),children:[s.jsx(Qe,{className:"text-sm",children:s.jsx(Je,{placeholder:"Select question"})}),s.jsx(Ze,{children:r.questions.map(L=>s.jsx(Z,{value:String(L.id),children:L.label},L.id))})]})]}),s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"Operator"}),s.jsxs(Xe,{value:C,onValueChange:E,children:[s.jsx(Qe,{className:"text-sm",children:s.jsx(Je,{})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"equals",children:"Equals"}),s.jsx(Z,{value:"not_equals",children:"Does not equal"}),s.jsx(Z,{value:"contains",children:"Contains"}),s.jsx(Z,{value:"starts_with",children:"Starts with"})]})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"Value to match"}),s.jsx(ie,{placeholder:"e.g., Sales",value:P,onChange:L=>_(L.target.value),className:"text-sm"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"Action"}),s.jsxs(Xe,{value:I,onValueChange:F,children:[s.jsx(Qe,{className:"text-sm",children:s.jsx(Je,{})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"route_to_booking",children:"Route to booking link"}),s.jsx(Z,{value:"route_to_url",children:"Redirect to URL"}),s.jsx(Z,{value:"show_message",children:"Show message"})]})]})]}),s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"Priority (higher = first)"}),s.jsx(ie,{type:"number",value:se,onChange:L=>oe(parseInt(L.target.value)||0),className:"text-sm"})]})]}),I==="route_to_booking"&&s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"Target Booking Link"}),s.jsxs(Xe,{value:H?String(H):"",onValueChange:L=>W(parseInt(L)),children:[s.jsx(Qe,{className:"text-sm",children:s.jsx(Je,{placeholder:"Select booking link"})}),s.jsx(Ze,{children:M.map(L=>s.jsx(Z,{value:String(L.id),children:L.title},L.id))})]})]}),I==="route_to_url"&&s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"Target URL"}),s.jsx(ie,{placeholder:"https://...",value:z,onChange:L=>R(L.target.value),className:"text-sm"})]}),I==="show_message"&&s.jsxs("div",{children:[s.jsx(ee,{className:"text-xs",children:"Message"}),s.jsx(Es,{placeholder:"Message to display...",value:q,onChange:L=>V(L.target.value),className:"text-sm"})]}),s.jsx("div",{className:"flex justify-end",children:s.jsxs(D,{size:"sm",onClick:()=>B.mutate(),disabled:!k||!P||B.isPending,children:[s.jsx(Sr,{className:"h-3 w-3 mr-1"})," Add Rule"]})})]}):s.jsx("p",{className:"text-sm text-neutral-400 italic",children:"Add questions first, then configure routing rules."})]}),s.jsx("div",{className:"border-t pt-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Public Form Link"}),s.jsxs("p",{className:"text-xs text-neutral-500",children:[window.location.origin,"/route/",r.slug]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(D,{size:"sm",variant:"outline",onClick:()=>Y(r.slug),children:[s.jsx(ea,{className:"h-3 w-3 mr-1"})," Copy"]}),s.jsx(D,{size:"sm",variant:"outline",asChild:!0,children:s.jsxs("a",{href:`/route/${r.slug}`,target:"_blank",rel:"noopener noreferrer",children:[s.jsx(vW,{className:"h-3 w-3 mr-1"})," Preview"]})})]})]})})]})]})})}),s.jsx(Ot,{open:!!a,onOpenChange:L=>{L||i(null)},children:s.jsxs(kt,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:"Form Submissions"}),s.jsx($t,{children:"Recent submissions and routing outcomes."})]}),s.jsx("div",{className:"space-y-3 py-4",children:G.length===0?s.jsx("p",{className:"text-sm text-neutral-500 text-center py-8",children:"No submissions yet."}):G.map(L=>s.jsxs("div",{className:"p-3 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[L.submitterName&&s.jsx("span",{className:"text-sm font-medium",children:L.submitterName}),L.submitterEmail&&s.jsx("span",{className:"text-xs text-neutral-500",children:L.submitterEmail})]}),s.jsx("span",{className:"text-xs text-neutral-400",children:new Date(L.createdAt).toLocaleDateString()})]}),s.jsx("div",{className:"text-xs text-neutral-600 space-y-1",children:L.answers&&typeof L.answers=="object"&&Object.entries(L.answers).map(([he,Me])=>s.jsxs("div",{children:[s.jsxs("span",{className:"text-neutral-400",children:["Q",he,":"]})," ",String(Me)]},he))}),s.jsx("div",{className:"mt-2",children:s.jsxs(pe,{variant:"outline",className:"text-xs",children:["Routed to: ",L.routedTo||"no match"]})})]},L.id))})]})})]})}function kQe(){const[e,t]=p.useState(!1),[r,n]=p.useState("all"),[a,i]=p.useState(null),{toast:o}=Qt(),{data:l=[]}=ut({queryKey:["/api/booking"]}),{data:c=[],isLoading:d}=ut({queryKey:["/api/user-bookings"],queryFn:async()=>{const v=await fetch("/api/user-bookings",{credentials:"include"});return v.ok?v.json():[]}}),u=dt({mutationFn:async v=>(await Ue("POST",`/api/bookings/${v}/no-show`,{})).json(),onSuccess:()=>{o({title:"Marked as No-Show",description:"Booking has been marked as
793no-show."}),Wt.invalidateQueries({queryKey:["/api/user-bookings"]}),i(null)},onError:v=>{o({title:"Error",description:v.message,variant:"destructive"})}}),f=dt({mutationFn:async v=>(await Ue("POST",`/api/bookings/${v}/reconfirm`,{})).json(),onSuccess:v=>{o({title:"Reconfirmation Sent",description:"A reconfirmation request has been generated. Share the link with the invitee."}),Wt.invalidateQueries({queryKey:["/api/user-bookings"]}),i(null)},onError:v=>{o({title:"Error",description:v.message,variant:"destructive"})}}),h=r==="all"?c:c.filter(v=>v.bookingLinkId===parseInt(r)),m=v=>{switch(v){case"confirmed":return s.jsx(pe,{variant:"default",className:"bg-green-100 text-green-700 hover:bg-green-100",children:"Confirmed"});case"cancelled":return s.jsx(pe,{variant:"destructive",children:"Cancelled"});case"no_show":return s.jsx(pe,{variant:"destructive",className:"bg-orange-100 text-orange-700 hover:bg-orange-100",children:"No Show"});case"rescheduled":return s.jsx(pe,{variant:"secondary",children:"Rescheduled"});default:return s.jsx(pe,{variant:"outline",children:v})}},g=v=>{switch(v){case"confirmed":return s.jsx(pe,{className:"bg-green-100 text-green-700 hover:bg-green-100",children:"Reconfirmed"});case"declined":return s.jsx(pe,{variant:"destructive",children:"Declined"});case"pending":return s.jsx(pe,{variant:"outline",className:"text-yellow-600 border-yellow-300",children:"Pending"});default:return null}},x=v=>new Date(v)<new Date;return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:()=>t(!0)}),s.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-white",children:[s.jsxs("div",{className:"border-b border-neutral-300 p-4 flex items-center justify-between bg-white",children:[s.jsxs("h1",{className:"text-xl font-semibold text-neutral-700 flex items-center gap-2",children:[s.jsx(Lg,{className:"h-5 w-5"}),"Bookings"]}),s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs(Xe,{value:r,onValueChange:n,children:[s.jsx(Qe,{className:"w-48",children:s.jsx(Je,{placeholder:"All booking links"})}),s.jsxs(Ze,{children:[s.jsx(Z,{value:"all",children:"All booking links"}),l.map(v=>s.jsx(Z,{value:v.id.toString(),children:v.title},v.id))]})]})})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:d?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-neutral-500",children:"Loading bookings..."})}):h.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[s.jsx(Lg,{className:"h-16 w-16 text-neutral-400 mb-2"}),s.jsx("h2",{className:"text-lg font-medium text-neutral-600 mb-1",children:"No bookings yet"}),s.jsx("p",{className:"text-neutral-500",children:"Bookings will appear here when people schedule through your links."})]}):s.jsx("div",{className:"space-y-3",children:h.sort((v,b)=>new Date(b.startTime).getTime()-new Date(v.startTime).getTime()).map(v=>{var j;const b=x(v.endTime),y=((j=l.find(w=>w.id===v.bookingLinkId))==null?void 0:j.title)||"Unknown";return s.jsx(X,{className:b&&v.status==="confirmed"?"border-l-4 border-l-orange-300":"",children:s.jsx(te,{className:"py-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(yl,{className:"h-4 w-4 text-neutral-500"}),s.jsx("span",{className:"font-medium",children:v.name})]}),m(v.status),g(v.reconfirmationStatus)]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-neutral-600",children:[s.jsx("span",{children:v.email}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(dr,{className:"h-3 w-3"}),pt(new Date(v.startTime),"MMM d, yyyy h:mm a")]}),s.jsx("span",{className:"text-neutral-400",children:y})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[b&&v.status==="confirmed"&&s.jsxs(D,{variant:"outline",size:"sm",className:"text-orange-600 hover:text-orange-700 hover:bg-orange-50",onClick:()=>i({type:"no-show",booking:v}),children:[s.jsx(C0,{className:"h-4 w-4 mr-1"}),"No-Show"]}),!b&&v.status==="confirmed"&&!v.reconfirmationStatus&&s.jsxs(D,{variant:"outline",size:"sm",onClick:()=>i({type:"reconfirm",booking:v}),children:[s.jsx(Roe,{className:"h-4 w-4 mr-1"}),"Reconfirm"]}),v.reconfirmationStatus==="pending"&&s.jsxs(D,{variant:"outline",size:"sm",className:"text-yellow-600",onClick:()=>i({type:"reconfirm",booking:v}),children:[s.jsx(Uoe,{className:"h-4 w-4 mr-1"}),"Resend"]})]})]})})},v.id)})})})]})]}),s.jsx(Ds,{onCreateEventClick:()=>t(!0)}),s.jsx(Ot,{open:!!a,onOpenChange:()=>i(null),children:s.jsxs(kt,{children:[s.jsxs(Ct,{children:[s.jsx(Tt,{children:(a==null?void 0:a.type)==="no-show"?"Mark as No-Show":"Send Reconfirmation"}),s.jsx($t,{children:(a==null?void 0:a.type)==="no-show"?`Mark ${a==null?void 0:a.booking.name}'s booking as a no-show? This will update the booking status.`:`Send a reconfirmation request to ${a==null?void 0:a.booking.name} (${a==null?void 0:a.booking.email})? They'll receive a link to confirm or decline.`})]}),s.jsxs(Bt,{children:[s.jsx(D,{variant:"outline",onClick:()=>i(null),children:"Cancel"}),s.jsx(D,{variant:(a==null?void 0:a.type)==="no-show"?"destructive":"default",onClick:()=>{a&&(a.type==="no-show"?u.mutate(a.booking.id):f.mutate(a.booking.id))},disabled:u.isPending||f.isPending,children:(a==null?void 0:a.type)==="no-show"?"Mark No-Show":"Send Reconfirmation"})]})]})}),s.jsx(Mn,{isOpen:e,onClose:()=>t(!1)})]})}function CQe(){const{toast:e}=Qt(),[t,r]=p.useState("virtual-coffee"),[n,a]=p.useState(null),[i,o]=p.useState(!1),[l,c]=p.useState(null),d=async()=>{o(!0),c(null);try{const f=await(await fetch(`/api/public/booking/${t}`)).json();a(f),console.log("API Response:",f),e({title:"Success",description:"API returned data successfully"})}catch(u){console.error("Error testing API:",u),c(u.message),e({title:"Error",description:"Failed to test API",variant:"destructive"})}finally{o(!1)}};return s.jsx("div",{className:"container py-8",children:s.jsxs(X,{children:[s.jsx(ue,{children:s.jsx(fe,{children:"Booking API Diagnostic"})}),s.jsx(te,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(ie,{value:t,onChange:u=>r(u.target.value),placeholder:"booking-slug",className:"max-w-sm"}),s.jsx(D,{onClick:d,disabled:i,children:i?"Testing...":"Test API"})]}),l&&s.jsx("div",{className:"p-4 bg-destructive/10 text-destructive rounded-md",children:l}),n&&s.jsxs("div",{className:"mt-4",children:[s.jsx("h3",{className:"text-lg font-medium mb-2",children:"API Response:"}),s.jsx("pre",{className:"bg-muted p-4 rounded-md overflow-auto max-h-[400px]",children:JSON.stringify(n,null,2)})]})]})})]})})}function TQe(){const[e,t]=p.useState(!1),{toast:r}=Qt(),{user:n,isCompanyAdmin:a,isAdmin:i}=gn(),{data:o=[],isLoading:l}=ut({queryKey:[`/api/organizations/${n==null?void 0:n.organizationId}/teams`],enabled:a&&!!(n!=null&&n.organizationId)}),{data:c=[],isLoading:d}=ut({queryKey:["/api/teams"],enabled:i}),u=i?c:o,f=i?d:l,{data:h=[],isLoading:m}=ut({queryKey:["/api/booking"]}),g=h.filter(w=>w.isTeamBooking&&w.teamId),x=u.reduce((w,N)=>(w[N.id]=g.filter(S=>S.teamId===N.id),w),{}),v=()=>{t(!0)},b=w=>{switch(w){case"round-robin":return"Round Robin";case"equal-distribution":return"Equal Distribution";case"pooled":return"Pooled";case"specific":return"Specific";
793case"hybrid":return"Hybrid";default:return"Round Robin"}},y=w=>{window.location.href=`/booking?create=true&teamId=${w}`},j=async w=>{try{const N=await fetch(`/api/teams/${w}/public-page-path`);if(N.ok){const S=await N.json();window.open(S.path,"_blank")}else r({title:"Error",description:"Could not load team page URL",variant:"destructive"})}catch{r({title:"Error",description:"Could not load team page URL",variant:"destructive"})}};return!a&&!i?s.jsxs("div",{className:"flex flex-col h-screen bg-neutral-50 dark:bg-slate-950",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:v}),s.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center py-12",children:[s.jsx(kW,{className:"h-16 w-16 mx-auto text-neutral-400 mb-4"}),s.jsx("h2",{className:"text-2xl font-semibold mb-2",children:"Access Restricted"}),s.jsx("p",{className:"text-muted-foreground",children:"Team Scheduling is only available for Company Admins and System Admins."})]})})]}),s.jsx(Ds,{onCreateEventClick:v})]}):s.jsxs("div",{className:"flex flex-col h-screen bg-neutral-50 dark:bg-slate-950",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:v}),s.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:"Team Scheduling"}),s.jsx("p",{className:"text-muted-foreground mt-1",children:"Create and manage round-robin booking links for your teams"})]}),s.jsxs(D,{onClick:()=>window.location.href="/booking?create=true",children:[s.jsx(Sr,{className:"h-4 w-4 mr-2"}),"Create Team Booking Link"]})]}),(f||m)&&s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(Bg,{className:"h-8 w-8 animate-spin text-primary"})}),!f&&u.length===0&&s.jsx(X,{children:s.jsxs(te,{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(ir,{className:"h-16 w-16 text-neutral-300 mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No Teams Found"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:a?"Your organization doesn't have any teams yet. Create a team in the Admin Center to get started with team scheduling.":"No teams are available in the system. Create teams in the Admin Center to enable team scheduling."}),s.jsx(D,{variant:"outline",className:"mt-4",onClick:()=>window.location.href="/admin/organizations",children:"Go to Admin Center"})]})}),!f&&u.length>0&&s.jsx("div",{className:"space-y-6",children:u.map(w=>{var N;return s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-primary/10 rounded-lg",children:s.jsx(ir,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{className:"text-lg",children:w.name}),w.description&&s.jsx(ye,{children:w.description})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(D,{variant:"outline",size:"sm",onClick:()=>j(w.id),children:[s.jsx(vW,{className:"h-4 w-4 mr-1"}),"View Team Page"]}),s.jsxs(D,{variant:"outline",size:"sm",onClick:()=>y(w.id),children:[s.jsx(Sr,{className:"h-4 w-4 mr-1"}),"Add Round-Robin Link"]})]})]})}),s.jsx(te,{children:((N=x[w.id])==null?void 0:N.length)>0?s.jsx("div",{className:"space-y-3",children:x[w.id].map(S=>s.jsxs("div",{className:"flex items-center justify-between p-3 bg-neutral-50 dark:bg-neutral-900 rounded-lg border",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Ra,{className:"h-4 w-4 text-neutral-500"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:S.title}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx(pe,{variant:"secondary",className:"text-xs",children:b(S.assignmentMethod)}),s.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[s.jsx(dr,{className:"h-3 w-3"}),S.duration," min"]}),S.isCollective&&s.jsx(pe,{variant:"outline",className:"text-xs",children:"Collective"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>window.location.href=`/booking?edit=${S.id}`,children:"Edit"}),s.jsx(D,{variant:"ghost",size:"sm",onClick:()=>{const k=`${window.location.origin}/${S.slug}`;window.open(k,"_blank")},children:s.jsx(Zr,{className:"h-4 w-4"})})]})]},S.id))}):s.jsxs("div",{className:"text-center py-6 text-muted-foreground",children:[s.jsx("p",{className:"text-sm",children:"No round-robin booking links for this team yet."}),s.jsx(D,{variant:"link",size:"sm",onClick:()=>y(w.id),children:"Create your first one"})]})})]},w.id)})}),s.jsx(X,{className:"mt-8 bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800",children:s.jsx(te,{className:"py-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Bg,{className:"h-5 w-5 text-blue-600 mt-0.5"}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-100",children:"How Round-Robin Works"}),s.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300 mt-1",children:"Round-robin automatically distributes incoming bookings evenly across your team members. Each team member gets assigned meetings in rotation, ensuring fair workload distribution. You can also configure weighted distribution to assign more meetings to specific team members."})]})]})})})]})})]}),s.jsx(Ds,{onCreateEventClick:v}),s.jsx(Mn,{isOpen:e,onClose:()=>t(!1)})]})}function _Qe(){return s.jsxs("div",{className:"min-h-screen flex flex-col bg-white dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("main",{className:"flex-1 container max-w-4xl mx-auto py-8 px-4",children:[s.jsx(Te,{href:"/",children:s.jsxs(D,{variant:"ghost",className:"mb-6 pl-0 flex items-center gap-1",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Home"})]})}),s.jsxs("div",{className:"prose prose-neutral dark:prose-invert max-w-none",children:[s.jsx("h1",{children:"Privacy Policy"}),s.jsx("p",{className:"text-lg text-neutral-700 dark:text-slate-300",children:"Last updated: September 13, 2026"}),s.jsx("h2",{children:"Introduction"}),s.jsx("p",{children:"At SmartScheduler, we take your privacy seriously. This Privacy Policy describes how we
793collect, use, process, and disclose your information, including personal information, in conjunction with your access to and use of the SmartScheduler platform."}),s.jsx("h2",{children:"Information We Collect"}),s.jsx("h3",{children:"Information You Provide to Us"}),s.jsx("p",{children:"We collect information you provide directly to us when you:"}),s.jsxs("ul",{children:[s.jsx("li",{children:"Create or modify your account"}),s.jsx("li",{children:"Schedule or manage calendar events"}),s.jsx("li",{children:"Connect third-party integrations (like Google Calendar)"}),s.jsx("li",{children:"Communicate with other users through our platform"}),s.jsx("li",{children:"Contact customer support"})]}),s.jsx("h3",{children:"Information We Automatically Collect"}),s.jsx("p",{children:"When you use our platform, we automatically collect:"}),s.jsxs("ul",{children:[s.jsx("li",{children:"Usage data (such as how you interact with the application)"}),s.jsx("li",{children:"Device information (operating system, browser type, etc.)"}),s.jsx("li",{children:"Log data (IP address, access times, etc.)"})]}),s.jsx("h2",{children:"Google User Data"}),s.jsx("p",{children:"SmartScheduler connects to Google Calendar so that it can see when you are genuinely busy and so that meetings booked through your SmartScheduler links appear on your calendar automatically. This section describes exactly what Google account data we request, why we request it, what we store, and how you can revoke it."}),s.jsx("h3",{children:"Scopes We Request, and Why"}),s.jsxs("ul",{children:[s.jsxs("li",{children:[s.jsx("code",{children:"https://www.googleapis.com/auth/calendar.events"})," â used to read your existing events so SmartScheduler never offers a time slot you are not free for, and to create, update, and cancel the events that people book through your SmartScheduler booking links."]}),s.jsxs("li",{children:[s.jsx("code",{children:"https://www.googleapis.com/auth/calendar.calendarlist.readonly"})," â used to list the calendars on your account so you can choose which one SmartScheduler should read from and write to. This scope is read-only: it does not allow us to create, rename, remove, or share a calendar."]}),s.jsxs("li",{children:[s.jsx("code",{children:"profile"})," and ",s.jsx("code",{children:"email"})," â used to identify which Google account a connected calendar belongs to, to label that calendar in your integrations list, and to set the organizer address on events we create on your behalf."]})]}),s.jsx("h3",{children:"What We Store"}),s.jsx("p",{children:"We store the OAuth access and refresh tokens that Google issues, the identifiers of the calendars you choose to connect, the email address and display name of the connected Google account, and the event details required to keep your SmartScheduler bookings and your Google Calendar in sync. We do not copy the contents of your calendar beyond what is needed for c
793onflict checking and for the bookings made through SmartScheduler."}),s.jsx("h2",{children:"Limited Use Disclosure"}),s.jsxs("p",{children:["SmartSchedulerâs use and transfer of information received from Google APIs to any other app will adhere to the"," ",s.jsx("a",{href:"https://developers.google.com/terms/api-services-user-data-policy",target:"_blank",rel:"noopener noreferrer",children:"Google API Services User Data Policy"}),", including the Limited Use requirements."]}),s.jsxs("p",{children:["In particular, we do ",s.jsx("strong",{children:"not"}),":"]}),s.jsxs("ul",{children:[s.jsx("li",{children:"Sell Google user data, or transfer it to data brokers or information resellers."}),s.jsx("li",{children:"Use Google user data to serve, target, or personalize advertising."}),s.jsx("li",{children:"Use Google user data to train generalized artificial intelligence or machine learning models."}),s.jsx("li",{children:"Permit humans to read your Google user data, except: with your explicit consent for a specific support request you have raised; where required by law; where necessary for security purposes such as investigating abuse; or where the data has been aggregated and anonymized."})]}),s.jsx("h3",{children:"Revoking Access and Deleting Your Data"}),s.jsxs("p",{children:["You can disconnect a Google Calendar at any time from the Integrations page in SmartScheduler. Disconnecting revokes the token with Google, deletes the stored access and refresh tokens, and deletes the events that were synced from that calendar. You can also revoke SmartSchedulerâs access directly from your Google Account at"," ",s.jsx("a",{href:"https://myaccount.google.com/permissions",target:"_blank",rel:"noopener noreferrer",children:"myaccount.google.com/permissions"}),". To request deletion of your SmartScheduler account and all data associated with it, email [email protected]."]}),s.jsx("h2",{children:"How We Use Your Information"}),s.jsx("p",{children:"We use the information we collect to:"}),s.jsxs("ul",{children:[s.jsx("li",{children:"Provide, maintain, and improve our services"}),s.jsx("li",{children:"Process transactions and send related information"}),s.jsx("li",{children:"Send administrative notifications and updates"}),s.jsx("li",{children:"Respond to your comments and questions"}),s.jsx("li",{children:"Analyze usage patterns to enhance user experience"}),s.jsx("li",{children:"Protect against fraudulent or illegal activity"})]}),s.jsx("h2",{children:"Data Sharing and Disclosure"}),s.jsx("p",{children:"We may share your information with:"}),s.jsxs("ul",{children:[s.jsx("li",{children:"Third-party service providers who perform services on our behalf"}),s.jsx("li",{children:"Partners with whom you've connected your SmartScheduler account"}),s.jsx("li",{children:"Law enforcement agencies when required by law"})]}),s.jsx("h2",{children:"Your Rights and Choices"}),s.jsx("p",{children:"You have the right to:"}),s.jsxs("ul",{children:[s.jsx("li",{children:"Access, update or delete your personal information"}),s.jsx("li",{children:"Object to our processing of your data"}),s.jsx("li",{children:"Opt out of marketing communications"}),s.jsx("li",{children:"Request data portability"})]}),s.jsx("h2",{children:"Security"}),s.jsx("p",{children:"We implement appropriate technical and organizational measures to protect your personal information against unauthorized or unlawful processing, accidental loss, destruction, or damage."}),s.jsx("h2",{children:"Data Retention"}),s.jsx("p",{children:"We retain your personal information for as long as necessary to provide our services and fulfill the purposes described in this policy, unless a longer retention period is required by law."}),s.jsx("h2",{children:"International Data Transfers"}),s.jsx("p",{children:"Your information may be transferred to, and processed in, countries other than the country in which you reside. These countries may have data protection laws that are different from the laws of your country."}),s.jsx("h2",{children:"Changes to This Policy"}),s.jsx("p",{children:'We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new policy on this page and updating the "Last updated" date.'}),s.jsx("h2",{children:"Contact Us"}),s.jsx("p",{children:"If you have any questions about this Privacy Policy, please contact us at:"}),s.jsxs("p",{children:["Agility Engineers, LLC",s.jsx("br",{}),"Email: [email protected]",s.jsx("br",{}),"Website: ",s.jsx("a",{href:"https://www.agility-engineers.com/",target:"_blank",rel:"noopener noreferrer",children:"www.agility-engineers.com"})]})]})]}),s.jsx(hi,{})]})}function PQe(){return s.jsxs("div",{className:"min-h-screen flex flex-col bg-white dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("main",{className:"flex-1 container max-w-4xl mx-auto py-8 px-4",children:[s.jsx(Te,{href:"/",children:s.jsxs(D,{variant:"ghost",className:"mb-6 pl-0 flex items-center gap-1",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Home"})]})}),s.jsxs("div",{className:"prose prose-neutral dark:prose-invert max-w-none",children:[s.jsx("h1",{children:"Terms of Service"}),s.jsx("p",{className:"text-lg text-neutral-700 dark:text-slate-300",children:"Last updated: April 10, 2025"}),s.jsx("h2",{children:"Introduction"}
793),s.jsx("p",{children:'Welcome to SmartScheduler. These Terms of Service ("Terms") govern your access to and use of the SmartScheduler platform, including any related mobile applications, websites, and services (collectively, the "Service"). By accessing or using the Service, you agree to be bound by these Terms.'}),s.jsx("h2",{children:"Using Our Service"}),s.jsx("h3",{children:"Account Registration"}),s.jsx("p",{children:"To use certain features of the Service, you must register for an account. You agree to provide accurate, current, and complete information during the registration process and to update such information to keep it accurate, current, and complete."}),s.jsx("h3",{children:"Account Security"}),s.jsx("p",{children:"You are responsible for safeguarding your account password and for any activities or actions under your account. You agree to notify us immediately of any unauthorized use of your account."}),s.jsx("h3",{children:"Acceptable Use"}),s.jsx("p",{children:"You agree not to use the Service to:"}),s.jsxs("ul",{children:[s.jsx("li",{children:"Violate any applicable laws or regulations"}),s.jsx("li",{children:"Infringe the intellectual property rights of others"}),s.jsx("li",{children:"Transmit any material that is harmful, threatening, abusive, or otherwise objectionable"}),s.jsx("li",{children:"Interfere with or disrupt the integrity or performance of the Service"}),s.jsx("li",{children:"Attempt to gain unauthorized access to the Service or related systems"})]}),s.jsx("h2",{children:"Subscription and Fees"}),s.jsx("p",{children:"Some aspects of the Service may require a subscription. Subscription fees are non-refundable except as required by law or as explicitly stated in these Terms."}),s.jsx("h3",{children:"Free Trial"}),s.jsx("p",{children:"We may offer free trial periods for certain subscriptions. At the end of the trial period, we will automatically charge the applicable subscription fee unless you cancel before the trial ends."}),s.jsx("h3",{children:"Changes to Fees"}),s.jsx("p",{children:"We reserve the right to modify our subscription fees at any time. We will provide notice of any fee change before it becomes effective. Your continued use of the Service after the fee change becomes effective constitutes your agreement to pay the modified fee amount."}),s.jsx("h2",{children:"Intellectual Property Rights"}),s.jsx("h3",{children:"Our Intellectual Property"}),s.jsx("p",{children:"The Service and its original content, features, and functionality are owned by SmartScheduler and are protected by international copyright, trademark, patent, trade secret, and other intellectual property or proprietary rights laws."}),s.jsx("h3",{children:"Your Content"}),s.jsx("p",{children:"You retain all rights to any content you submit, post, or display on or through the Service. By submitting content to the Service, you grant us a worldwide, non-exclusive, royalty-free license to use, reproduce, modify, adapt, publish, and display such content in connection with providing the Service to you and other users."}),s.jsx("h2",{children:"Termination"}),s.jsx("p",{children:"We may terminate or suspend your account and access to the Service immediately, without prior notice or liability, for any reason, including if you breach these Terms."}),s.jsx("h2",{children:"Disclaimers"}),s.jsx("p",{children:'THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED.'}),s.jsx("h2",{children:"Limitation of Liability"}),s.jsx("p",{children:"IN NO EVENT SHALL SMARTSCHEDULER, ITS OFFICERS, DIRECTORS, EMPLOYEES, OR AGENTS, BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR PUNITIVE DAMAGES ARISING OUT OF OR RELATED TO YOUR USE OF THE SERVICE."}),s.jsx("h2",{children:"Changes to These Terms"}),s.jsx("p",{children:'We may modify these Terms at any time. We will provide notice of any material changes by posting the updated Terms on this page and updating the "Last updated" date above. Your continued use of the Service after any such changes constitutes your acceptance of the new Terms.'}),s.jsx("h2",{children:"Governing Law"}),s.jsx("p",{children:"These Terms shall be governed by the laws of the jurisdiction in which Agility Engineers, LLC is established, without regard to its conflict of law provisions."}),s.jsx("h2",{children:"Contact Us"}),s.jsx("p",{children:"If you have any questions about these Terms, please contact us at:"}),s.jsxs("p",{children:["Agility Engineers, LLC",s.jsx("br",{}),"Email: [email protected]",s.jsx("br",{}),"Website: ",s.jsx("a",{href:"https://www.agility-engineers.com/",target:"_blank",rel:"noopener noreferrer",children:"www.agility-engineers.com"})]})]})]}),s.jsx(hi,{})]})}function EQe(){const{user:e}=gn(),[t,r]=p.useState(!1),n=()=>{r(!0)};return e?s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dar
793k:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:n}),s.jsx("main",{className:"flex-1 overflow-y-auto bg-white dark:bg-slate-800",children:s.jsxs("div",{className:"container max-w-5xl mx-auto py-8 px-4",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx(Te,{href:"/help",children:s.jsxs(D,{variant:"ghost",className:"mb-4 pl-0 flex items-center gap-1",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Help & Support"})]})}),s.jsx("h1",{className:"text-3xl font-bold mb-2",children:"API Documentation"}),s.jsx("p",{className:"text-muted-foreground",children:"Integrate My Smart Scheduler with your applications and services using our REST API."})]}),s.jsxs(Br,{defaultValue:"overview",children:[s.jsxs(Hr,{className:"grid w-full grid-cols-4",children:[s.jsx(We,{value:"overview",children:"Overview"}),s.jsx(We,{value:"authentication",children:"Authentication"}),s.jsx(We,{value:"endpoints",children:"Endpoints"}),s.jsx(We,{value:"examples",children:"Examples"})]}),s.jsxs(Ve,{value:"overview",className:"mt-6 space-y-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(Woe,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"API Overview"}),s.jsx(ye,{children:"Key concepts and architecture"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Introduction"}),s.jsx("p",{children:"The My Smart Scheduler API allows you to programmatically interact with calendars, events, and bookings. You can create applications that integrate with our platform to build automation, integrations, or custom interfaces."}),s.jsx("h3",{className:"text-lg font-medium",children:"Base URL"}),s.jsx("div",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm mb-4",children:"https://api.smart-scheduler.ai/v1"}),s.jsx("h3",{className:"text-lg font-medium",children:"Rate Limits"}),s.jsx("p",{className:"mb-2",children:"Our API implements rate limiting to ensure service stability:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Free tier:"})," 100 requests per hour"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Pro tier:"})," 1,000 requests per hour"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Enterprise tier:"})," 10,000 requests per hour"]})]}),s.jsx("p",{children:"The rate limit is applied per API key. You can check your current rate limit status by examining the following headers in API responses:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1 mb-4",children:[s.jsxs("li",{children:[s.jsx("code",{children:"X-RateLimit-Limit"}),": Maximum number of requests allowed per hour"]}),s.jsxs("li",{children:[s.jsx("code",{children:"X-RateLimit-Remaining"}),": Number of requests remaining in the current period"]}),s.jsxs("li",{children:[s.jsx("code",{children:"X-RateLimit-Reset"}),": Time at which the rate limit resets (UTC epoch seconds)"]})]}),s.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-950 p-4 rounded-lg border border-yellow-200 dark:border-yellow-900 mb-4",children:[s.jsx("h4",{className:"font-medium text-yellow-900 dark:text-yellow-300 mb-2",children:"Important Note"}),s.jsxs("p",{className:"text-yellow-800 dark:text-yellow-400 text-sm",children:["When you exceed your rate limit, the API will return a ",s.jsx("code",{children:"429 Too Many Requests"})," status code. Implement proper error handling and exponential backoff in your applications."]})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Response Format"}),s.jsx("p",{className:"mb-2",children:"All API responses are returned in JSON format. A typical successful response will have the following structure:"}),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm overflow-auto",children:`{ 794 "success": true, 795 "data": { 796 // Resource data 797 }, 798 "meta": { 799 // Pagination, filtering, or other metadata 800 } 801}`}),s.jsx("p",{className:"mb-2 mt-4",children:"Error responses will follow this structure:"}
vendor: 5,370 bytes, lines 801-810
801),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm overflow-auto",children:`{ 802 "success": false, 803 "error": { 804 "code": "error_code", 805 "message": "Human-readable error message", 806 "details": { 807 // Additional error context 808 } 809 } 810}`})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"API Versioning"}),s.jsx(ye,{children:"Understanding versioning and backward compatibility"})]}),s.jsxs(te,{children:[s.jsxs("p",{className:"mb-4",children:["Our API uses versioning to ensure backward compatibility as we continue to improve the platform. The version is included in the URL path, for example: ",s.jsx("code",{children:"/v1/events"})]}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Version Policy"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Major versions (v1, v2):"})," May include breaking changes and require code updates"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Minor updates:"})," Backward-compatible feature additions and improvements (not reflected in the URL)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Deprecation:"})," API versions are supported for at least 12 months after a new major version is released"]})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-4",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Best Practice"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Always specify the full version in your API calls. Avoid using unversioned endpoints as they may change without notice."})]})]})]})]}),s.jsx(Ve,{value:"authentication",className:"mt-6 space-y-6",children:s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(Ioe,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Authentication"}),s.jsx(ye,{children:"Securing your API requests"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("p",{children:"All API requests must be authenticated. We support API key authentication which you can manage from your account dashboard."}),s.jsx("h3",{className:"text-lg font-medium",children:"API Keys"}),s.jsxs("p",{className:"mb-2",children:["API keys should be passed in the ",s.jsx("code",{children:"Authorization"})," header using the Bearer scheme:"]}),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm mb-4",children:"Authorization: Bearer YOUR_API_KEY"}),s.jsxs("div",{className:"bg-red-50 dark:bg-red-950 p-4 rounded-lg border border-red-200 dark:border-red-900 mb-4",children:[s.jsx("h4",{className:"font-medium text-red-900 dark:text-red-300 mb-2",children:"Security Warning"}),s.jsx("p",{className:"text-red-800 dark:text-red-400 text-sm",children:"Never expose your API key in client-side code or public repositories. API keys provide full access to your account."})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Creating and Managing API Keys"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"Go to your account settings"}),s.jsx("li",{children:'Navigate to the "API & Integrations" tab'}),s.jsx("li",{children:'Click "Create New API Key"'}),s.jsx("li",{children:"Give your key a descriptive name and select permissions"}),s.jsx("li",{children:"Store the key securely - it will only be shown once"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Scopes and Permissions"}),s.jsx("p",{className:"mb-2",children:"When creating an API key, you can specify the scopes that determine what actions it can perform:"}),s.jsxs("table",{className:"w-full mb-4",children:[s.jsx("thead",{className:"bg-slate-100 dark:bg-slate-900",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-2 px-3 text-left",children:"Scope"}),s.jsx("th",{className:"py-2 px-3 text-left",children:"Description"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800",children:[s.jsxs("tr",{children:[s.jsx("td",{className:"py-2 px-3 font-mono text-sm",children:"events:read"}),s.jsx("td",{className:"py-2 px-3",children:"View events and bookings"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"py-2 px-3 font-mono text-sm",children:"events:write"}),s.jsx("td",{className:"py-2 px-3",children:"Create, update, and delete events"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"py-2 px-3 font-mono text-sm",children:"bookings:read"}),s.jsx("td",{className:"py-2 px-3",children:"View booking links and booking slots"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"py-2 px-3 font-mono text-sm",children:"bookings:write"}),s.jsx("td",{className:"py-2 px-3",children:"Create and update booking links"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"py-2 px-3 font-mono text-sm",children:"users:read"}),s.jsx("td",{className:"py-2 px-3",children:"Read user profile information"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"py-2 px-3 font-mono text-sm",children:"admin"}),s.jsx("td",{className:"py-2 px-3",children:"Full administrative access (teams, organization management)"})]})]})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Authentication
810Errors"}),s.jsx("p",{className:"mb-2",children:"Common authentication error responses:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1",children:[s.jsxs("li",{children:[s.jsx("code",{children:"401 Unauthorized"}),": Missing or invalid API key"]}),s.jsxs("li",{children:[s.jsx("code",{children:"403 Forbidden"}),": API key lacks the required scope for the requested action"]})]})]})]})}),s.jsx(Ve,{value:"endpoints",className:"mt-6 space-y-6",children:s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(_oe,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"API Endpoints"}),s.jsx(ye,{children:"Available resources and actions"})]})]})}),s.jsx(te,{children:s.jsxs(NX,{type:"single",collapsible:!0,className:"w-full",children:[s.jsxs(vo,{value:"events",children:[s.jsx(yo,{children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Events"}),s.jsx(pe,{variant:"outline",children:"7 endpoints"})]})}),s.jsx(bo,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"GET"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/events"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"List events for the authenticated user"}),s.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[s.jsx(pe,{variant:"secondary",className:"text-xs",children:"events:read"}),s.jsx(pe,{variant:"outline",className:"text-xs",children:"Filterable"}),s.jsx(pe,{variant:"outline",className:"text-xs",children:"Paginated"})]})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"GET"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/events/:id"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Get a single event by ID"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"events:read"})})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"POST"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/events"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Create a new event"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"events:write"})})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"PATCH"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/events/:id"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Update an existing event"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"events:write"})})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"DELETE"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/events/:id"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Delete an event"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"events:write"})})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"GET"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/events/upcoming"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Get upcoming events for the next 7 days"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"events:read"})})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"POST"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/events/:id/invite"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Send invitations for an existing event"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"events:write"})})]})]})})]}),s.jsxs(vo,{value:"bookings",children:[s.jsx(yo,{children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Booking Links"}),s.jsx(pe,{variant:"outline",children:"5 endpoints"})]})}),s.jsx(bo,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"GET"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/booking-links"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"List all booking links for the authenticated user"}),s.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[s.jsx(pe,{variant:"secondary",className:"text-xs",children:"bookings:read"}),s.jsx(pe,{variant:"outline",className:"text-xs",children:"Filterable"})]})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"GET"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/booking-links/:id"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Get a single booking link by ID"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"bookings:read"})})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"POST"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/booking-links"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Create a new booking link"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"bookings:write"})})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"PATCH"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/booking-links/:id"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Update an existing booking link"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"bookings:write"})})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"DELETE"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/booking-links/:id"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Delete a booking link"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"bookings:write"})})]})]})})]}),s.jsxs(vo,{value:"availability",children:[s.jsx(yo,{children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Availability"}),s.jsx(pe,{variant:"outline",children:"3 endpoints"})]})}),s.jsx(bo,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"GET"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/availability"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Get user's availability for a date range"}),s.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[s.jsx(pe,{variant:"secondary",className:"text-xs",children:"bookings:read"}),s.jsx(pe,{variant:"outline",className:"text-xs",children:"Requires date parameters"})]})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"GET"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/availability/team/:id"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Get team availability for a date range"}),s.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[s.jsx(pe,{variant:"secondary",className:"text-xs",children:"bookings:read"}),s.jsx(pe,{variant:"outline",className:"text-xs",children:"Requires date parameters"})]})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"POST"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/availability/block"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Block out unavailable time slots"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"events:write"})})]})]})})]}),s.jsxs(vo,{value:"users",children:[s.jsx(yo,{children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Users"}),s.jsx(pe,{variant:"outline",children:"4 endpoints"})]})}),s.jsx(bo,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"GET"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/users/me"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Get the authenticated user's profile"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"users:read"})})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"GET"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/users/:id"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Get a user's profile by ID"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"users:read"})})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"GET"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/users/team/:teamId"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"List all users in a team"}),s.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[s.jsx(pe,{variant:"secondary",className:"text-xs",children:"users:read"}),s.jsx(pe,{variant:"secondary",className:"text-xs",children:"admin"})]})]}),s.jsxs("div",{className:"border-l-4 border-primary pl-4",children:[s.jsxs("div",{className:"flex items-center",children:[s.jsx(pe,{className:"mr-2",children:"PATCH"}),s.jsx("code",{className:"font-mono text-sm",children:"/v1/users/me"})]}),s.jsx("p",{className:"text-sm mt-1 text-muted-foreground",children:"Update the authenticated user's profile"}),s.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:s.jsx(pe,{variant:"secondary",className:"text-xs",children:"users:write"})})]})]})})]})]})})]})}),s.jsx(Ve,{value:"examples",className:"mt-6 space-y-6",children:s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(gW,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Code Examples"}),s.jsx(ye,{children:"Sample API implementations"})]})]})}),s.jsxs(te,{children:[s.jsxs(Br,{defaultValue:"javascript",children:[s.jsxs(Hr,{className:"mb-4",children:[s.jsx(We,{value:"javascript",children:"JavaScript"}),s.jsx(We,{value:"python",children:"Python"}),s.jsx(We,{value:"curl",children:"cURL"})]}),s.jsx(Ve,{value:"javascript",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Fetching Events"}
810),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm overflow-auto whitespace-pre",children:`// Using fetch API 811const apiKey = 'your_api_key'; 812const baseUrl = 'https://api.smart-scheduler.ai/v1'; 813 814async function getEvents(startDate, endDate) { 815 const url = new URL(\`\${baseUrl}/events\`); 816 817 // Add query parameters 818 if (startDate) url.searchParams.append('start_date', startDate); 819 if (endDate) url.searchParams.append('end_date', endDate); 820 821 const response = await fetch(url, { 822 method: 'GET', 823 headers: { 824 'Authorization': \`Bearer \${apiKey}\`, 825 'Content-Type': 'application/json' 826 } 827 }); 828 829 if (!response.ok) { 830 const error = await response.json(); 831 throw new Error(error.error.message || 'Failed to fetch events'); 832 } 833 834 return response.json(); 835} 836 837// Example usage 838getEvents('2025-04-01', '2025-04-30') 839 .then(data => console.log(data)) 840 .catch(error => console.error(error));`})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Creating a Booking Link"}),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm overflow-auto whitespace-pre",children:`// Using async/await with fetch 841async function createBookingLink(bookingData) { 842 const response = await fetch(\`\${baseUrl}/booking-links\`, { 843 method: 'POST', 844 headers: { 845 'Authorization': \`Bearer \${apiKey}\`, 846 'Content-Type': 'application/json' 847 }, 848 body: JSON.stringify(bookingData) 849 }); 850 851 if (!response.ok) { 852 const error = await response.json(); 853 throw new Error(error.error.message || 'Failed to create booking link'); 854 } 855 856 return response.json(); 857} 858 859// Example booking data 860const bookingLinkData = { 861 title: "30-Minute Consultation", 862 description: "Book a consultation session with me", 863 duration: 30, // Minutes 864 availableDays: ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"], 865 availableHours: { 866 start: "09:00", 867 end: "17:00" 868 }, 869 timeZone: "America/New_York", 870 bufferBefore: 5, // Minutes 871 bufferAfter: 5, // Minutes 872 maxBookingsPerDay: 8 873}; 874 875createBookingLink(bookingLinkData) 876 .then(data => console.log(data)) 877 .catch(error => console.error(error));`})]})]})}),s.jsx(Ve,{value:"python",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Fetching Events (Python)"}),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm overflow-auto whitespace-pre",children:`import requests 878 879API_KEY = 'your_api_key' 880BASE_URL = 'https://api.smart-scheduler.ai/v1' 881 882def get_events(start_date=None, end_date=None): 883 """Fetch events from the API.""" 884 url = f"{BASE_URL}/events" 885 886 # Prepare query parameters 887 params = {} 888 if start_date: 889 params['start_date'] = start_date 890 if end_date: 891 params['end_date'] = end_date 892 893 # Prepare headers 894 headers = { 895 'Authorization': f'Bearer {API_KEY}', 896 'Content-Type': 'application/json' 897 } 898 899 # Make the request 900 response = requests.get(url, headers=headers, params=params) 901 902 # Check for errors 903 response.raise_for_status() 904 905 # Return the data 906 return response.json() 907 908# Example usage 909try: 910 events = get_events(start_date='2025-04-01', end_date='2025-04-30') 911 print(f"Found {len(events['data'])} events") 912 913 # Process each event 914 for event in events['data']: 915 print(f"Event: {event['title']} - {event['startTime']}") 916except requests.exceptions.RequestException as e: 917 print(f"Error fetching events: {e}") 918`})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Creating a Booking Link (Python)"}),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm overflow-auto whitespace-pre",children:`import requests 919import json 920 921def create_booking_link(booking_data): 922 """Create a new booking link.""" 923 url = f"{BASE_URL}/booking-links" 924 925 headers = { 926 'Authorization': f'Bearer {API_KEY}', 927 'Content-Type': 'application/json' 928 } 929 930 response = requests.post(url, headers=headers, json=booking_data) 931 response.raise_for_status() 932 933 return response.json() 934 935# Example booking data 936booking_link_data = { 937 "title": "30-Minute Consultation", 938 "description": "Book a consultation session with me", 939 "duration": 30, # Minutes 940 "availableDays": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"], 941 "availableHours": { 942 "start": "09:00", 943 "end": "17:00" 944 },
945 "timeZone": "America/New_York", 946 "bufferBefore": 5, # Minutes 947 "bufferAfter": 5, # Minutes 948 "maxBookingsPerDay": 8 949} 950 951try: 952 result = create_booking_link(booking_link_data) 953 print(f"Booking link created with ID: {result['data']['id']}") 954 print(f"Shareable URL: {result['data']['url']}") 955except requests.exceptions.RequestException as e: 956 print(f"Error creating booking link: {e}") 957 if hasattr(e, 'response') and e.response: 958 print(f"Response: {e.response.text}") 959`})]})]})}),s.jsx(Ve,{value:"curl",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Fetching Events (cURL)"}),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm overflow-auto whitespace-pre",children:`# Fetch events for a date range 960curl -X GET "https://api.smart-scheduler.ai/v1/events?start_date=2025-04-01&end_date=2025-04-30" \\ 961 -H "Authorization: Bearer YOUR_API_KEY" \\ 962 -H "Content-Type: application/json"`})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Creating a Booking Link (cURL)"}),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm overflow-auto whitespace-pre",children:`# Create a new booking link 963curl -X POST "https://api.smart-scheduler.ai/v1/booking-links" \\ 964 -H "Authorization: Bearer YOUR_API_KEY" \\ 965 -H "Content-Type: application/json" \\ 966 -d '{ 967 "title": "30-Minute Consultation", 968 "description": "Book a consultation session with me", 969 "duration": 30, 970 "availableDays": ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"], 971 "availableHours": { 972 "start": "09:00", 973 "end": "17:00" 974 }, 975 "timeZone": "America/New_York", 976 "bufferBefore": 5, 977 "bufferAfter": 5, 978 "maxBookingsPerDay": 8 979 }'`})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Getting User Profile (cURL)"}),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm overflow-auto whitespace-pre",children:`# Get authenticated user profile 980curl -X GET "https://api.smart-scheduler.ai/v1/users/me" \\ 981 -H "Authorization: Bearer YOUR_API_KEY" \\ 982 -H "Content-Type: application/json"`})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Checking API Limits (cURL)"}),s.jsx("pre",{className:"bg-slate-100 dark:bg-slate-900 p-3 rounded-md font-mono text-sm overflow-auto whitespace-pre",children:`# Make a request and examine rate limit headers 983curl -i -X GET "https://api.smart-scheduler.ai/v1/events" \\ 984 -H "Authorization: Bearer YOUR_API_KEY" \\ 985 -H "Content-Type: application/json"`})]})]})})]}),s.jsxs("div",{className:"mt-6",children:[s.jsx("h3",{className:"text-lg font-medium mb-2",children:"SDKs and Libraries"}),s.jsx("p",{className:"mb-4",children:"We offer officially supported client libraries to make integration even easier:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"JavaScript/TypeScript:"})," ",s.jsx("code",{className:"bg-slate-100 dark:bg-slate-900 px-2 py-1 rounded",children:"npm install @smart-scheduler/client"})]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Python:"})," ",s.jsx("code",{className:"bg-slate-100 dark:bg-slate-900 px-2 py-1 rounded",children:"pip install smart-scheduler-client"})]}),s.jsxs("li",{children:[s.jsx("strong",{children:"PHP:"})," ",s.jsx("code",{className:"bg-slate-100 dark:bg-slate-900 px-2 py-1 rounded",children:"composer require smart-scheduler/client"})]})]})]})]})]})})]})]})})]}),t&&s.jsx(Mn,{isOpen:t,onClose:()=>r(!1)})]}):s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(tr,{}),s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Login Required"}),s.jsx(ye,{children:"Please log in to access the API documentation."})]}),s.jsx(te,{children:s.jsx(Te,{href:"/login",children:s.jsx(D,{className:"w-full",children:"Log In"})})})]})})]})}function OQe(){const{user:e}=gn(),[t,r]=p.useState(!1),n=()=>{r(!0)};return e?s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dar
985k:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:n}),s.jsx("main",{className:"flex-1 overflow-y-auto bg-white dark:bg-slate-800",children:s.jsxs("div",{className:"container max-w-4xl mx-auto py-8 px-4",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx(Te,{href:"/help",children:s.jsxs(D,{variant:"ghost",className:"mb-4 pl-0 flex items-center gap-1",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Help & Support"})]})}),s.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Administrator Guide"}),s.jsx("p",{className:"text-muted-foreground",children:"Comprehensive guide for system administrators and organization managers."})]}),s.jsxs(Br,{defaultValue:"org-admin",children:[s.jsxs(Hr,{className:"grid w-full grid-cols-3",children:[s.jsx(We,{value:"org-admin",children:"Organization Admin"}),s.jsx(We,{value:"team-admin",children:"Team Management"}),s.jsx(We,{value:"security",children:"Security & Compliance"})]}),s.jsxs(Ve,{value:"org-admin",className:"mt-6 space-y-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(Eo,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Organization Administration"}),s.jsx(ye,{children:"Managing your organization"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Organization Setup"}),s.jsx("p",{children:"As an organization administrator, you're responsible for setting up and managing your organization within My Smart Scheduler."}),s.jsx("h3",{className:"text-lg font-medium",children:"Organization Profile"}),s.jsx("p",{className:"mb-2",children:"Configure your organization's profile:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:'Navigate to "Organization" in the sidebar'}),s.jsx("li",{children:'Click on "Settings"'}),s.jsxs("li",{children:["Complete your organization profile:",s.jsxs("ul",{className:"list-disc pl-6 mt-1",children:[s.jsx("li",{children:"Organization name"}),s.jsx("li",{children:"Logo and branding"}),s.jsx("li",{children:"Business hours"}),s.jsx("li",{children:"Contact information"}),s.jsx("li",{children:"Default timezone"})]})]}),s.jsx("li",{children:"Save your changes"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"User Management"}),s.jsx("p",{className:"mb-2",children:"Manage users within your organization:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"Invite new members to your organization"}),s.jsx("li",{children:"Assign roles and permissions"}),s.jsx("li",{children:"Create and manage user groups"}),s.jsx("li",{children:"Set user-specific settings"}),s.jsx("li",{children:"Deactivate or remove users"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mb-4",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Pro Tip"}),s.jsxs("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:['Use CSV import to bulk add users to your organization. Access this feature under "Organization" ',">",' "Users" ',">",' "Import Users".']})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Team Structure"}),s.jsx("p",{className:"mb-2",children:"Create and manage teams within your organization:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsxs("li",{children:['Go to "Organization" ',">",' "Teams"']}),s.jsx("li",{children:'Click "Create New Team"'}),s.jsxs("li",{children:["Set up team details:",s.jsxs("ul",{className:"list-disc pl-6 mt-1",children:[s.jsx("li",{children:"Team name and description"}),s.jsx("li",{children:"Assign team manager(s)"}),s.jsx("li",{children:"Add team members"}),s.jsx("li",{children:"Set team permissions"})]})]}),s.jsx("li",{children:"Save the team configuration"})]})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Organization Settings"}),s.jsx(ye,{children:"Configuring preferences and policies"})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Calendar Settings"}),s.jsx("p",{className:"mb-2",children:"Configure organization-wide calendar settings:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"Default meeting duration"}),s.jsx("li",{children:"Working hours and days"}),s.jsx("li",{children:"Holiday calendar"}),s.jsx("li",{children:"Resource scheduling policies"}),s.jsx("li",{children:"Booking restrictions"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Integration Management"}),s.jsx("p",{className:"mb-2",children:"Set up and manage organization-wide integrations:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"Email service integration"}),s.jsx("li",{children:"Single Sign-On (SSO) configuration"}),s.jsx("li",{children:"Directory service integration (e.g., Active Directory, LDAP)"}),s.jsx("li",{children:"CRM and project management tool connections"}),s.jsx("li",{children:"Custom API integrations"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Billing and Subscription"}),s.jsx("p",{className:"mb-2",children:"Manage your organization's subscription:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"View current subscription plan"}),s.jsx("li",{children:"Update payment information"}),s.jsx("li",{children:"View billing history and invoices"}),s.jsx("li",{children:"Upgrade or downgrade subscription plan"}),s.jsx("li",{children:"Manage user licenses"})]}),s.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-950 p-4 rounded-lg border border-yellow-200 dark:border-yellow-900 mt-4",children:[s.jsx("h4",{className:"font-medium text-yellow-900 dark:text-yellow-300 mb-2",children:"Important Note"}),s.jsx("p",{className:"text-yellow-800 dark:text-yellow-400 text-sm",children:"Changes to your subscription plan will take effect at the start of the next billing cycle. Contact [email protected] for immediate changes or special arrangements."})]})]})]})]}),s.jsxs(Ve,{value:"team-admin",className:"mt-6 space-y-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(ir,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Team Management"}),s.jsx(ye,{children:"Managing teams and members"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Team Manager Responsibilities"}),s.jsx("p",{children:"As a team manager, you're responsible for coordinating your team's scheduling, availability, and calendar management within My Smart Scheduler."}),s.jsx("h3",{className:"text-lg font-medium",children:"Team Dashboard"}),s.jsx("p",{className:"mb-2",children:"The Team Dashboard provides an overview of your team's activities:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"Team member availability"}),s.jsx("li",{children:"Upcoming team events"}),s.jsx("li",{children:"Booking statistics"}),s.jsx("li",{children:"Team scheduling conflicts"}),s.jsx("li",{children:"Resource allocation"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Member Management"}),s.jsx("p",{className:"mb-2",children:"Manage your team members:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mb-4",children:[s.jsxs("li",{children:['Go to "Team" ',">",' "Members" in the sidebar']}),s.jsx("li",{children:'Add new members by clicking "Add Member"'}),s.jsx("li",{children:"Assign roles and permissions"}),s.jsx("li",{children:"Set individual availability preferences"}),s.jsx("li",{children:"Manage booking permissions"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mb-4",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Best Practice"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Regularly review your team's composition and roles to ensure that permissions are appropriate and up-to-date as responsibilities change."})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Team Scheduling"}),s.jsx("p",{className:"mb-2",children:"Coordinate team scheduling and availability:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Create team events and meetings"}),s.jsx("li",{children:"Set up recurring team sync meetings"}),s.jsx("li",{children:"Manage team availability hours"}),s.jsx("li",{children:"Handle scheduling conflicts"}),s.jsx("li",{children:"Create team booking links for external appointments"})]})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Team Booking Links"}),s.jsx(ye,{children:"Setting up shared scheduling options"})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Creating Team Booking Links"}),s.jsx("p",{className:"mb-2",children:"Team booking links allow external parties to schedule meetings with your team:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mb-4",children:[s.jsxs("li",{children:['Navigate to "Team" ',">",' "Booking Links"']}),s.jsx("li",{children:'Click "Create Team Booking Link"'}),s.jsxs("li",{children:["Configure the booking link:",s.jsxs("ul",{className:"list-disc pl-6 mt-1",children:[s.jsx("li",{children:"Title and description"}),s.jsx("li",{children:"Duration options"}),s.jsx("li",{children:"Select team members to include"}),s.jsx("li",{children:"Set availability windows"}),s.jsx("li",{children:"Configure assignment method (round-robin, first available, etc.)"})]})]}),s.jsx("li",{children:"Save and share the booking link"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Assignment Methods"}),s.jsx("p",{className:"mb-2",children:"Choose how bookings are assigned to team members:"}),s.jsxs("table",{className:"w-full mb-4",children:[s.jsx("thead",{className:"bg-slate-100 dar
985k:bg-slate-900",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-2 px-3 text-left",children:"Method"}),s.jsx("th",{className:"py-2 px-3 text-left",children:"Description"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-800",children:[s.jsxs("tr",{children:[s.jsx("td",{className:"py-2 px-3",children:"Round Robin"}),s.jsx("td",{className:"py-2 px-3",children:"Distributes bookings evenly among team members in rotation"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"py-2 px-3",children:"Pooled"}),s.jsx("td",{className:"py-2 px-3",children:"Assigns to any available team member (first available)"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"py-2 px-3",children:"Specific Member"}),s.jsx("td",{className:"py-2 px-3",children:"Allows assignment to a designated team member"})]})]})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Monitoring Team Bookings"}),s.jsx("p",{className:"mb-2",children:"Stay informed about team booking activities:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"View all upcoming team bookings in the dashboard"}),s.jsx("li",{children:"Monitor distribution of bookings among team members"}),s.jsx("li",{children:"Set up notifications for new bookings"}),s.jsx("li",{children:"Review booking performance metrics"}),s.jsx("li",{children:"Identify scheduling bottlenecks"})]})]})]})]}),s.jsxs(Ve,{value:"security",className:"mt-6 space-y-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(LE,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Security & Compliance"}),s.jsx(ye,{children:"Maintaining security and regulatory compliance"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Security Features"}),s.jsx("p",{children:"My Smart Scheduler offers robust security features to protect your organization's data:"}),s.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),s.jsx("p",{className:"mb-2",children:"SmartScheduler uses secure session-based authentication:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"Secure email and password authentication"}),s.jsx("li",{children:"Session management with automatic expiry"}),s.jsx("li",{children:"Admin ability to verify user emails"}),s.jsx("li",{children:"Password reset functionality via email"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mb-4",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Security Best Practice"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Encourage all users to use strong, unique passwords and keep their account credentials secure."})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Data Privacy Settings"}),s.jsx("p",{className:"mb-2",children:"Configure data privacy settings:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Event visibility controls"}),s.jsx("li",{children:"Personal information sharing preferences"}),s.jsx("li",{children:"Data retention policies"}),s.jsx("li",{children:"Anonymization options"}),s.jsx("li",{children:"Consent management"})]})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Compliance Management"}),s.jsx(ye,{children:"Meeting regulatory requirements"})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Data Privacy"}),s.jsx("p",{className:"mb-2",children:"SmartScheduler is designed with privacy in mind:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Data Control:"})," User data is stored securely and can be exported or deleted"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Access Controls:"})," Role-based permissions ensure users only see what they need"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Audit Logging:"})," Track user actions and changes for accountability"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Secure Storage:"})," All data is encrypted at rest and in transit"]})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Audit Logs"}),s.jsx("p",{className:"mb-2",children:"Comprehensive audit logging for compliance purposes:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"User access logs"}),s.jsx("li",{children:"Data modification history"}),s.jsx("li",{children:"Administrator actions"}),s.jsx("li",{children:"Security-related events"}),s.jsx("li",{children:"Export and reporting capabilities"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-4",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Audit Log Access"}),s.jsxs("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:["Access the audit log from Admin Center ",">"," Audit Log tab to review user activities, login events, and system changes."]})]})]})]})]})]})]})})]}),t&&s.jsx(Mn,{isOpen:t,onClose:()=>r(!1)})]}):s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(tr,{}),s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Login Required"}),s.jsx(ye,{children:"Please log in to access the administrator guide."})]}),s.jsx(te,{children:s.jsx(Te,{href:"/login",children:s.jsx(D,{className:"w-full",children:"Log In"})})})]})})]})}function AQe(){const{user:e}=gn(),[t,r]=p.useState(!1),n=()=>{r(!0)};return e?s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dar
985k:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:n}),s.jsx("main",{className:"flex-1 overflow-y-auto bg-white dark:bg-slate-800",children:s.jsxs("div",{className:"container max-w-4xl mx-auto py-8 px-4",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx(Te,{href:"/help",children:s.jsxs(D,{variant:"ghost",className:"mb-4 pl-0 flex items-center gap-1",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Help & Support"})]})}),s.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Getting Started Guide"}),s.jsx("p",{className:"text-muted-foreground",children:"Welcome to My Smart Scheduler! This guide will help you get up and running with the basic features."})]}),s.jsxs(Br,{defaultValue:"account-setup",children:[s.jsxs(Hr,{className:"grid w-full grid-cols-5",children:[s.jsx(We,{value:"account-setup",children:"Account Setup"}),s.jsx(We,{value:"calendar",children:"Calendar Basics"}),s.jsx(We,{value:"booking",children:"Booking Links"}),s.jsx(We,{value:"notifications",children:"Notifications"}),s.jsx(We,{value:"more-features",children:"More Features"})]}),s.jsxs(Ve,{value:"account-setup",className:"mt-6 space-y-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(yl,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Setting Up Your Account"}),s.jsx(ye,{children:"Complete your profile and preferences"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"1. Complete Your Profile"}),s.jsx("p",{children:"Start by filling out your profile information to help others identify you when scheduling meetings."}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"Click on your profile icon in the top-right corner"}),s.jsx("li",{children:'Select "Profile" from the dropdown'}),s.jsx("li",{children:"Add your profile picture, display name, and bio"}),s.jsx("li",{children:"Save your changes"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"2. Set Your Timezone"}),s.jsx("p",{children:"Setting your timezone correctly ensures that all events and bookings appear at the proper times."}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:'Go to "Availability" in the sidebar'}),s.jsx("li",{children:"Look for the Timezone Settings card"}),s.jsx("li",{children:"Select your preferred timezone from the dropdown menu"}),s.jsx("li",{children:'Click "Save Changes"'})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Pro Tip"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Your timezone affects how your availability is displayed to people booking meetings with you. They'll initially see times in your timezone but can switch to their local timezone."})]})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Organization and Team Setup"}),s.jsx(ye,{children:"For company administrators and team managers"})]}),s.jsxs(te,{children:[s.jsxs("div",{className:"mb-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"For Company Administrators"}),s.jsx("p",{className:"mb-2",children:"If you're a company administrator, you can set up your organization:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:'Navigate to "Admin Center" in the sidebar (bottom section)'}),s.jsx("li",{children:'Click on "Organizations" tab to manage organizations'}),s.jsx("li",{children:"Create teams from the Organizations view"}),s.jsx("li",{children:'Invite members through the "Users" tab'})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium",children:"For Team Managers"}),s.jsx("p",{className:"mb-2",children:"If you're a team manager, you can set up your team:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:"Access your Team Dashboard (you'll be redirected automatically when assigned as a team manager)"}),s.jsx("li",{children:"View and manage team members from the dashboard"}),s.jsx("li",{children:"Set up team availability and working hours"}),s.jsx("li",{children:"Create team booking links from the Scheduling page"})]})]})]})]})]}),s.jsxs(Ve,{value:"calendar",className:"mt-6 space-y-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(Gt,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Calendar Basics"}),s.jsx(ye,{children:"Managing your events and calendar"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Navigating the Calendar"}),s.jsx("p",{className:"mb-2",children:"The calendar view is your central hub for managing all events and appointments:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"Toggle between day, week, and month views"}),s.jsx("li",{children:"Navigate between dates using the date picker or arrows"}),s.jsx("li",{children:"Click on any time slot to create a new event"}),s.jsx("li",{children:"Click on an existing event to view, edit, or delete it"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Creating Events"}),s.jsx("p",{className:"mb-2",children:"You can create new events in several ways:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:'Click the "Create Event" button in the sidebar'}),s.jsx("li",{children:"Click on any empty time slot in the calendar"}),s.jsx("li",{children:"Use the quick-create shortcut (Ctrl/Cmd + N)"})]}),s.jsx("p",{children:"When creating an event, you can specify details like title, description, location, time, duration, and participants."}),s.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-950 p-4 rounded-lg border border-yellow-200 dark:border-yellow-900 mb-4",children:[s.jsx("h4",{className:"font-medium text-yellow-900 dark:text-yellow-300 mb-2",children:"Important Note"}),s.jsx("p",{className:"text-yellow-800 dark:text-yellow-400 text-sm",children:"Events created in SmartScheduler can be synced with external
985calendars like Google Calendar and Microsoft Outlook after connecting your accounts in the Integrations section."})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Calendar Integrations"}),s.jsx("p",{className:"mb-2",children:"Connect your external calendars to keep everything in sync:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:'Go to "Integrations" in the sidebar'}),s.jsx("li",{children:'Click "Connect" next to the calendar service you want to use'}),s.jsx("li",{children:"Follow the authentication process"}),s.jsx("li",{children:"Select which calendars to sync and set sync preferences"})]})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Advanced Calendar Features"}),s.jsx(ye,{children:"Getting the most out of your calendar"})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Filtering and Views"}),s.jsx("p",{className:"mb-4",children:"Customize what you see in your calendar to focus on what matters:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"Filter events by team, organization, or event type"}),s.jsx("li",{children:"Toggle visibility of specific calendars"}),s.jsx("li",{children:"Use the agenda view for a list-based overview of upcoming events"}),s.jsx("li",{children:"Apply color coding to different event categories for visual organization"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Recurring Events"}),s.jsx("p",{className:"mb-2",children:"Set up recurring events for regular meetings:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:"Create a new event or edit an existing one"}),s.jsx("li",{children:'Enable the "Repeat" option'}),s.jsx("li",{children:"Select recurrence pattern (daily, weekly, monthly, etc.)"}),s.jsx("li",{children:"Set an end date or number of occurrences"}),s.jsx("li",{children:"Configure exceptions if needed"})]})]})]})]}),s.jsxs(Ve,{value:"booking",className:"mt-6 space-y-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(Lf,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Booking Links"}),s.jsx(ye,{children:"Let others schedule time with you"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Creating Your First Booking Link"}),s.jsx("p",{className:"mb-2",children:"Booking links let others schedule time with you without the back-and-forth:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:'Navigate to "Scheduling" in the sidebar'}),s.jsx("li",{children:'Click "Create New Booking Link"'}),s.jsx("li",{children:"Set a title and description for your booking type"}),s.jsx("li",{children:"Define the duration of meetings"}),s.jsx("li",{children:"Set your availability (days and hours)"}),s.jsx("li",{children:"Configure buffer times between meetings if needed"}),s.jsx("li",{children:"Save and share your booking link"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mb-4",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Pro Tip"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Create different booking links for different purposes (e.g., 15-min quick calls, 30-min consultations, 60-min in-depth meetings) to streamline your scheduling process."})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Customizing Booking Experience"}),s.jsx("p",{className:"mb-2",children:"Tailor how others interact with your booking page:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Add a custom form to collect information before booking"}),s.jsx("li",{children:"Set minimum advance notice (e.g., no bookings less than 24 hours in advance)"}),s.jsx("li",{children:"Limit the number of meetings per day"}),s.jsx("li",{children:"Customize confirmation and reminder messages"}),s.jsx("li",{children:"Add your logo and brand colors to the booking page"})]})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Managing Bookings"}),s.jsx(ye,{children:"Handle incoming appointments effectively"})]}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Reviewing and Responding to Bookings"}),s.jsx("p",{className:"mb-4",children:"Stay on top of your scheduled appointments:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:'View all upcoming bookings in the "Scheduled Events" section'}),s.jsx("li",{children:"Receive email notifications for new bookings"}),s.jsx("li",{children:"Accept or reschedule appointments as needed"}),s.jsx("li",{children:"Access pre-meeting questionnaire responses from bookers"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Team Booking Pages"}),s.jsx("p",{className:"mb-2",children:"If you're a team manager, you can set up team booking options:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:'Go to "Scheduling" in the sidebar'}),s.jsx("li",{children:'Click "Create New Booking Link"'}),s.jsx("li",{children:'Enable "Team Booking" option in the booking link settings'}),s.jsx("li",{children:"Select team members to include in the booking link"}),s.jsx("li",{children:"Choose assignment method: Round-robin, Pooled (any available), or Specific member"}),s.jsx("li",{children:"Save and share your team booking link"})]})]})]})]}),s.jsxs(Ve,{value:"notifications",className:"mt-6 space-y-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(AE,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Notifications & Reminders"}),s.jsx(ye,{children:"Stay on top of your schedule"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Setting Up Notifications"}),s.jsx("p",{className:"mb-2",children:"Configure how and when you receive notifications:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:'Go to "Settings" in the sidebar'}),s.jsx("li",{children:'Navigate to the "Notifications" tab'}),s.jsx("li",{children:"Choose notification channels (email, in-app)"}),s.jsx("li",{children:"Select which events trigger notifications"}),s.jsx("li",{children:"Set notification timing preferences"}),s.jsx("li",{children:"Save your settings"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Configuring Event Reminders"}),s.jsx("p",{className:"mb-2",children:"Never miss a meeting with customized reminders:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:"Default reminders can be set globally in Settings"}),s.jsx("li",{children:"Custom reminders can be set for individual events"}),s.jsx("li",{children:"Configure multiple reminders (e.g., 1 day before, 1 hour before)"}),s.jsx("li",{children:"Choose reminder delivery methods (email, in-app notification)"})]}),s.jsxs("div",{className:"bg-green-50 dark:bg-green-950 p-4 rounded-lg border border-green-200 dark:border-green-900",children:[s.jsx("h4",{className:"font-medium text-green-900 dark:text-green-300 mb
985-2",children:"Best Practice"}),s.jsx("p",{className:"text-green-800 dark:text-green-400 text-sm",children:"Set up at least two reminders for important meetings: one the day before to help you prepare, and another 15-30 minutes before to make sure you're ready to join."})]})]})]}),s.jsxs(X,{children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Next Steps"}),s.jsx(ye,{children:"Keep exploring SmartScheduler's features"})]}),s.jsxs(te,{children:[s.jsx("p",{className:"mb-4",children:"Now that you've mastered the basics, here are some advanced features to explore:"}),s.jsxs("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h3",{className:"font-medium mb-2",children:"Calendar Integrations"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Connect with Google Calendar, Outlook, and more"}),s.jsx(Te,{href:"/integrations",children:s.jsx(D,{variant:"outline",size:"sm",children:"Go to Integrations"})})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h3",{className:"font-medium mb-2",children:"Team Management"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Set up teams and manage group scheduling"}),s.jsx(Te,{href:"/team",children:s.jsx(D,{variant:"outline",size:"sm",children:"Explore Team Features"})})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h3",{className:"font-medium mb-2",children:"Advanced Booking Rules"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Create sophisticated availability rules"}),s.jsx(Te,{href:"/booking",children:s.jsx(D,{variant:"outline",size:"sm",children:"Booking Settings"})})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h3",{className:"font-medium mb-2",children:"Tutorials & Guides"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Dive deeper with step-by-step tutorials"}),s.jsx(Te,{href:"/help?tab=tutorials",children:s.jsx(D,{variant:"outline",size:"sm",children:"View Tutorials"})})]})]})]})]})]}),s.jsxs(Ve,{value:"more-features",className:"mt-6 space-y-6",children:[s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(jh,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Meeting Polls"}),s.jsx(ye,{children:"Find the best time for group meetings"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Creating a Meeting Poll"}),s.jsx("p",{className:"mb-2",children:"Meeting polls help you find the best time when scheduling with multiple people:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:'Navigate to "Meeting Polls" in the sidebar'}),s.jsx("li",{children:'Click "Create New Poll"'}),s.jsx("li",{children:"Add a title and description for your meeting"}),s.jsx("li",{children:"Select multiple date and time options for participants to vote on"}),s.jsx("li",{children:"Set an optional deadline for voting"}),s.jsx("li",{children:"Share the poll link with participants"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Managing Poll Results"}),s.jsx("p",{className:"mb-2",children:"Track responses and finalize meeting times:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"View voting results in real-time"}),s.jsx("li",{children:"See which time slots have the most availability"}),s.jsx("li",{children:"Close the poll and select the final time"}),s.jsx("li",{children:"Notify participants of the selected time"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Pro Tip"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Include more time options than you think you need - this increases the chances of finding a time that works for everyone."})]})]})]}),s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(yh,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Routing Forms"}),s.jsx(ye,{children:"Direct visitors to the right booking link"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Creating a Routing Form"}),s.jsx("p",{className:"mb-2",children:"Routing forms let you ask qualifying questions and direct visitors to different booking links based on their answers:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:'Navigate to "Routing" in the sidebar'}),s.jsx("li",{children:'Click "Create New Routing Form"'}),s.jsx("li",{children:"Add a title and description"}),s.jsx("li",{children:"Create questions with multiple choice options"}),s.jsx("li",{children:"Set up routing rules for each answer"}),s.jsx("li",{children:"Share the routing form link"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Routing Options"}),s.jsx("p",{className:"mb-2",children:"Based on answers, you can:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Redirect to a specific booking link"}),s.jsx("li",{children:"Redirect to an external URL"}),s.jsx("li",{children:"Display a custom message"}),s.jsx("li",{children:"Show different booking options based on needs"})]}),s.jsxs("div",{className:"bg-green-50 dark:bg-green-950 p-4 rounded-lg border border-green-200 dark:border-green-900",children:[s.jsx("h4",{className:"font-medium text-green-900 dark:text-green-300 mb
985-2",children:"Use Case"}),s.jsx("p",{className:"text-green-800 dark:text-green-400 text-sm",children:"Use routing forms to qualify leads before booking - ask about their needs, budget, or timeline to ensure they book with the right team member."})]})]})]}),s.jsxs(X,{children:[s.jsx(ue,{children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"mr-4 bg-primary/10 p-2 rounded-full",children:s.jsx(ir,{className:"h-6 w-6 text-primary"})}),s.jsxs("div",{children:[s.jsx(fe,{children:"Contacts"}),s.jsx(ye,{children:"Manage your booking contacts"})]})]})}),s.jsxs(te,{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Viewing Your Contacts"}),s.jsx("p",{className:"mb-2",children:"SmartScheduler automatically creates contact records when people book meetings with you:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mb-4",children:[s.jsx("li",{children:'Navigate to "Contacts" in the sidebar'}),s.jsx("li",{children:"View all contacts who have booked with you"}),s.jsx("li",{children:"Search contacts by name or email"}),s.jsx("li",{children:"Click on a contact to see their booking history"})]}),s.jsx("h3",{className:"text-lg font-medium",children:"Contact Information"}),s.jsx("p",{className:"mb-2",children:"For each contact, you can view:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Contact details (name, email)"}),s.jsx("li",{children:"Total number of bookings"}),s.jsx("li",{children:"Booking history with dates and times"}),s.jsx("li",{children:"Whether they're a repeat booker"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Pro Tip"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Review your contacts regularly to identify repeat bookers and build stronger relationships with your most engaged clients."})]})]})]})]})]})]})})]}),t&&s.jsx(Mn,{isOpen:t,onClose:()=>r(!1)})]}):s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx(tr,{}),s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs(X,{className:"w-full max-w-md",children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Login Required"}),s.jsx(ye,{children:"Please log in to access the documentation."})]}),s.jsx(te,{children:s.jsx(Te,{href:"/login",children:s.jsx(D,{className:"w-full",children:"Log In"})})})]})})]})}function DQe(){const[e,t]=p.useState(""),r=n=>{n.preventDefault(),console.log("Searching for:",e)};return s.jsxs("div",{className:"container max-w-5xl mx-auto py-8 px-4 mb-20",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx(Te,{href:"/help",children:s.jsxs(D,{variant:"ghost",className:"mb-4 pl-0 flex items-center gap-1",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Help & Support"})]})}),s.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Knowledge Base"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Detailed articles and guides to help you get the most out of SmartScheduler."}),s.jsxs("form",{onSubmit:r,className:"relative mb-6",children:[s.jsx(jo,{className:"absolute left-3 top-3 h-5 w-5 text-muted-foreground"}),s.jsx(ie,{className:"pl-10 pr-16",placeholder:"Search the knowledge base...",value:e,onChange:n=>t(n.target.value)}),s.jsx(D,{type:"submit",size:"sm",className:"absolute right-2 top-2",children:"Search"})]}),s.jsxs(Rr,{className:"mb-6",children:[s.jsx(IE,{className:"h-4 w-4"}),s.jsx(fl,{children:"Knowledge Base Under Development"}),s.jsxs($r,{children:["We're actively building out detailed articles for each topic. In the meantime, check out our comprehensive guides: ",s.jsx(Te,{href:"/help/documentation/GettingStartedGuide",className:"text-primary hover:underline font-medium",children:"Getting Started Guide"})," and"," ",s.jsx(Te,{href:"/help/documentation/AdminGuide",className:"text-primary hover:underline font-medium",children:"Administrator Guide"}),"."]})]})]}),s.jsxs(Br,{defaultValue:"popular",children:[s.jsxs(Hr,{className:"mb-6",children:[s.jsx(We,{value:"popular",children:"Popular Articles"}),s.jsx(We,{value:"scheduling",children:"Scheduling"}),s.jsx(We,{value:"booking",children:"Booking Links"}),s.jsx(We,{value:"integrations",children:"Integrations"})]}),s.jsxs(Ve,{value:"popular",className:"space-y-6",children:[s.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[s.jsx(Te,{href:"/help/documentation/article/calendar-integrations",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx(fe,{className:"text-lg",children:"Connecting Your External C
985alendars"}),s.jsx(pe,{children:"Popular"})]}),s.jsx(ye,{children:"Learn how to sync with Google, Outlook, and more"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Ei,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"5 min read"})]}),s.jsx(Zr,{className:"h-4 w-4 text-muted-foreground"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/troubleshooting-calendar",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx(fe,{className:"text-lg",children:"Troubleshooting Calendar Issues"}),s.jsx(pe,{children:"Popular"})]}),s.jsx(ye,{children:"Solve common syncing and display problems"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Kw,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"7 min read"})]}),s.jsx(Zr,{className:"h-4 w-4 text-muted-foreground"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/creating-booking-links",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx(fe,{className:"text-lg",children:"Creating Effective Booking Links"}),s.jsx(pe,{children:"Popular"})]}),s.jsx(ye,{children:"Design booking links that maximize conversions"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Lf,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"8 min read"})]}),s.jsx(Zr,{className:"h-4 w-4 text-muted-foreground"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/getting-started-teams",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsx(fe,{className:"text-lg",children:"Team Scheduling Basics"}),s.jsx(pe,{children:"Popular"})]}),s.jsx(ye,{children:"Coordinate scheduling across team members"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(ir,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"6 min read"})]}),s.jsx(Zr,{className:"h-4 w-4 text-muted-foreground"})]})})]})})]}),s.jsx("h2",{className:"text-xl font-semibold mt-8 mb-4",children:"Recently Updated"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(Te,{href:"/help/documentation/article/new-google-calendar-integration",children:s.jsxs("div",{className:"border rounded-lg p-4 cursor-pointer hover:bg-accent/50 hover:border-accent-foreground/20 transition-colors",children:[s.jsxs("div",{className:"flex justify-between mb-1",children:[s.jsx("h3",{className:"font-medium",children:"Google Calendar OAuth Changes (Updated)"}),s.jsx(pe,{variant:"outline",children:"New"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Important changes to Google Calendar integration requirements"}),s.jsxs("div",{className:"flex items-center text-xs text-muted-foreground",children:[s.jsx(Ei,{className:"mr-1 h-3 w-3"}),s.jsx("span",{children:"Updated 2 days ago ⢠4 min read"})]})]})}),s.jsx(Te,{href:"/help/documentation/article/custom-booking-forms",children:s.jsxs("div",{className:"border rounded-lg p-4 cursor-pointer hover:bg-accent/50 hover:border-accent-foreground/20 transition-colors",children:[s.jsxs("div",{className:"flex justify-between mb-1",children:[s.jsx("h3",{className:"font-medium",children:"Custom Booking Form Fields"}),s.jsx(pe,{variant:"outline",children:"Updated"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"New capabilities for collecting information during booking"}),s.jsxs("div",{className:"flex items-center text-xs text-muted-foreground",children:[s.jsx(yf,{className:"mr-1 h-3 w-3"}),s.jsx("span",{children:"Updated 5 days ago ⢠5 min read"})]})]})}),s.jsx(Te,{href:"/help/documentation/article/timezone-management",children:s.jsxs("div",{className:"border rounded-lg p-4 cursor-pointer hover:bg-accent/50 hover:border-accent-foreground
985/20 transition-colors",children:[s.jsxs("div",{className:"flex justify-between mb-1",children:[s.jsx("h3",{className:"font-medium",children:"Managing Time Zones Effectively"}),s.jsx(pe,{variant:"outline",children:"Updated"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Best practices for scheduling across multiple time zones"}),s.jsxs("div",{className:"flex items-center text-xs text-muted-foreground",children:[s.jsx(dr,{className:"mr-1 h-3 w-3"}),s.jsx("span",{children:"Updated 1 week ago ⢠6 min read"})]})]})})]})]}),s.jsx(Ve,{value:"scheduling",className:"space-y-6",children:s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[s.jsx(Te,{href:"/help/documentation/article/create-first-event",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Creating Your First Event"}),s.jsx(ye,{children:"Learn how to create and manage calendar events"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Si,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"4 min read"})]}),s.jsx(pe,{children:"Beginner"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/recurring-events",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Managing Recurring Events"}),s.jsx(ye,{children:"Set up repeating meetings and appointments"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Si,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"5 min read"})]}),s.jsx(pe,{children:"Intermediate"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/calendar-views",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Calendar View Options"}),s.jsx(ye,{children:"Customize how you view your calendar"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Si,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"3 min read"})]}),s.jsx(pe,{children:"Beginner"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/event-notifications",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Event Notifications"}),s.jsx(ye,{children:"Configure reminders and notifications"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(AE,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"4 min read"})]}),s.jsx(pe,{children:"Beginner"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/advanced-scheduling",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Advanced Scheduling"}),s.jsx(ye,{children:"Master complex scheduling scenarios"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Si,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"8 min read"})]}),s.jsx(pe,{children:"Advanced"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/timezone-handling",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Time Zone Management"}),s.jsx(ye,{children:"Scheduling across different time zones"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(dr,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"6 min read"})]}),s.jsx(pe,{children:"Intermediate"})]})})]})})]})}),s.jsxs(Ve,{value:"booking",className:"space-y-6",children:[s.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Booking Link Basics"}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[s.jsx(Te,{href:"/help/documentation/article/booking-link-setup",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Creating Booking Links"}),s.jsx(ye,{children:"Set up your first scheduling page"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Lf,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"5 min read"})]}),s.jsx(pe,{children:"Beginner"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/availability-settings",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Availability Settings"}),s.jsx(ye,{children:"Define when people can book with you"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(dr,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"7 min read"})]}),s.jsx(pe,{children:"Intermediate"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/scheduling-policies",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Booking Policies"}),s.jsx(ye,{children:"Set rules for scheduling and cancellations"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(yf,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"6 min read"})]}),s.jsx(pe,{children:"Intermediate"})]})})]})})]}),s.jsx("h2",{className:"text-xl font-semibold mt-8 mb-4",children:"Advanced Booking Features"}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[s.jsx(Te,{href:"/help/documentation/article/booking-forms",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Custom Booking Forms"}),s.jsx(ye,{children:"Create forms to gather information"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(yf,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"8 min read"})]}),s.jsx(pe,{children:"Advanced"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/team-booking",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Team Booking Pages"}),s.jsx(ye,{children:"Coordinate scheduling across a team"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(ir,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"9 min read"})]}),s.jsx(pe,{children:"Advanced"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/booking-page-customization",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Customizing Booking Pages"}),s.jsx(ye,{children:"Brand and style your scheduling pages"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(yf,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"7 min read"})]}),s.jsx(pe,{children:"Intermediate"})]})})]})})]})]}),s.jsxs(Ve,{value:"integrations",className:"space-y-6",children:[s.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Calendar Integrations"}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[s.jsx(Te,{href:"/help/documentation/article/google-calendar-integration",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Google Calendar"}),s.jsx(ye,{children:"Connect and sync with Google Calendar"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Ei,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"6 min read"})]}),s.jsx(pe,{children:"Beginner"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/outlook-integration",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Microsoft Outlook"}),s.jsx(ye,{children:"Connect and sync with Outlook Calendar"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Ei,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"6 min read"})]}),s.jsx(pe,{children:"Beginner"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/ical-integration",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"iCal Integration"}),s.jsx(ye,{children:"Connect and sync using iCal feeds"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Ei,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"5 min read"})]}),s.jsx(pe,{children:"Intermediate"})]})})]})})]}),s.jsx("h2",{className:"text-xl font-semibold mt-8 mb-4",children:"Other Integrations"}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[s.jsx(Te,{href:"/help/documentation/article/video-conferencing-integrations",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Video Conferencing"}),s.jsx(ye,{children:"Zoom, Teams, Google Meet, and more"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Si,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"7 min read"})]}),s.jsx(pe,{children:"Intermediate"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/crm-integrations",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"CRM Integrations"}),s.jsx(ye,{children:"Connect to Salesforce, HubSpot, and more"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Si,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"8 min read"})]}),s.jsx(pe,{children:"Advanced"})]})})]})}),s.jsx(Te,{href:"/help/documentation/article/zapier-webhook-integrations",children:s.jsxs(X,{className:"cursor-pointer hover:shadow-md transition-shadow h-full",children:[s.jsxs(ue,{className:"pb-2",children:[s.jsx(fe,{className:"text-lg",children:"Zapier & Webhooks"}),s.jsx(ye,{children:"Automate workflows with custom integrations"})]}),s.jsx(te,{children:s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsx(Si,{className:"mr-1 h-4 w-4"}),s.jsx("span",{children:"10 min read"})]}),s.jsx(pe,{children:"Advanced"})]})})]})})]})]})]})]})}function MQe(){const[,e]=Fae("/help/documentation/article/:articleId"),t=(e==null?void 0:e.articleId)||"",[r,n]=p.useState(null),[a,i]=p.useState(!0);return p.useEffect(()=>{i(!0),setTimeout(()=>{n({title:"Article: "+decodeURIComponent(t).replace(/-/g," "),content:` 986 <div> 987 <p class="lead mb-4">This is a sample article page that demonstrates how articles would be displayed.</p> 988 <p class="mb-4">In a production environment, the content for "<strong>${decodeURIComponent(t).replace(/-/g," ")}</strong>" would be loaded from a content management system or database.</p> 989 <h2 class="text-xl font-semibold mb-2 mt-6">Article Details</h2> 990 <p class="mb-4">This page is designed to show how dynamic article pages would work in the knowledge base system. The actual content would include comprehensive information on the requested topic.</p> 991 <h2 class="text-xl font-semibold mb-2 mt-6">Related Resources</h2> 992 <ul class="list-disc pl-6 mb-6 space-y-2"> 993 <li><a href="/help/documentation/KnowledgeBase" class="text-primary hover:underline">Return to Knowledge Base</a></li> 994 <li><a href="/help/documentation/GettingStartedGuide" class="text-primary hover:underline">
994Getting Started Guide</a></li> 995 <li><a href="/help" class="text-primary hover:underline">Help & Support Home</a></li> 996 </ul> 997 </div> 998 `,createdAt:new Date().toLocaleDateString(),updatedAt:new Date().toLocaleDateString(),readTime:"5 min read"}),i(!1)},800)},[t]),s.jsxs("div",{className:"container max-w-3xl mx-auto py-8 px-4 mb-20",children:[s.jsx(Te,{href:"/help/documentation/KnowledgeBase",children:s.jsxs(D,{variant:"ghost",className:"mb-4 pl-0 flex items-center gap-1",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Knowledge Base"})]})}),a?s.jsxs(s.Fragment,{children:[s.jsx(Ls,{className:"h-10 w-3/4 mb-4"}),s.jsx(Ls,{className:"h-5 w-full mb-2"}),s.jsx(Ls,{className:"h-5 w-full mb-2"}),s.jsx(Ls,{className:"h-5 w-3/4 mb-6"}),s.jsx(Ls,{className:"h-8 w-2/3 mb-4"}),s.jsx(Ls,{className:"h-5 w-full mb-2"}),s.jsx(Ls,{className:"h-5 w-full mb-2"}),s.jsx(Ls,{className:"h-5 w-5/6 mb-6"}),s.jsx(Ls,{className:"h-8 w-1/2 mb-4"}),s.jsx(Ls,{className:"h-5 w-1/3 mb-2"}),s.jsx(Ls,{className:"h-5 w-1/2 mb-2"}),s.jsx(Ls,{className:"h-5 w-2/5 mb-6"})]}):r?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"border-b pb-4 mb-6",children:[s.jsx("h1",{className:"text-3xl font-bold mb-2",children:r.title}),s.jsxs("div",{className:"flex items-center text-sm text-muted-foreground",children:[s.jsxs("span",{children:["Updated: ",r.updatedAt]}),s.jsx("span",{className:"mx-2",children:"â¢"}),s.jsx("span",{children:r.readTime})]})]}),s.jsx("div",{className:"prose dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:r.content}}),s.jsxs(X,{className:"mt-8",children:[s.jsx(ue,{children:s.jsx(fe,{className:"text-lg",children:"Was this article helpful?"})}),s.jsx(te,{children:s.jsxs("div",{className:"flex space-x-2",children:[s.jsx(D,{variant:"outline",children:"Yes"}),s.jsx(D,{variant:"outline",children:"No"})]})})]})]}):s.jsxs("div",{className:"py-12 text-center",children:[s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Article Not Found"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"We couldn't find the article you're looking for."}),s.jsx(Te,{href:"/help/documentation/KnowledgeBase",children:s.jsx(D,{children:"Return to Knowledge Base"})})]})]})}const Mp=[{id:"intro",title:"Introduction",description:"Overview of this tutorial"},{id:"navigating",title:"Navigating the Calendar",description:"Learn the calendar interface"},{id:"views",title:"Calendar Views",description:"Switch between day, week, and month views"},{id:"creating",title:"Creating Events",description:"Add new events to your calendar"},{id:"editing",title:"Managing Events",description:"Edit, delete, and organize events"},{id:"integrations",title:"Calendar Integrations",description:"Connect to external calendars"},{id:"conclusion",title:"Next Steps",description:"Continue your learning"}];function IQe(){const[e,t]=p.useState(0),[r,n]=p.useState([]),[a,i]=p.useState(!1),o=()=>{e<Mp.length-1&&(r.includes(e)||n([...r,e]),t(e+1),window.scrollTo(0,0))},l=()=>{e>0&&(t(e-1),window.scrollTo(0,0))},c=f=>{t(f),window.scrollTo(0,0)},d=f=>r.includes(f),u=()=>{i(!0)};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:u}),s.jsx("main",{className:"flex-1 overflow-auto",children:s.jsxs("div",{className:"container max-w-4xl mx-auto py-8 px-4",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx(Te,{href:"/help",children:s.jsxs(D,{variant:"ghost",className:"mb-4 pl-0 flex items-center gap-1",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Help & Support"})]})}),s.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Getting Started with Your Calendar"}),s.jsx("p",{className:"text-muted-foreground",children:"A step-by-step guide to mastering the SmartScheduler calendar features."})]}),s.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[s.jsx("div",{className:"md:w-1/4",children:s.jsxs("div",{className:"sticky top-6",children:[s.jsx("h3",{className:"font-medium mb-3",children:"Tutorial Steps"}),s.jsx("ul",{className:"space-y-1",children:Mp.map((f,h)=>s.jsx("li",{children:s.jsxs("button",{onClick:()=>c(h),className:`flex items-center w-full text-left px-3 py-2 rounded-lg text-sm ${e===h?"bg-primary text-primary-foreground":"hover:bg-accent"}`,children:[s.jsx("div",{className:`w-5 h-5 rounded-full flex items-center justify-center mr-2 ${d(h)?"bg-green-500 text-white":e===h?"bg-white text-primary":"bg-muted text-muted-foreground"}`,children:d(h)?s.jsx(un,{className:"h-3 w-3"}):s.jsx("span",{className:"text-xs",children:h+1})}),s.jsx("span",{children:f.title})]})},f.id))}),s.jsxs("div",{className:"mt-6",children:[s.jsx("h3",{className:"font-medium mb-2",children:"Your Progress"}),s.jsx("div",{className:"bg-muted rounded-full h-2 w-full overflow-hidden",children:s.jsx("div",{className:"bg-primary h-full transition-all",style:{width:`${r.length/Mp.length*100}%`}})}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[r.length," of ",Mp.length," steps completed"]})]})]})}),s.jsx("div",{className:"md:w-3/4",children:s.jsx(X,{children:s.jsxs(te,{className:"p-6",children:[e===0&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx("div",{className:"bg-primary/10 p-4 rounded-full",children:s.jsx(Ei,{className:"h-16 w-16 text-primary"})})}),s.jsx("h2",{className:"text-2xl font-bold",children:"Welcome to the Calendar Tutorial"}),s.jsx("p",{children:"The calendar is at the heart of SmartScheduler, and mastering its features will help you manage your time more effectively. This tutorial will walk
998you through all the essential functions of the calendar, from basic navigation to advanced features."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"What You'll Learn"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"How to navigate the calendar interface"}),s.jsx("li",{children:"Different calendar view options (day, week, month)"}),s.jsx("li",{children:"Creating and managing events"}),s.jsx("li",{children:"Connecting external calendars"}),s.jsx("li",{children:"Advanced calendar features"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Before You Begin"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Make sure you've created an account and logged in to SmartScheduler. This tutorial assumes you're already logged in and can access the main dashboard."})]})]}),e===1&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Navigating the Calendar"}),s.jsx("p",{children:"Before creating events, let's get familiar with the calendar interface and its main components."}),s.jsxs("div",{className:"bg-slate-100 dark:bg-slate-800 p-4 rounded-lg mt-4",children:[s.jsx("h3",{className:"text-lg font-medium mb-3",children:"Calendar Layout"}),s.jsxs("div",{className:"border-2 border-blue-500 dark:border-blue-400 border-dashed p-3 mb-3 rounded",children:[s.jsx("h4",{className:"font-medium text-blue-700 dark:text-blue-300",children:"Header Bar"}),s.jsx("p",{className:"text-sm text-slate-700 dark:text-slate-300",children:"Contains date navigation, view selectors, and time zone settings"})]}),s.jsxs("div",{className:"border-2 border-green-500 dark:border-green-400 border-dashed p-3 mb-3 rounded",children:[s.jsx("h4",{className:"font-medium text-green-700 dark:text-green-300",children:"Main Calendar Area"}),s.jsx("p",{className:"text-sm text-slate-700 dark:text-slate-300",children:"Displays your events in the selected view (day, week, or month)"})]}),s.jsxs("div",{className:"border-2 border-purple-500 dark:border-purple-400 border-dashed p-3 rounded",children:[s.jsx("h4",{className:"font-medium text-purple-700 dark:text-purple-300",children:"Sidebar"}),s.jsx("p",{className:"text-sm text-slate-700 dark:text-slate-300",children:'Contains calendar filters, connected calendars, and the "Create Event" button'})]})]}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Navigation Controls"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Date Navigation Arrows:"})," Move forward or backward in time"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Today Button:"})," Quickly jump to today's date"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Date Picker:"})," Jump to a specific date"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"View Selectors:"})," Switch between day, week, and month views"]})]}),s.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-950 p-4 rounded-lg border border-yellow-200 dark:border-yellow-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-yellow-900 dark:text-yellow-300 mb-2",children:"Pro Tip"}),s.jsx("p",{className:"text-yellow-800 dark:text-yellow-400 text-sm",children:'Use keyboard shortcuts to navigate quickly: Right and left arrows to move forward and backward in time, "T" to jump to today, "D" for day view, "W" for week view, and "M" for month view.'})]})]}),e===2&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Calendar Views"}),s.jsx("p",{children:"SmartScheduler offers different ways to view your calendar, each designed for specific scheduling needs."}),s.jsxs(Br,{defaultValue:"day",children:[s.jsxs(Hr,{className:"w-full grid grid-cols-3 mb-4",children:[s.jsx(We,{value:"day",children:"Day View"}),s.jsx(We,{value:"week",children:"Week View"}),s.jsx(We,{value:"month",children:"Month View"})]}),s.jsxs(Ve,{value:"day",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-blue-100 dar
998k:bg-blue-900 p-2 rounded-full",children:s.jsx(dr,{className:"h-5 w-5 text-blue-600 dark:text-blue-300"})}),s.jsx("h3",{className:"font-medium",children:"Day View"})]}),s.jsx("p",{children:"Day view shows a detailed timeline of a single day, divided into hours. This view is perfect for:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Focusing on today's schedule"}),s.jsx("li",{children:"Planning a specific day in detail"}),s.jsx("li",{children:"Managing time-specific appointments"}),s.jsx("li",{children:"Seeing the exact duration of each event"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.jsx("strong",{children:"How to access:"}),' Click the "Day" button in the view selector, or press "D" on your keyboard.']})]}),s.jsxs(Ve,{value:"week",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-green-100 dark:bg-green-900 p-2 rounded-full",children:s.jsx(Ei,{className:"h-5 w-5 text-green-600 dark:text-green-300"})}),s.jsx("h3",{className:"font-medium",children:"Week View"})]}),s.jsx("p",{children:"Week view displays seven days at once, giving you a broader perspective of your schedule. This view is ideal for:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Planning your work week"}),s.jsx("li",{children:"Spotting patterns in your schedule"}),s.jsx("li",{children:"Finding available time slots across multiple days"}),s.jsx("li",{children:"Balancing your weekly workload"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.jsx("strong",{children:"How to access:"}),' Click the "Week" button in the view selector, or press "W" on your keyboard.']})]}),s.jsxs(Ve,{value:"month",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-purple-100 dark:bg-purple-900 p-2 rounded-full",children:s.jsx(Ei,{className:"h-5 w-5 text-purple-600 dark:text-purple-300"})}),s.jsx("h3",{className:"font-medium",children:"Month View"})]}),s.jsx("p",{children:"Month view shows an entire month at a glance. This view is best for:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Long-term planning"}),s.jsx("li",{children:"Seeing recurring patterns in your schedule"}),s.jsx("li",{children:"Planning around holidays and important dates"}),s.jsx("li",{children:"Getting a bird's-eye view of your commitments"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.jsx("strong",{children:"How to access:"}),' Click the "Month" button in the view selector, or press "M" on your keyboard.']})]})]}),s.jsxs("div",{className:"bg-green-50 dark:bg-green-950 p-4 rounded-lg border border-green-200 dark:border-green-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-green-900 dark:text-green-300 mb-2",children:"Best Practice"}),s.jsx("p",{className:"text-green-800 dark:text-green-400 text-sm",children:"Use day view for detailed daily planning, week view for most of your scheduling needs, and month view when planning ahead or getting a big-picture view of your calendar."})]})]}),e===3&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Creating Events"}),s.jsx("p",{children:"Now that you're familiar with navigating the calendar, let's learn how to create events."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Ways to Create an Event"}),s.jsxs("div",{className:"space-y-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Method 1: Create Event Button"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:'Click the "Create Event" button in the sidebar'}),s.jsx("li",{children:"Fill in the event details in the popup form"}),s.jsx("li",{children:'Click "Save" to add the event to your calendar'})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[s.jsx("strong",{children:"Best for:"})," Creating events when you already know the details."]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Method 2: Click on Calendar"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:"Click on the desired time slot in the calendar"}),s.jsx("li",{children:"A mini form will appear where you can enter the event title"}),s.jsx("li",{children:'Press Enter to create a basic event, or click "Edit" for more options'})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[s.jsx("strong",{children:"Best for:"})," Quickly scheduling events when you can visualize the time slot."]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Method 3: Drag and Select"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:"Click and drag across a time range in the calendar"}),s.jsx("li",{children:"Enter the event title in the popup form"}),s.jsx("li",{children:"Add additional details or save the event"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[s.jsx("strong",{children:"Best for:"})," Creating events with specific durations directly on the calendar."]})]})]})]}),e===4&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Managing Events"}),s.jsx("p",{children:"Once you've created events, you'll need to know how to view, edit, and delete them as needed."}
vendor: 5,010 bytes, line 998
998),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Event Management Options"}),s.jsxs(Br,{defaultValue:"view",children:[s.jsxs(Hr,{className:"w-full grid grid-cols-3 mb-4",children:[s.jsx(We,{value:"view",children:"Viewing"}),s.jsx(We,{value:"edit",children:"Editing"}),s.jsx(We,{value:"delete",children:"Deleting"})]}),s.jsxs(Ve,{value:"view",className:"space-y-4",children:[s.jsx("h4",{className:"font-medium",children:"Viewing Event Details"}),s.jsx("p",{children:"To view the full details of any event:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:"Click on the event in the calendar"}),s.jsx("li",{children:"A popup will appear showing the event details"}),s.jsx("li",{children:"You can see the title, time, location, description, and other information"})]}),s.jsx("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-4",children:s.jsxs("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:[s.jsx("strong",{children:"Tip:"})," You can also view events from different views (day, week, month) to get different perspectives on your schedule."]})})]}),s.jsxs(Ve,{value:"edit",className:"space-y-4",children:[s.jsx("h4",{className:"font-medium",children:"Editing Events"}),s.jsx("p",{children:"To edit an existing event:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:"Click on the event in the calendar"}),s.jsx("li",{children:'Click the "Edit" button in the event popup'}),s.jsx("li",{children:"Make your changes in the edit form"}),s.jsx("li",{children:'Click "Save" to update the event'})]}),s.jsx("p",{className:"mt-2",children:"You can also adjust event times directly in the calendar by:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Dragging the event"})," to a new time or date"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Resizing the event"})," by dragging its top or bottom edge to change duration"]})]})]}),s.jsxs(Ve,{value:"delete",className:"space-y-4",children:[s.jsx("h4",{className:"font-medium",children:"Deleting Events"}),s.jsx("p",{children:"To delete an event:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:"Click on the event in the calendar"}),s.jsx("li",{children:'Click the "Delete" button in the event popup'}),s.jsx("li",{children:"Confirm the deletion when prompted"})]}),s.jsx("div",{className:"bg-red-50 dark:bg-red-950 p-4 rounded-lg border border-red-200 dark:border-red-900 mt-4",children:s.jsxs("p",{className:"text-red-800 dark:text-red-400 text-sm",children:[s.jsx("strong",{children:"Important:"})," Deleting an event removes it permanently from your calendar. For recurring events, you'll be asked if you want to delete just one occurrence or the entire series."]})})]})]})]}),e===5&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Calendar Integrations"}),s.jsx("p",{children:"SmartScheduler can connect to your external calendars, helping you manage all your events in one place."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Supported Calendar Services"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-red-100 flex items-center justify-center mr-2",children:s.jsx("span",{className:"text-red-600 font-bold",children:"G"})}),s.jsx("h4",{className:"font-medium",children:"Google Calendar"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect your personal or work Google Calendar accounts."})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2",children:s.jsx("span",{className:"text-blue-600 font-bold",children:"O"})}),s.jsx("h4",{className:"font-medium",children:"Outlook Calendar"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect Microsoft Outlook or Office 365 calendars."})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-100 flex items-center justify-center mr-2",children:s.jsx("span",{className:"text-slate-600 font-bold",children:"A"})}),s.jsx("h4",{className:"font-medium",children:"Apple Calendar"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect your iCloud calendars."})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center mr-2",children:s.jsx(Ei,{className:"h-4 w-4 text-purple-600"})}
998),s.jsx("h4",{className:"font-medium",children:"Other Calendars (via iCal)"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Import any calendar that supports iCal format (.ics files)."})]})]}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"How to Connect a Calendar"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mt-2",children:[s.jsxs("li",{children:["Go to ",s.jsx("strong",{children:"Integrations"})," in the sidebar"]}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Connect Calendar"})," under the calendar service you want to connect"]}),s.jsx("li",{children:"Follow the authentication steps for the selected service"}),s.jsx("li",{children:"Choose which calendars you want to sync (if multiple are available)"}),s.jsx("li",{children:"Set sync preferences (one-way or two-way sync)"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Integration Benefits"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1 text-blue-800 dark:text-blue-400 text-sm",children:[s.jsx("li",{children:"See all your events in one place"}),s.jsx("li",{children:"Avoid scheduling conflicts across different calendars"}),s.jsx("li",{children:"Keep your external calendars updated when you create events in SmartScheduler"}),s.jsx("li",{children:"Maintain separate calendars for different aspects of your life (work, personal, etc.)"})]})]})]}),e===6&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx("div",{className:"bg-green-100 dark:bg-green-900 p-4 rounded-full",children:s.jsx(un,{className:"h-16 w-16 text-green-600 dark:text-green-400"})})}),s.jsx("h2",{className:"text-2xl font-bold text-center",children:"Congratulations!"}),s.jsx("p",{className:"text-center",children:"You've completed the Getting Started with Your Calendar tutorial. You now understand the fundamentals of using SmartScheduler's calendar features."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"What You've Learned"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Navigating the calendar interface"}),s.jsx("li",{children:"Using different calendar views (day, week, month)"}),s.jsx("li",{children:"Creating and managing events"}),s.jsx("li",{children:"Connecting to external calendars"})]}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Next Steps"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Set up calendar integrations"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect your Google, Outlook, or other calendars to have all your events in one place."}),s.jsx(D,{variant:"link",className:"p-0 h-auto text-primary",children:"Go to Integrations"})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Create your first booking link"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Let others schedule meetings with you based on your availability."}),s.jsx(D,{variant:"link",className:"p-0 h-auto text-primary",children:"Learn about Booking Links"})]})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Need More Help?"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Check out our other tutorials and guides in the Help & Support section, or contact our support team if you have specific questions."})]})]}),s.jsxs("div",{className:"flex justify-between mt-8",children:[s.jsxs(D,{onClick:l,disabled:e===0,className:"flex items-center",children:[s.jsx(as,{className:"mr-2 h-4 w-4"}),"Previous"]}),e<Mp.length-1?s.jsxs(D,{onClick:o,className:"flex items-center",children:["Next",s.jsx(Wi,{className:"ml-2 h-4 w-4"})]}):s.jsx(Te,{href:"/help",children:s.jsx(D,{children:"Finish Tutorial"})})]})]})})})]})]})})]}),a&&s.jsx(Mn,{isOpen:a,onClose:()=>i(!1)})]})}const Ip=[{id:"intro",title:"Introduction",description:"Overview of booking links"},{id:"creating",title:"Creating Booking Links",description:"Set up your first booking link"},{id:"availability",title:"Setting Availability",description:"Configure when people can book you"},{id:"customization",title:"Customizing Your Links",description:"Make your booking pages unique"},{id:"embedding",title:"Sharing & Embedding",description:"Use your booking links effectively"},{id:"managing",title:"Managing Bookings",description:"Handle incoming bookings efficie
998ntly"},{id:"conclusion",title:"Best Practices",description:"Tips for optimizing your booking links"}];function RQe(){const[e,t]=p.useState(0),[r,n]=p.useState([]),[a,i]=p.useState(!1),o=()=>{e<Ip.length-1&&(r.includes(e)||n([...r,e]),t(e+1),window.scrollTo(0,0))},l=()=>{e>0&&(t(e-1),window.scrollTo(0,0))},c=f=>{t(f),window.scrollTo(0,0)},d=f=>r.includes(f),u=()=>{i(!0)};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:u}),s.jsx("main",{className:"flex-1 overflow-auto",children:s.jsxs("div",{className:"container max-w-4xl mx-auto py-8 px-4",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx(Te,{href:"/help",children:s.jsxs(D,{variant:"ghost",className:"mb-4 pl-0 flex items-center gap-1",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Help & Support"})]})}),s.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Creating Effective Booking Links"}),s.jsx("p",{className:"text-muted-foreground",children:"Learn how to set up and optimize booking links that make scheduling effortless."})]}),s.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[s.jsx("div",{className:"md:w-1/4",children:s.jsxs("div",{className:"sticky top-6",children:[s.jsx("h3",{className:"font-medium mb-3",children:"Tutorial Steps"}),s.jsx("ul",{className:"space-y-1",children:Ip.map((f,h)=>s.jsx("li",{children:s.jsxs("button",{onClick:()=>c(h),className:`flex items-center w-full text-left px-3 py-2 rounded-lg text-sm ${e===h?"bg-primary text-primary-foreground":"hover:bg-accent"}`,children:[s.jsx("div",{className:`w-5 h-5 rounded-full flex items-center justify-center mr-2 ${d(h)?"bg-green-500 text-white":e===h?"bg-white text-primary":"bg-muted text-muted-foreground"}`,children:d(h)?s.jsx(un,{className:"h-3 w-3"}):s.jsx("span",{className:"text-xs",children:h+1})}),s.jsx("span",{children:f.title})]})},f.id))}),s.jsxs("div",{className:"mt-6",children:[s.jsx("h3",{className:"font-medium mb-2",children:"Your Progress"}),s.jsx("div",{className:"bg-muted rounded-full h-2 w-full overflow-hidden",children:s.jsx("div",{className:"bg-primary h-full transition-all",style:{width:`${r.length/Ip.length*100}%`}})}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[r.length," of ",Ip.length," steps completed"]})]})]})}),s.jsx("div",{className:"md:w-3/4",children:s.jsx(X,{children:s.jsxs(te,{className:"p-6",children:[e===0&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx("div",{className:"bg-primary/10 p-4 rounded-full",children:s.jsx(Ra,{className:"h-16 w-16 text-primary"})})}),s.jsx("h2",{className:"text-2xl font-bold",children:"Welcome to Booking Links"}),s.jsx("p",{children:"Booking links are one of the most powerful features of SmartScheduler, allowing others to schedule time with you based on your actual availability. They eliminate the back-and-forth of scheduling and ensure meetings land on your calendar automatically."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"What You'll Learn"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"How to create and configure booking links"}),s.jsx("li",{children:"Setting your availability for specific booking types"}),s.jsx("li",{children:"Customizing the booking experience for your invitees"}),s.jsx("li",{children:"Sharing and embedding your booking links"}),s.jsx("li",{children:"Managing incoming bookings efficiently"}),s.jsx("li",{children:"Best practices for optimizing your scheduling workflow"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Before You Begin"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"For the best experience with booking links, we recommend connecting at least one calendar so your availability can be accurately determined. If you haven't connected a calendar yet, don't worry - you can still create booking links, but you'll need to manually manage conflicts."})]})]}),e===1&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Creating Your First Booking Link"}),s.jsx("p",{children:"Let's start by creating a basic booking link that others can use to schedule time with you."}
vendor: 8,925 bytes, line 998
998),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Types of Booking Links"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2",children:s.jsx(ir,{className:"h-4 w-4 text-blue-600"})}),s.jsx("h4",{className:"font-medium",children:"One-on-One"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Standard meetings between you and one other person. Ideal for consultations, interviews, or quick catch-ups."})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center mr-2",children:s.jsx(ir,{className:"h-4 w-4 text-purple-600"})}),s.jsx("h4",{className:"font-medium",children:"Group"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Allow multiple people to join the same meeting slot. Perfect for webinars, group sessions, or team meetings."})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-green-100 flex items-center justify-center mr-2",children:s.jsx(ir,{className:"h-4 w-4 text-green-600"})}),s.jsx("h4",{className:"font-medium",children:"Round Robin"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Distribute bookings among your team members based on availability or rules. Great for support teams or sales teams."})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-orange-100 flex items-center justify-center mr-2",children:s.jsx(Gt,{className:"h-4 w-4 text-orange-600"})}),s.jsx("h4",{className:"font-medium",children:"Sequential"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Book multiple meetings in a specific order. Useful for multi-stage interviews or onboarding processes."})]})]}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Creating a One-on-One Booking Link"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mt-2",children:[s.jsxs("li",{children:["Navigate to ",s.jsx("strong",{children:"Booking Links"})," in the sidebar"]}),s.jsxs("li",{children:["Click the ",s.jsx("strong",{children:"Create Booking Link"})," button"]}),s.jsxs("li",{children:["Select ",s.jsx("strong",{children:"One-on-One"})," as the booking type"]}),s.jsxs("li",{children:["Fill in the basic details:",s.jsxs("ul",{className:"list-disc pl-6 mt-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Name:"}),' Give your booking link a descriptive name (e.g., "30-Minute Consultation")']}),s.jsxs("li",{children:[s.jsx("strong",{children:"Duration:"})," Set how long the meeting should be"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Description:"})," Explain what the meeting is for"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Location:"})," Choose between video call, phone call, or in-person"]})]})]}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Create"})," to generate your booking link"]})]}),s.jsxs("div",{className:"bg-green-50 dark:bg-green-950 p-4 rounded-lg border border-green-200 dark:border-green-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-green-900 dark:text-green-300 mb-2",children:"Pro Tip"}),s.jsx("p",{className:"text-green-800 dark:text-green-400 text-sm",children:'Create separate booking links for different meeting types (e.g., "Quick 15-min Chat", "60-min Strategy Session") so people can choose the appropriate option for their needs.'})]})]}),e===2&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Setting Your Availability"}),s.jsx("p",{children:"One of the most important aspects of effective booking links is properly configuring your availability to ensure bookings only occur when you're actually available."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Ways to Configure Availability"}),s.jsxs(Br,{defaultValue:"days",children:[s.jsxs(Hr,{className:"w-full grid grid-cols-3 mb-4",children:[s.jsx(We,{value:"days",children:"Days & Times"}),s.jsx(We,{value:"date",children:"Date Range"}),s.jsx(We,{value:"buffer",children:"Buffer Times"})]}),s.jsxs(Ve,{value:"days",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-blue-100 dark:bg-blue-900 p-2 rounded-full",children:s.jsx(Gt,{className:"h-5 w-5 text-blue-600 dark:text-blue-300"})}),s.jsx("h3",{className:"font-medium",children:"Available Days & Times"})]}),s.jsx("p",{children:"Set which days of the week and hours you're available for bookings:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsxs("li",{children:["In your booking link settings, go to the ",s.jsx("strong",{children:"Availability"})," tab"]}),s.jsx("li",{children:"Select which days of the week you're available"}),s.jsx("li",{children:"For each day, set your available time ranges"}),s.jsx("li",{children:"You can add multiple time ranges per day (e.g., 9:00-12:00 and 13:00-17:00)"}),s.jsx("li",{children:"Save your changes to update your availability"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[s.jsx("strong",{children:"Example:"})," You might set availability for Monday-Friday, 9:00 AM to 5:00 PM, with a lunch break from 12:00 PM to 1:00 PM."]})]}),s.jsxs(Ve,{value:"date",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-green-100 dark:bg-green-900 p-2 rounded-full",children:s.jsx(Gt,{className:"h-5 w-5 text-green-600 dark:text-green-300"})}),s.jsx("h3",{className:"font-medium",children:"Date Range Restrictions"})]}),s.jsx("p",{children:"Limit how far in advance people can book with you:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Rolling availability:"})," Set how many days into the future people can book (e.g., the next 60 days)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Minimum notice:"})," Prevent last-minute bookings by requiring advance notice (e.g., at least 4 hours before)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Maximum notice:"})," Prevent bookings too far in the future (e.g., no more than 30 days ahead)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Date range:"})," Set a specific start and end date for when your booking link is active"]})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[s.jsx("strong",{children:"Example:"})," You might require at least 24 hours notice and allow bookings up to 2 weeks in advance."]})]}),s.jsxs(Ve,{value:"buffer",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-purple-100 dark:bg-purple-900 p-2 rounded-full",children:s.jsx(dr,{className:"h-5 w-5 text-purple-600 dark:text-purple-300"})}),s.jsx("h3",{className:"font-medium",children:"Buffer Times"})]}),s.jsx("p",{children:"Add padding before or after meetings to give yourself breathing room:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Before meetings:"})," Add buffer time before each booking to prepare"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"After meetings:"})," Add buffer time after each booking to take notes or prepare for the next meeting"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Between bookings:"})," Ensure a minimum amount of time between consecutive bookings"]})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[s.jsx("strong",{children:"Example:"})," Setting a 15-minute buffer after each meeting ensures you have time to take notes and prepare for your next appointment."]})]})]}),s.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-950 p-4 rounded-lg border border-yellow-200 dark:border-yellow-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-yellow-900 dark:text-yellow-300 mb-2",children:"Important"}),s.jsx("p",{className:"text-yellow-800 dark:text-yellow-400 text-sm",children:"SmartScheduler automatically checks your connected calendars and prevents double-bookings. However, if you have multiple booking links, make sure their availabilities don't conflict in ways you didn't intend."})]})]}),e===3&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Customizing Your Booking Links"}),s.jsx("p",{children:"Personalize your booking pages to create a branded, professional scheduling experience for your invitees."}
998),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Key Customization Options"}),s.jsxs("div",{className:"space-y-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"URL & Slug"}),s.jsx("p",{className:"text-sm",children:"Customize the URL for your booking link to make it easy to remember and share."}),s.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 p-2 rounded mt-2 font-mono text-sm",children:["smart-scheduler.ai/book/",s.jsx("span",{className:"text-primary",children:"your-custom-slug"})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Choose something memorable and relevant to the meeting type."})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Branding & Colors"}),s.jsx("p",{className:"text-sm",children:"Customize the appearance of your booking page to match your brand:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1 mt-1 text-sm",children:[s.jsx("li",{children:"Upload your logo or profile picture"}),s.jsx("li",{children:"Choose a custom accent color"}),s.jsx("li",{children:"Add a background image (optional)"}),s.jsx("li",{children:"Select a light or dark theme"})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Form Fields"}),s.jsx("p",{className:"text-sm",children:"Collect important information from invitees when they book:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1 mt-1 text-sm",children:[s.jsx("li",{children:"Standard fields: Name, Email, Phone"}),s.jsx("li",{children:"Custom questions: Text fields, multiple choice, checkboxes"}),s.jsx("li",{children:"Required vs. optional fields"}),s.jsx("li",{children:"Field order and grouping"})]}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Only ask for information you actually need to avoid friction in the booking process."})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Confirmation Page & Redirects"}),s.jsx("p",{className:"text-sm",children:"Customize what happens after someone books with you:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1 mt-1 text-sm",children:[s.jsx("li",{children:"Custom confirmation message"}),s.jsx("li",{children:"Redirect to another page after booking"}),s.jsx("li",{children:"Display additional resources or instructions"}),s.jsx("li",{children:"Add your social media links"})]})]})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Pro Tip"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"The confirmation page is an opportunity to provide valuable information to your invitees. Consider adding links to preparation materials, forms they should fill out before the meeting, or even a brief video introducing yourself."})]})]}),e===4&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Sharing & Embedding Your Links"}),s.jsx("p",{children:"Once you've created and customized your booking links, it's time to share them with the world."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Sharing Methods"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2",children:s.jsx(Ra,{className:"h-4 w-4 text-blue-600"})}),s.jsx("h4",{className:"font-medium",children:"Direct Link"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Share your booking link directly via email, text message, or social media."}),s.jsx("div",{className:"bg-slate-50 dark:bg-slate-800 p-2 rounded mt-2 text-xs font-mono",children:"smart-scheduler.ai/book/your-slug"})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-green-100 flex items-center justify-center mr-2",children:s.jsx(Xd,{className:"h-4 w-4 text-green-600"})}),s.jsx("h4",{className:"font-medium",children:"Email Signature"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Add your booking link to your email signature for easy access."}),s.jsxs("div",{className:"text-xs mt-2",children:[s.jsx("p",{children:s.jsx("strong",{children:"Example:"})}),s.jsxs("p",{className:"mt-1",children:["John Smith",s.jsx("br",{}),"Product Manager | SmartScheduler",s.jsx("br",{}),s.jsx("span",{className:"text-primary",children:"Schedule a meeting: smart-scheduler.ai/book/john"})]})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center mr-2",children:s.jsx(Yc,{className:"h-4 w-4 text-purple-600"})}),s.jsx("h4",{className:"font-medium",children:"Website Embed"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Embed your booking page directly into your website."}),s.jsxs("div",{className:"text-xs mt-2",children:[s.jsx("p",{children:"You can embed your calendar as:"}),s.jsxs("ul",{className:"list-disc pl-4 mt-1",children:[s.jsx("li",{children:"Inline embed (full booking experience)"}),s.jsx("li",{children:"Pop-up widget (triggered by a button)"}),s.jsx("li",{children:"Sidebar widget (slides in from the edge)"})]})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-red-100 flex items-center justify-center mr-2",children:s.jsx($E,{className:"h-4 w-4 text-red-600"})}),s.jsx("h4",{className:"font-medium",children:"Social Media"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Share your booking link on social media profiles and posts."}),s.jsxs("div",{className:"text-xs mt-2",children:[s.jsx("p",{children:"Great places to include your link:"}),s.jsxs("ul",{className:"list-disc pl-4 mt-1",children:[s.jsx("li",{children:"LinkedIn profile bio"}),s.jsx("li",{children:"Twitter/X profile"}),s.jsx("li",{children:"Instagram bio link"}),s.jsx("li",{children:"Facebook business page"})]})]})]})]}
998),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Embedding Code Example"}),s.jsx("div",{className:"bg-slate-50 dark:bg-slate-800 p-4 rounded-lg mt-2 font-mono text-xs overflow-x-auto",children:'<iframe src="https://smart-scheduler.ai/embed/your-slug" width="100%" height="600px" frameborder="0"></iframe>'}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Pro Tip"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:`When sharing your booking link, add context about why someone should book with you and what to expect. For example: "Book a 30-minute consultation to discuss your marketing strategy challenges. I'll provide actionable insights you can implement right away."`})]})]}),e===5&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Managing Your Bookings"}),s.jsx("p",{children:"Once people start booking meetings with you, you'll need to manage those bookings efficiently."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Booking Notifications"}),s.jsx("p",{children:"Customize how you're notified about new bookings:"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Email Notifications"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Receive email alerts when:"}),s.jsxs("ul",{className:"list-disc pl-6 mt-1 text-sm",children:[s.jsx("li",{children:"Someone books a meeting"}),s.jsx("li",{children:"Someone cancels a meeting"}),s.jsx("li",{children:"Someone reschedules a meeting"}),s.jsx("li",{children:"An upcoming meeting is about to start (reminder)"})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Calendar Invites"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Automatically generate and send calendar invites to:"}),s.jsxs("ul",{className:"list-disc pl-6 mt-1 text-sm",children:[s.jsx("li",{children:"Your calendar (automatically added)"}),s.jsx("li",{children:"The invitee's calendar (via email)"}),s.jsx("li",{children:"Any additional attendees (optional)"}),s.jsx("li",{children:"Include custom meeting details and links"})]})]})]}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Managing Existing Bookings"}),s.jsx("p",{children:"Handle your bookings from the Bookings Dashboard:"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mt-2",children:[s.jsxs("li",{children:["Navigate to ",s.jsx("strong",{children:"Bookings"})," in your dashboard"]}),s.jsx("li",{children:"View all upcoming and past bookings"}),s.jsx("li",{children:"Filter bookings by status, date, or booking link"}),s.jsxs("li",{children:["For any booking, you can:",s.jsxs("ul",{className:"list-disc pl-6 mt-1",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Reschedule:"})," Change the date/time"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Cancel:"})," Cancel the meeting (with optional message)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"View details:"})," See invitee information and responses"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Add notes:"})," Keep private notes for your reference"]})]})]})]}),s.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-950 p-4 rounded-lg border border-yellow-200 dark:border-yellow-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-yellow-900 dark:text-yellow-300 mb-2",children:"Important"}),s.jsx("p",{className:"text-yellow-800 dark:text-yellow-400 text-sm",children:"When you cancel or reschedule a meeting, the invitee will automatically receive a notification. Consider adding a personal message to explain the reason for the change."})]})]}),e===6&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx("div",{className:"bg-green-100 dark:bg-green-900 p-4 rounded-full",children:s.jsx(un,{className:"h-16 w-16 text-green-600 dark:text-green-400"})})}),s.jsx("h2",{className:"text-2xl font-bold text-center",children:"Best Practices for Booking Links"}),s.jsx("p",{children:"Follow these tips to optimize your booking links and create a better scheduling experience."}
998),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Optimize Your Availability"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Batch similar meetings:"})," Set aside specific days or time blocks for similar types of meetings to maintain focus and context"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Protect your focus time:"})," Don't make all your working hours available for bookings; reserve some time for deep work"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Consider time zones:"})," If you work with people globally, be mindful of time zone differences when setting your availability"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Use buffer times wisely:"})," Add appropriate buffers based on the meeting type (more for intense meetings, less for quick check-ins)"]})]}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Create a Great Invitee Experience"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Clear descriptions:"})," Provide detailed information about what the meeting is for and what to expect"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Minimal form fields:"})," Only ask for information you actually need to reduce friction"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Send preparation materials:"})," Use confirmation emails to share any pre-meeting materials or questions"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Personalize reminders:"})," Customize reminder emails to include helpful information and reduce no-shows"]})]}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Advanced Strategies"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Use round-robin for teams:"})," Distribute meeting load across team members based on availability and expertise"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Implement payment requirements:"})," For consultation services, set up payment integration to require payment before booking"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Set up workflows:"})," Create automated actions that trigger when someone books (e.g., adding them to your CRM)"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Analyze booking patterns:"})," Review your booking analytics to optimize your availability and improve conversion rates"]})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Final Tip"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Periodically review and update your booking links and availability to ensure they still align with your current workflow and priorities. What worked six months ago might not be optimal for your current situation."})]}),s.jsxs("div",{className:"mt-6 p-6 border rounded-lg bg-slate-50 dark:bg-slate-800",children:[s.jsx("h3",{className:"text-lg font-medium mb-4 text-center",children:"What's Next?"}),s.jsx("p",{className:"text-center mb-4",children:"Now that you know how to create and optimize booking links, it's time to put your knowledge into practice!"}),s.jsx("div",{className:"flex justify-center",children:s.jsx(Te,{href:"/booking",children:s.jsxs(D,{className:"flex items-center",children:[s.jsx(Ra,{className:"mr-2 h-4 w-4"}),"Create Your First Booking Link"]})})})]})]}),s.jsxs("div",{className:"flex justify-between mt-8",children:[s.jsxs(D,{onClick:l,disabled:e===0,className:"flex items-center",children:[s.jsx(as,{className:"mr-2 h-4 w-4"}),"Previous"]}),e<Ip.length-1?s.jsxs(D,{onClick:o,className:"flex items-center",children:["Next",s.jsx(Wi,{className:"ml-2 h-4 w-4"})]}):s.jsx(Te,{href:"/help",children:s.jsx(D,{children:"Finish Tutorial"})})]})]})})})]})]})})]}),a&&s.jsx(Mn,{isOpen:a,onClose:()=>i(!1)})]})}const Rp=[{id:"intro",title:"Introduction",description:"Team scheduling basics"}
998,{id:"setup",title:"Team Setup",description:"Configure your team structure"},{id:"availability",title:"Team Availability",description:"Manage collective availability"},{id:"round-robin",title:"Round Robin Scheduling",description:"Distribute bookings efficiently"},{id:"workflows",title:"Scheduling Workflows",description:"Automate team processes"},{id:"analytics",title:"Reporting & Analytics",description:"Measure and improve efficiency"},{id:"best-practices",title:"Best Practices",description:"Tips for optimizing team scheduling"}];function $Qe(){const[e,t]=p.useState(0),[r,n]=p.useState([]),[a,i]=p.useState(!1),o=()=>{e<Rp.length-1&&(r.includes(e)||n([...r,e]),t(e+1),window.scrollTo(0,0))},l=()=>{e>0&&(t(e-1),window.scrollTo(0,0))},c=f=>{t(f),window.scrollTo(0,0)},d=f=>r.includes(f),u=()=>{i(!0)};return s.jsxs("div",{className:"h-screen flex flex-col bg-neutral-100 dark:bg-slate-900",children:[s.jsx(tr,{}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsx(Or,{onCreateEvent:u}),s.jsx("main",{className:"flex-1 overflow-auto",children:s.jsxs("div",{className:"container max-w-4xl mx-auto py-8 px-4",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx(Te,{href:"/help",children:s.jsxs(D,{variant:"ghost",className:"mb-4 pl-0 flex items-center gap-1",children:[s.jsx(as,{className:"h-4 w-4"}),s.jsx("span",{children:"Back to Help & Support"})]})}),s.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Team Scheduling Strategies"}),s.jsx("p",{className:"text-muted-foreground",children:"Learn advanced techniques to coordinate team schedules and optimize collective availability."})]}),s.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[s.jsx("div",{className:"md:w-1/4",children:s.jsxs("div",{className:"sticky top-6",children:[s.jsx("h3",{className:"font-medium mb-3",children:"Tutorial Steps"}),s.jsx("ul",{className:"space-y-1",children:Rp.map((f,h)=>s.jsx("li",{children:s.jsxs("button",{onClick:()=>c(h),className:`flex items-center w-full text-left px-3 py-2 rounded-lg text-sm ${e===h?"bg-primary text-primary-foreground":"hover:bg-accent"}`,children:[s.jsx("div",{className:`w-5 h-5 rounded-full flex items-center justify-center mr-2 ${d(h)?"bg-green-500 text-white":e===h?"bg-white text-primary":"bg-muted text-muted-foreground"}`,children:d(h)?s.jsx(un,{className:"h-3 w-3"}):s.jsx("span",{className:"text-xs",children:h+1})}),s.jsx("span",{children:f.title})]})},f.id))}),s.jsxs("div",{className:"mt-6",children:[s.jsx("h3",{className:"font-medium mb-2",children:"Your Progress"}),s.jsx("div",{className:"bg-muted rounded-full h-2 w-full overflow-hidden",children:s.jsx("div",{className:"bg-primary h-full transition-all",style:{width:`${r.length/Rp.length*100}%`}})}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[r.length," of ",Rp.length," steps completed"]})]})]})}),s.jsx("div",{className:"md:w-3/4",children:s.jsx(X,{children:s.jsxs(te,{className:"p-6",children:[e===0&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx("div",{className:"bg-primary/10 p-4 rounded-full",children:s.jsx(ir,{className:"h-16 w-16 text-primary"})})}),s.jsx("h2",{className:"text-2xl font-bold",children:"Team Scheduling Fundamentals"}),s.jsx("p",{children:"Coordinating schedules across a team can be challenging, but SmartScheduler's team features make it simple. In this tutorial, you'll learn how to use SmartScheduler's advanced team scheduling features to improve collaboration and productivity."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"What You'll Learn"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsx("li",{children:"Setting up and organizing your team structure"}),s.jsx("li",{children:"Managing shared availability and resources"}),s.jsx("li",{children:"Implementing round-robin scheduling for equitable distribution"}),s.jsx("li",{children:"Creating automated scheduling workflows"}),s.jsx("li",{children:"Analyzing team scheduling metrics"}),s.jsx("li",{children:"Best practices for optimizing team coordination"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Requirements"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"To fully utilize team scheduling features, you need:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1 mt-1 text-blue-800 dark:text-blue-400 text-sm",children:[s.jsx("li",{children:"A Company or Team Manager account"}),s.jsx("li",{children:"Team members added to your organization"}),s.jsx("li",{children:"Basic familiarity with individual scheduling features"})]})]})]}),e===1&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Setting Up Your Team"}),s.jsx("p",{children:"Before you can implement effective team scheduling strategies, you need to properly configure your team structure in SmartScheduler."}
998),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Creating Team Structure"}),s.jsxs("div",{className:"space-y-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Creating a Team"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsxs("li",{children:["Navigate to the ",s.jsx("strong",{children:"Teams"})," section in your organization dashboard"]}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Create New Team"})]}),s.jsx("li",{children:"Enter the team name, description, and department"}),s.jsx("li",{children:"Select team visibility settings (public or private)"}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Create Team"})," to finalize"]})]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"You can create multiple teams for different departments or project groups within your organization."})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Adding Team Members"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:"Go to your team dashboard"}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Add Member"})]}),s.jsx("li",{children:"Select from existing organization members or invite new users by email"}),s.jsx("li",{children:"Assign appropriate roles (Team Member, Team Admin)"}),s.jsx("li",{children:"Set permission levels for scheduling access"}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Add to Team"})]})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Defining Team Roles"}),s.jsx("p",{className:"text-sm mb-2",children:"Different roles have different capabilities in team scheduling:"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 p-3 rounded",children:[s.jsx("h5",{className:"text-sm font-medium",children:"Team Admin"}),s.jsxs("ul",{className:"list-disc pl-4 text-xs mt-1 space-y-1",children:[s.jsx("li",{children:"Full access to team calendar"}),s.jsx("li",{children:"Can create team booking links"}),s.jsx("li",{children:"Can view/edit all team members' availability"}),s.jsx("li",{children:"Can configure round-robin settings"}),s.jsx("li",{children:"Access to all scheduling analytics"})]})]}),s.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 p-3 rounded",children:[s.jsx("h5",{className:"text-sm font-medium",children:"Team Member"}),s.jsxs("ul",{className:"list-disc pl-4 text-xs mt-1 space-y-1",children:[s.jsx("li",{children:"Can view team calendar"}),s.jsx("li",{children:"Can set personal availability"}),s.jsx("li",{children:"Can participate in round-robin pools"}),s.jsx("li",{children:"Limited scheduling analytics access"}),s.jsx("li",{children:"Cannot edit other members' settings"})]})]})]})]})]}),s.jsxs("div",{className:"bg-green-50 dark:bg-green-950 p-4 rounded-lg border border-green-200 dark:border-green-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-green-900 dark:text-green-300 mb-2",children:"Pro Tip"}),s.jsx("p",{className:"text-green-800 dark:text-green-400 text-sm",children:'Organize your teams based on scheduling needs rather than just department structure. For example, you might create a "Customer Support" team that includes members from different departments who need to share on-call scheduling responsibilities.'})]})]}),e===2&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Managing Team Availability"}),s.jsx("p",{children:"One of the most powerful features of team scheduling is the ability to coordinate and visualize collective availability across your entire team."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Setting Team Availability"}),s.jsxs(Br,{defaultValue:"collective",children:[s.jsxs(Hr,{className:"w-full grid grid-cols-3 mb-4",children:[s.jsx(We,{value:"collective",children:"Collective View"}),s.jsx(We,{value:"individual",children:"Individual Settings"}),s.jsx(We,{value:"conflicts",children:"Conflict Resolution"})]}),s.jsxs(Ve,{value:"collective",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-blue-100 dar
998k:bg-blue-900 p-2 rounded-full",children:s.jsx(ir,{className:"h-5 w-5 text-blue-600 dark:text-blue-300"})}),s.jsx("h3",{className:"font-medium",children:"Team Availability View"})]}),s.jsx("p",{children:"The collective availability view shows when members of your team are available or busy:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Team Calendar:"})," Access the team calendar from your team dashboard"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Availability Heatmap:"})," The darker the time slot, the fewer team members are available"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Filtering:"})," Filter the view by team members, time ranges, or event types"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Finding Free Time:"}),' Use the "Find Team Time" feature to automatically identify slots when everyone is available']})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:[s.jsx("strong",{children:"How to access:"}),' Go to your Team Dashboard and click on "Team Calendar" or "Team Availability" in the sidebar.']})]}),s.jsxs(Ve,{value:"individual",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-green-100 dark:bg-green-900 p-2 rounded-full",children:s.jsx(Hoe,{className:"h-5 w-5 text-green-600 dark:text-green-300"})}),s.jsx("h3",{className:"font-medium",children:"Individual Team Member Settings"})]}),s.jsx("p",{children:"Team members can set their availability preferences that will be used for team scheduling:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Working Hours:"})," Each team member can set their regular working hours"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Time Off:"})," Members can mark vacation days and time off that will be automatically blocked in team scheduling"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Meeting Preferences:"})," Set buffer times between meetings and maximum meetings per day"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Focus Time:"})," Block out dedicated focus time that won't be interrupted by team scheduling"]})]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Team admins can override individual settings if needed for critical team scheduling requirements."})]}),s.jsxs(Ve,{value:"conflicts",className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"bg-purple-100 dark:bg-purple-900 p-2 rounded-full",children:s.jsx(DE,{className:"h-5 w-5 text-purple-600 dark:text-purple-300"})}),s.jsx("h3",{className:"font-medium",children:"Resolving Scheduling Conflicts"})]}),s.jsx("p",{children:"When conflicts arise in team scheduling, SmartScheduler provides tools to resolve them:"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Conflict Detection:"})," The system automatically identifies scheduling conflicts"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Priority Settings:"})," Set priority levels for different event types or team members"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Conflict Resolution Workflow:"})," Follow a structured process to resolve overlapping schedules"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Notification System:"})," Affected team members are automatically notified about conflicts and resolutions"]})]}),s.jsx("div",{className:"bg-yellow-50 dark:bg-yellow-950 p-3 rounded-lg border border-yellow-200 dark:border-yellow-900 mt-2",children:s.jsxs("p",{className:"text-yellow-800 dark:text-yellow-400 text-xs",children:[s.jsx("strong",{children:"Note:"}),' When creating team events, you can set them as "Required" or "Optional" for different team members to help manage conflicts.']})})]})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Best Practice"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:"Encourage team members to keep their calendars up-to-date and connected to SmartScheduler. The team availability features are only as accurate as the underlying calendar data."})]})]}),e===3&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Round Robin Scheduling"}),s.jsx("p",{children:"Round robin scheduling distributes meetings fairly among team members based on rules you set, making it perfect for sales teams, support staff, and consulting groups."}
998),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"What is Round Robin Scheduling?"}),s.jsx("p",{children:"Round robin scheduling automatically assigns incoming meeting requests to available team members based on predetermined criteria. When someone books a meeting through your team's booking link, the system intelligently selects which team member will take the meeting."}),s.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 p-4 rounded-lg mt-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"How Round Robin Works"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsx("li",{children:"A customer books a meeting through your team booking link"}),s.jsx("li",{children:"SmartScheduler checks which team members are part of the round robin pool"}),s.jsx("li",{children:"The system filters based on availability during the requested time slot"}),s.jsx("li",{children:"From the available members, it selects someone based on your distribution rules"}),s.jsx("li",{children:"The selected team member is assigned the booking"}),s.jsx("li",{children:"Both the customer and team member receive confirmations"})]})]}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Setting Up Round Robin"}),s.jsxs("div",{className:"space-y-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Creating a Round Robin Booking Link"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2",children:[s.jsxs("li",{children:["Go to ",s.jsx("strong",{children:"Booking Links"})," in your team dashboard"]}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Create Booking Link"})]}),s.jsxs("li",{children:["Select ",s.jsx("strong",{children:"Round Robin"})," as the booking type"]}),s.jsx("li",{children:"Fill in the basic details (name, duration, description)"}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Next"})," to configure round robin settings"]})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Round Robin Distribution Methods"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-2",children:[s.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 p-3 rounded",children:[s.jsx("h5",{className:"text-sm font-medium",children:"Even Distribution"}),s.jsx("p",{className:"text-xs mt-1",children:"Assigns meetings evenly across all team members to balance workload, regardless of individual capacity."})]}),s.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 p-3 rounded",children:[s.jsx("h5",{className:"text-sm font-medium",children:"Capacity Based"}),s.jsx("p",{className:"text-xs mt-1",children:"Assigns more meetings to members with higher capacity settings, accommodating different workloads."})]}),s.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 p-3 rounded",children:[s.jsx("h5",{className:"text-sm font-medium",children:"First Available"}),s.jsx("p",{className:"text-xs mt-1",children:"Assigns to the first available team member, maximizing earliest possible meeting times."})]}),s.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 p-3 rounded",children:[s.jsx("h5",{className:"text-sm font-medium",children:"Skills Based"}),s.jsx("p",{className:"text-xs mt-1",children:"Assigns based on expertise tags, matching meetings to the most qualified team members."})]})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Advanced Round Robin Settings"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Member Pool:"})," Select which team members to include in the round robin pool"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Priority Rules:"})," Set priority levels for different team members"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Availability Rules:"})," Define minimum availability requirements"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Reset Period:"})," Determine when distribution counters reset (daily, weekly, monthly)"]}
998),s.jsxs("li",{children:[s.jsx("strong",{children:"Reassignment Settings:"})," Configure what happens if a team member can't attend a meeting"]})]})]})]}),s.jsxs("div",{className:"bg-green-50 dark:bg-green-950 p-4 rounded-lg border border-green-200 dark:border-green-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-green-900 dark:text-green-300 mb-2",children:"Pro Tip"}),s.jsx("p",{className:"text-green-800 dark:text-green-400 text-sm",children:'For sales teams, consider using a "round robin with memory" feature that assigns repeat customers to the same team member they worked with previously, maintaining relationship continuity while still distributing new leads evenly.'})]})]}),e===4&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Scheduling Workflows"}),s.jsx("p",{children:"Automate your team's scheduling processes with customized workflows that streamline repetitive tasks and ensure consistent follow-up."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"What are Scheduling Workflows?"}),s.jsx("p",{children:"Scheduling workflows are automated sequences of actions that occur before, during, or after a scheduled event. They help standardize your team's scheduling processes and ensure nothing falls through the cracks."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Types of Workflows"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-2",children:s.jsx(Noe,{className:"h-4 w-4 text-indigo-600"})}),s.jsx("h4",{className:"font-medium",children:"Pre-Meeting Workflows"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Actions that occur before a scheduled meeting:"}),s.jsxs("ul",{className:"list-disc pl-6 text-sm space-y-1",children:[s.jsx("li",{children:"Automated intake forms"}),s.jsx("li",{children:"Pre-meeting questionnaires"}),s.jsx("li",{children:"Document sharing"}),s.jsx("li",{children:"Preparation reminders"}),s.jsx("li",{children:"Calendar notifications"})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2",children:s.jsx(Gt,{className:"h-4 w-4 text-blue-600"})}),s.jsx("h4",{className:"font-medium",children:"Booking Workflows"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Actions that occur during the booking process:"}),s.jsxs("ul",{className:"list-disc pl-6 text-sm space-y-1",children:[s.jsx("li",{children:"Multi-stage approval processes"}),s.jsx("li",{children:"Team notifications"}),s.jsx("li",{children:"Resource allocation"}),s.jsx("li",{children:"CRM integration updates"}),s.jsx("li",{children:"Meeting link generation"})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-green-100 flex items-center justify-center mr-2",children:s.jsx(zoe,{className:"h-4 w-4 text-green-600"})}),s.jsx("h4",{className:"font-medium",children:"Follow-Up Workflows"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Actions that occur after a meeting:"}),s.jsxs("ul",{className:"list-disc pl-6 text-sm space-y-1",children:[s.jsx("li",{children:"Automated follow-up emails"}),s.jsx("li",{children:"Feedback surveys"}),s.jsx("li",{children:"Meeting summary distribution"}),s.jsx("li",{children:"Next steps assignment"}),s.jsx("li",{children:"Follow-up scheduling"})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center mr-2",children:s.jsx(Foe,{className:"h-4 w-4 text-purple-600"})}),s.jsx("h4",{className:"font-medium",children:"Conditional Workflows"})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Flexible workflows based on specific conditions:"}),s.jsxs("ul",{className:"list-disc pl-6 text-sm space-y-1",children:[s.jsx("li",{children:"If-then branching logic"}),s.jsx("li",{children:"Different workflows by meeting type"}),s.jsx("li",{children:"Role-specific processes"}),s.jsx("li",{children:"Time or date-based triggers"}),s.jsx("li",{children:"Customer segment customization"})]})]})]}
998),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Creating Team Workflows"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mt-2",children:[s.jsx("li",{children:"Go to your team dashboard"}),s.jsxs("li",{children:["Select ",s.jsx("strong",{children:"Workflows"})," from the menu"]}),s.jsxs("li",{children:["Click ",s.jsx("strong",{children:"Create Workflow"})]}),s.jsx("li",{children:"Choose a workflow type (Pre-Meeting, Booking, Follow-Up, Conditional)"}),s.jsx("li",{children:"Configure triggers: When should this workflow activate?"}),s.jsx("li",{children:"Add actions: What should happen when triggered?"}),s.jsx("li",{children:"Set conditions: Any special rules or exceptions?"}),s.jsx("li",{children:"Assign to booking types: Which scheduling links should use this workflow?"}),s.jsx("li",{children:"Test your workflow before activating it"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Example Workflow"}),s.jsx("p",{className:"text-blue-800 dark:text-blue-400 text-sm",children:s.jsx("strong",{children:"Client Onboarding Workflow:"})}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-1 mt-1 text-blue-800 dark:text-blue-400 text-sm",children:[s.jsx("li",{children:"When a new client books an onboarding call, send them a welcome email with prep materials"}),s.jsx("li",{children:"3 days before the meeting, send a reminder with a link to an intake form"}),s.jsx("li",{children:"1 hour before, send meeting link and agenda to both client and assigned team member"}),s.jsx("li",{children:"After the meeting, automatically send follow-up email with next steps"}),s.jsx("li",{children:"3 days after meeting, trigger account manager to check in with client"}),s.jsx("li",{children:"2 weeks after, send automated satisfaction survey"})]})]})]}),e===5&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Team Scheduling Analytics"}),s.jsx("p",{children:"Gain insights into your team's scheduling patterns, efficiency, and workload distribution with SmartScheduler's analytics features."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Key Metrics to Track"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-2",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center mr-2",children:s.jsx(joe,{className:"h-4 w-4 text-blue-600"})}),s.jsx("h4",{className:"font-medium",children:"Workload Distribution"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Track meeting load across team members:"}),s.jsxs("ul",{className:"list-disc pl-6 mt-1 text-sm space-y-1",children:[s.jsx("li",{children:"Number of meetings per team member"}),s.jsx("li",{children:"Total meeting hours per person"}),s.jsx("li",{children:"Meeting-to-work ratio"}),s.jsx("li",{children:"Round robin distribution effectiveness"})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-green-100 flex items-center justify-center mr-2",children:s.jsx(dr,{className:"h-4 w-4 text-green-600"})}),s.jsx("h4",{className:"font-medium",children:"Time Utilization"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Analyze how time is being used:"}),s.jsxs("ul",{className:"list-disc pl-6 mt-1 text-sm space-y-1",children:[s.jsx("li",{children:"Meeting time vs. focus time"}),s.jsx("li",{children:"Internal vs. external meetings"}),s.jsx("li",{children:"Average meeting duration"}),s.jsx("li",{children:"Time spent in different meeting types"})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-purple-100 flex items-center justify-center mr-2",children:s.jsx(Ra,{className:"h-4 w-4 text-purple-600"})}),s.jsx("h4",{className:"font-medium",children:"Booking Link Performance"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Measure booking link effectiveness:"}),s.jsxs("ul",{className:"list-disc pl-6 mt-1 text-sm space-y-1",children:[s.jsx("li",{children:"Conversion rate (views to bookings)"}),s.jsx("li",{children:"Most popular booking types"}),s.jsx("li",{children:"Booking link traffic sources"}),s.jsx("li",{children:"No-show/cancellation rates"})]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center mb-2",children:[s.jsx("div",{className:"w-8 h-8 rounded-full bg-red-100 flex items-center justify-center mr-2",children:s.jsx(ir,{className:"h-4 w-4 text-red-600"})}),s.jsx("h4",{className:"font-medium",children:"Team Efficiency"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Evaluate overall scheduling efficiency:"}),s.jsxs("ul",{className:"list-disc pl-6 mt-1 text-sm space-y-1",children:[s.jsx("li",{children:"Time to book (speed of scheduling)"}),s.jsx("li",{children:"Rescheduling frequency"}),s.jsx("li",{children:"Advanced booking time frame"}),s.jsx("li",{children:"Resource utilization rates"})]})]})]}
998),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Accessing Analytics"}),s.jsxs("ol",{className:"list-decimal pl-6 space-y-2 mt-2",children:[s.jsx("li",{children:"Go to your team dashboard"}),s.jsxs("li",{children:["Select ",s.jsx("strong",{children:"Analytics"})," from the menu"]}),s.jsx("li",{children:"Choose the date range for your analysis"}),s.jsx("li",{children:"Filter by team members, booking types, or other criteria"}),s.jsx("li",{children:"View visualizations and data tables"}),s.jsx("li",{children:"Export reports as needed (CSV, PDF, etc.)"})]}),s.jsxs("div",{className:"bg-green-50 dark:bg-green-950 p-4 rounded-lg border border-green-200 dark:border-green-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-green-900 dark:text-green-300 mb-2",children:"Using Analytics Effectively"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1 text-green-800 dark:text-green-400 text-sm",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Regular review:"})," Schedule monthly analytics reviews with your team to identify trends"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Balanced workload:"})," Use distribution metrics to ensure equitable meeting loads"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Optimization:"})," Identify underperforming booking links and experiment with improvements"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Capacity planning:"})," Use historical data to forecast future scheduling needs"]})]})]})]}),e===6&&s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx("div",{className:"bg-green-100 dark:bg-green-900 p-4 rounded-full",children:s.jsx(un,{className:"h-16 w-16 text-green-600 dark:text-green-400"})})}),s.jsx("h2",{className:"text-2xl font-bold text-center",children:"Team Scheduling Best Practices"}),s.jsx("p",{children:"Apply these strategies to optimize your team's scheduling process and maximize productivity."}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Establishing Team Scheduling Policies"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Meeting-Free Time Blocks:"})," Designate specific days or time periods as meeting-free for the entire team to ensure everyone has focused work time"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Response Time Standards:"})," Set expectations for how quickly team members should respond to meeting requests"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Calendar Hygiene:"})," Establish rules for keeping calendars up-to-date and accurately reflecting availability"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Meeting Duration Standards:"})," Default meeting lengths for different meeting types to avoid unnecessarily long meetings"]})]}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Optimizing Team Availability"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Core Hours:"})," Define core working hours when all team members should be available for internal meetings"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Timezone Management:"})," For distributed teams, create scheduling windows that accommodate different time zones fairly"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Capacity Thresholds:"})," Set maximum meeting hours per day for team members to prevent meeting overload"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Buffer Time:"})," Build in team-wide buffer times between meetings to allow for breaks and preparation"]})]}),s.jsx("h3",{className:"text-lg font-medium mt-6",children:"Round Robin Refinement"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-2",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Skill Tagging:"})," Tag team members with their expertise areas for more intelligent assignment"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Weighted Distribution:"})," Assign different capacity weights to team members based on their roles and bandwidth"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Hybrid Approaches:"})," Combine different assignment methods for different meeting types or customer segments"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Regular Rotation:"})," Periodically adjust your round robin pools to accommodate changing team dynamics"]})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950 p-4 rounded-lg border border-blue-200 dark:border-blue-900 mt-6",children:[s.jsx("h4",{className:"font-medium text-blue-900 dark:text-blue-300 mb-2",children:"Final Tips"}),s.jsxs("ul",{className:"list-disc pl-6 space-y-1 text-blue-800 dark:text-blue-400 text-sm",children:[s.jsxs("li",{children:[s.jsx("strong",{children:"Training:"})," Ensure all team members understand how to use the scheduling tools effectively"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Regular reviews:"})," Schedule quarterly reviews of your team scheduling practices to identify improvements"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Feedback loops:"})," Collect input from both team members and customers about the scheduling experience"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"Continuous improvement:"})," Use analytics to regularly refine and optimize your team scheduling approach"]})]})]}),s.jsxs("div",{className:"mt-6 p-6 border rounded-lg bg-slate-50 dark:bg-slate-800",children:[s.jsx("h3",{className:"text-lg font-medium mb-4 text-center",children:"Ready to Implement?"}),s.jsx("p",{className:"text-center mb-4",children:"Now that you've learned advanced team scheduling strategies, it's time to apply them to your team!"}),s.jsxs("div",{className:"flex justify-center gap-4",children:[s.jsx(Te,{href:"/team",children:s.jsxs(D,{className:"flex items-center",children:[s.jsx(ir,{className:"mr-2 h-4 w-4"}),"Go to Team Dashboard"]})}),s.jsx(Te,{href:"/booking",children:s.jsxs(D,{variant:"outline",className:"flex items-center",children:[s.jsx($E,{className:"mr-2 h-4 w-4"}),"Create Team Booking Link"]})})]})]})]}),s.jsxs("div",{className:"flex justify-between mt-8",children:[s.jsxs(D,{onClick:l,disabled:e===0,className:"flex items-center",children:[s.jsx(as,{className:"mr-2 h-4 w-4"}),"Previous"]}),e<Rp.length-1?s.jsxs(D,{onClick:o,className:"flex items-center",children:["Next",s.jsx(Wi,{className:"ml-2 h-4 w-4"})]}):s.jsx(Te,{href:"/help",children:s.jsx(D,{children:"Finish Tutorial"})})]})]})})})]})]})})]}),a&&s.jsx(Mn,{isOpen:a,onClose:()=>i(!1)})]})}function LQe(){return s.jsxs(zae,{children:[s.jsx(xt,{path:"/",component:z1e}),s.jsx(xt,{path:"/events",component:lCe}),s.jsx(xt,{path:"/booking",component:bCe}),s.jsx(xt,{path:"/booking/:slug",component:({params:e})=>s.jsx(hb,{slug:e.slug})}),s.jsx(xt,{path:"/team/:teamSlug/booking",component:({params:e})=>s.jsx(c5,{teamSlug:e.teamSlug})}),s.jsx(xt,{path:"/team/:teamSlug/booking/:slug",component:({params:e})=>s.jsx(hb,{slug:e.slug,userPath:`team/${e.teamSlug}`})}),s.jsx(xt,{path:"/:orgSlug/:teamSlug/booking",component:({params:e})=>s.jsx(c5,{teamSlug:e.teamSlug,orgSlug:e.orgSlug})}),s.jsx(xt,{path:"/:orgSlug/:teamSlug/booking/:slug",component:({params:e})=>s.jsx(hb,{slug:e.slug,userPath:`${e.orgSlug}/${e.teamSlug}`})}),s.jsx(xt,{path:"/:userPath/booking",component:({params:e})=>s.jsx(wQe,{userPath:e.userPath})}),s.jsx(xt,{path:"/:userPath/booking/:slug",component:({params:e})=>s.jsx(hb,{slug:e.slug,userPath:e.userPath})}),s.jsx(xt,{path:"/bookings",component:kQe}),s.jsx(xt,{path:"/meeting-polls",component:NQe}),s.jsx(xt,{path:"/poll/:slug",component:({params:e})=>s.jsx(bQe,{slug:e.slug})}),s.jsx(xt,{path:"/route/:slug",component:({params:e})=>s.jsx(jQe,{slug:e.slug})}),s.jsx(xt,{path:"/routing",component:SQe}),s.jsx(xt,{path:"/team-scheduling",component:TQe}),s.jsx(xt,{path:"/availability",component:L_e}),s.jsx(xt,{path:"/settings",component:P_e}),s.jsx(xt,{path:"/integrations",component:EPe}),s.jsx(xt,{path:"/contacts",component:JPe}),s.jsx(xt,{path:"/workflows",component:eEe}),s.jsx(xt,{path:"/analytics",component:vQe}),s.jsx(xt,{path:"/login",component:F_e}),s.jsx(xt,{path:"/register",component:U_e}),s.jsx(xt,{path:"/reset-password",component:W_e}),s.jsx(xt,{path:"/set-new-password",component:H_e}),s.jsx(xt,{path:"/accept-invite",component:Y_e}),s.jsx(xt,{path:"/verify-email",component:G_e}),s.jsx(xt,{path:"/change-password",component:K_e}),s.jsx(xt,{path:"/user-management",component:mPe}),s.jsx(xt,{path:"/admin/subscriptions",component:yPe}),s.jsx(xt,{path:"/admin/stripe-products",component:bPe}),s.jsx(xt,{path:"/admin/:tab?",component:hPe}),s.jsx(xt,{path:"/organization",component:fk}),s.jsx(xt,{path:"/organization/teams",component:fk}),s.jsx(xt,{path:"/organization/members",component:fk}),s.jsx(xt,{path:"/team",component:hk}),s.jsx(xt,{path:"/team/members",component:hk}),s.jsx(xt,{path:"/team/schedule",component:hk}),s.jsx(xt,{path:"/profile",component:DPe}),s.jsx(xt,{path:"/diagnostic",component:CQe}),s.jsx(xt,{path:"/help",component:qPe}),s.jsx(xt,{path:"/help/documentation/GettingStartedGuide",component:AQe}),s.jsx(xt,{path:"/help/documentation/ApiDocumentation",component:EQe}),s.jsx(xt,{path:"/help/documentation/AdminGuide",component:OQe}),s.jsx(xt,{path:"/help/documentation/KnowledgeBase",component:DQe}),s.jsx(xt,{path:"/help/documentation/article/:articleId",component:MQe}),s.jsx(xt,{path:"/help/tutorials/calendar-getting-started",component:IQe}),s.jsx(xt,{path:"/help/tutorials/booking-links",component:RQe}),s.jsx(xt,{path:"/help/tutorials/team-scheduling",component:$Qe}),s.jsx(xt,{path:"/privacy-policy",component:_Qe}),s.jsx(xt,{path:"/terms-of-service",component:PQe}),s.jsx(xt,{component:dpe})]})}const FQe=()=>{const{activeFeatureTour:e}=hv();return s.jsxs(s.Fragment,{children:[s.jsx(eme,{}),s.jsx(ipe,{}),s.jsx(cpe,{activeTour:e})]})};function BQe(){return s.jsx(cie,{client:Wt,children:s.jsx(oue,{children:s.jsxs(cue,{children:[s.jsx(LQe,{}),s.jsx(FQe,{}),s.jsx(Tle,{})]})})})}class UQe extends p.Component{constructor(t){super(t),this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("Uncaught error in React tree:",t,r)}render(){return this.state.hasError?(this.state,s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-4",children:s.jsxs(X,{className:"w-full max-w-lg",children:[s.jsxs(ue,{children:[s.jsx(fe,{children:"Something went wrong"}),s.jsx(ye,{children:"An unexpected error occurred while rendering this page. You can try reloading to re
998cover."})]}),s.jsxs(te,{className:"space-y-4",children:[!1,s.jsx(D,{onClick:this.handleReload,children:"Reload"})]})]})})):this.props.children}}v9(document.getElementById("root")).render(s.jsx(UQe,{children:s.jsx(BQe,{})}));
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.